:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --bg: #f8fafc;
    --page-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-bg-rgb: 255, 255, 255;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --accent: #4f46e5;
    --radius: 8px;
    --footer-bg: #f8fafc;
    --danger: #dc2626;
    --success: #16a34a;
    --row-hover: #f1f5f9;
}

.login-page {
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; margin: 0;
    background: var(--page-bg);
    color: var(--text-main);
    position: relative; overflow: hidden;
    padding: 2rem 1rem;
}

.login-shell { 
    position: relative; 
    width: 100%; 
    max-width: 440px; 
    text-align: center;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.login-header-spacer {
    width: 38px;
}

.theme-toggle-login {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 0; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 38px; 
    height: 38px;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.theme-toggle-login:hover { 
    color: var(--primary-hover);
    transform: scale(1.15);
}

.theme-toggle-login svg { 
    width: 24px; 
    height: 24px; 
    stroke: currentColor; 
}

.login-shell h2 { 
    margin: 0; 
    font-size: 1.75rem; 
    font-weight: 800; 
    color: var(--primary); 
    letter-spacing: -0.025em;
}

.login-copyright {
    margin-top: 1.25rem; 
    font-size: 0.65rem; 
    color: var(--text-muted);
    text-align: center; 
    letter-spacing: 0.02em;
}

.login-shell form {
    background: var(--card-bg);
    padding: 2.5rem; 
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%; 
    border: 1px solid var(--border);
    text-align: center; 
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.login-shell input {
    display: block; 
    width: 100%; 
    margin: 1.5rem 0;
    padding: 0.85rem; 
    border: 1px solid var(--border);
    border-radius: var(--radius); 
    box-sizing: border-box;
    font-size: 1rem; 
    transition: all 0.2s;
    text-align: center; 
    background: var(--bg); 
    color: var(--text-main);
    letter-spacing: 0.03em;
}

.login-shell input::placeholder { 
    color: var(--text-muted); 
}

.login-shell input:focus { 
    border-color: var(--primary); 
    outline: none; 
    background: var(--bg); 
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); 
}

.login-shell button[type="submit"] {
    width: 100%; 
    padding: 1.05rem;
    background: var(--primary);
    color: white; 
    border: 1px solid var(--primary);
    border-radius: var(--radius); 
    cursor: pointer;
    font-size: 1rem; 
    font-weight: 800;
    transition: all 0.25s ease;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow);
    position: relative;
    overflow: visible;
}

.login-shell button[type="submit"]:hover { 
    background: var(--primary-hover); 
    transform: translateY(-1px); 
    box-shadow: var(--shadow-lg);
}

:root[data-theme="light"] {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --bg: #f8fafc;
    --page-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-bg-rgb: 255, 255, 255;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --accent: #4f46e5;
    --radius: 8px;
    --footer-bg: #f8fafc;
    --danger: #dc2626;
    --success: #16a34a;
    --row-hover: #f1f5f9;
}

:root[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-soft: #1e293b;
    --bg: #0f172a;
    --page-bg: #100C08;
    --card-bg: #1e293b;
    --card-bg-rgb: 30, 41, 59;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --accent: #818cf8;
    --radius: 8px;
    --footer-bg: #0f172a;
    --danger: #ef4444;
    --success: #22c55e;
    --row-hover: #334155;
}

:root[data-theme="dark"] nav {
    background: #020617;
    border: 1px solid var(--border);
}

:root[data-theme="dark"] .nav-slider {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Utility Classes */
* {
    box-sizing: border-box;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--page-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    pointer-events: none;
}

body::before {
    top: 72px; /* Height of sticky header */
    background: linear-gradient(to bottom, var(--page-bg) 20%, transparent 100%);
    z-index: 100;
}

body::after {
    bottom: 0;
    background: linear-gradient(to top, var(--page-bg) 20%, transparent 100%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Flex Classes */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

/* Display Classes */
.d-flex {
    display: flex !important;
}

.h-full {
    height: 100%;
}

/* Text Alignment Classes */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.align-right {
    text-align: right !important;
}
.align-left {
    text-align: left !important;
}
.align-center {
    text-align: center !important;
}

/* Margin Classes */
.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.ml-auto {
    margin-left: auto;
}

.ml-4 {
    margin-left: 1rem;
}

/* Padding Classes */
.p-4 {
    padding: 1rem;
}

/* Gap Classes */
.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

/* Font Classes */
.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 800;
}

.text-sm {
    font-size: 0.8rem;
}

.text-xs {
    font-size: 0.7rem;
}

.text-lg {
    font-size: 1.1rem;
}

.text-xl {
    font-size: 1.2rem;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.05em;
}

/* Background and Text Color Classes */
.primary-bg {
    background: var(--primary) !important;
}

.white-text {
    color: white !important;
}

.primary-text {
    color: var(--primary);
}

.success-text {
    color: var(--success);
}

.accent-text {
    color: var(--accent);
}

.primary-soft-bg {
    background: var(--primary-soft);
}

.card-bg {
    background: var(--card-bg);
}

.theme-toggle {
    background: var(--primary-soft);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 0;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    transition: box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    box-shadow: 0 10px 20px rgba(37,99,235,0.18);
}

/* Loader Classes */
body.loading {
    overflow: hidden !important;
}

#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(37,56,99,0.92)), var(--page-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    opacity: 1;
    visibility: visible;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content { text-align: center; }

.loader-logo { height: 80px; margin-bottom: 2rem; animation: pulse 2s infinite; }

.loader-bar { width: 200px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 1rem; overflow: hidden; }

.loader-progress { width: 0%; height: 100%; background: var(--primary); animation: load 2s ease-in-out forwards; }

.gradient-text {
    color: var(--primary);
}

@keyframes load {
    to { width: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.dots-animate {
    display: inline-block;
    width: 1.2em;
    text-align: left;
}

.dots-animate::after {
    content: '';
    animation: dots 1.5s infinite steps(3, end);
}

@keyframes dots {
    0% { content: ''; }
    33% { content: '.'; }
    66% { content: '..'; }
    100% { content: '...'; }
}

/* Header Styles */
header {
    background: rgba(var(--card-bg-rgb), 0.82);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 120;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

header::before,
header::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 18px;
    pointer-events: none;
    z-index: -1;
}

header::before {
    top: -18px; background: linear-gradient(to top, rgba(var(--card-bg-rgb), 0.22), transparent);
}

header::after {
    bottom: -18px; background: linear-gradient(to bottom, rgba(var(--card-bg-rgb), 0.22), transparent);
}

header .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: flex-end;
}

header h1 {
    margin: 0; font-size: 1.5rem; font-weight: 800;
    letter-spacing: -0.03em; color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.theme-toggle-icon-only {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    height: 34px;
    border-radius: var(--radius);
    transition: background 0.2s;
    gap: 6px;
    font-weight: 800;
    font-size: 0.8rem;
}

.theme-toggle-icon-only:hover {
    background: var(--primary-soft);
}

.exit-link {
    color: var(--primary);
    text-decoration: none;
    margin-left: 0.5rem;
    gap: 6px;
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    transition: all 0.2s ease;
    padding: 0 0.5rem;
    height: 34px;
    border-radius: var(--radius);
}

.exit-link svg {
    stroke: currentColor;
}

.exit-link:hover { 
    opacity: 1;
    background: var(--primary-soft);
    text-decoration: none;
}

.exit-link[onclick="toggleTheme()"] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border: none;
    background: transparent;
    padding: 0;
    height: auto;
}

.exit-link[onclick="toggleTheme()"] svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Controls Container */
.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Navigation Styles */
nav {
    display: flex;
    gap: 0.2rem;
    background: var(--primary-soft);
    padding: 4px;
    border-radius: var(--radius);
    height: 42px;
    align-items: center;
    position: relative; z-index: 1;
}

.nav-slider {
    position: absolute; height: 34px;
    background: var(--primary);
    border-radius: calc(var(--radius) - 2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
}

nav a {
    text-decoration: none; color: var(--text-muted);
    font-weight: 700; font-size: 0.85rem;
    cursor: pointer; padding: 0 1.2rem;
    height: 34px; display: flex;
    align-items: center;
    border-radius: calc(var(--radius) - 2px);
    transition: all 0.3s ease;
    position: relative; z-index: 1;
    white-space: nowrap;
}

nav a:hover:not(.active) { color: var(--primary); }
nav a.active { color: white; }

/* Secondary Navigation */
.secondary-nav { 
    background: var(--card-bg); 
    border-bottom: 1px solid var(--border); 
    border-top: 1px solid var(--border);
    padding: 0.75rem 0; 
    position: relative;
    margin: 0 auto 2rem;
    border-radius: var(--radius);
}

/* Scroll Navigation */
.scroll-nav-container { 
    position: relative; 
    overflow: hidden;
    padding: 0 40px;
}

.scroll-nav {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
    align-items: center;
    scroll-behavior: smooth;
}

.scroll-nav::-webkit-scrollbar { display: none; }

.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    background: var(--card-bg); 
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; 
    box-shadow: var(--shadow);
    transition: all 0.3s ease; color: var(--primary);
}

.nav-arrow-left { left: -15px; }
.nav-arrow-right { right: -15px; }

.nav-arrow:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.scroll-nav a {
    white-space: nowrap; text-decoration: none; 
    color: var(--text-muted); font-size: 0.8rem; 
    font-weight: 600; padding: 0.4rem 0.8rem;
    border-radius: 8px; background: var(--bg);
    transition: all 0.2s;
}

.scroll-nav a:hover { 
    background: var(--primary-soft); 
    color: var(--primary); 
}

:root[data-theme="dark"] .scroll-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Banner Section */
.banner-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .banner-container {
        height: 120px;
        margin-bottom: 1.5rem;
    }
}

.nav-label { 
    font-size: 0.7rem; font-weight: 800; 
    text-transform: uppercase; color: var(--primary);
    letter-spacing: 0.05em; margin-right: 0.5rem; 
}

/* Search Section */
.search-section { margin: 2.5rem 0; }

.search-box {
    display: flex; 
    gap: 12px; 
    background: transparent;
    padding: 0; 
    align-items: center;
    flex-wrap: wrap;
}

.search-input-container {
    position: relative; 
    flex: 2; 
    min-width: 300px; 
    display: flex; 
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    height: 52px;
    transition: all 0.2s;
}

.search-input-container:focus-within, .search-input-container:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

.search-input-container {
    cursor: text;
}

.search-input-container svg {
    position: absolute; left: 15px; 
    z-index: 2; color: var(--text-muted); 
    pointer-events: none;
}

.search-box input { 
    flex: 1;
    height: 44px;
    border: none !important;
    background: transparent !important;
    padding: 0 1rem 0 3rem; 
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    box-shadow: none !important;
}

.search-box button {
    height: 44px;
    padding: 0 1.5rem; 
    background: var(--primary); 
    color: white; 
    border: none !important; 
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer; 
    font-weight: 700;
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    white-space: nowrap;
    transition: background 0.2s;
    box-shadow: none !important;
}

.search-box button:hover {
    background: var(--primary-hover);
}

.search-box select { 
    height: 52px;
    padding: 0 2.5rem 0 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    flex: 1;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text-main);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center;
    background-size: 1.1em;
    transition: all 0.2s;
}

.search-box select:hover, .search-box select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
    outline: none;
}

/* Footer Styles */
footer {
    text-align: center; padding: 6rem 0; 
    background: rgba(var(--card-bg-rgb), 0.82); 
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); 
    margin-top: 6rem; 
}

footer .logo-container { 
    display: flex; justify-content: center; 
    gap: 3rem; align-items: center; 
    margin-bottom: 3rem; flex-wrap: wrap; 
}

.footer-logo-wrapper {
    padding: 1rem; display: flex;
    align-items: center; justify-content: center;
    transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

footer img { 
    height: 50px; width: auto; 
    transition: 0.3s; object-fit: contain; 
}

footer p { 
    margin: 0.5rem 0; color: var(--text-muted); 
    font-size: 0.85rem; font-weight: 600; 
}

.copyright { 
    color: var(--text-main) !important; 
    font-weight: 700 !important; 
    margin-top: 2rem; 
}

.footer-version { 
    margin-top: 1rem; font-size: 0.7rem; 
    opacity: 0.4; letter-spacing: 0.1em; 
    font-weight: 800; 
}

/* Grid Layout with Masonry */
.grid { 
    margin: 0 -12px; display: flex;
    flex-wrap: wrap; align-content: flex-start;
}

.grid-item { 
    width: 25%; padding: 12px; 
    transition: all 0.3s ease; 
}

.grid-item.hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

@media (max-width: 1200px) { .grid-item { width: 33.33%; } }
@media (max-width: 768px) { .grid-item { width: 50%; } }
@media (max-width: 480px) { .grid-item { width: 100%; } }

.card { 
    background: var(--card-bg); border-radius: var(--radius); 
    box-shadow: var(--shadow); display: flex; 
    flex-direction: column; overflow: hidden; 
    border: 1px solid var(--border);
    animation: fadeIn 0.8s ease-out both;
    transition: transform 0.3s ease, 
    box-shadow 0.3s; position: relative;
}

.card:hover { 
    transform: translateY(-6px); 
    box-shadow: var(--shadow-lg); 
    border-color: var(--primary); 
}

/* Unified Shine */
.card::before,
.btn-load::after,
.login-shell button[type="submit"]::after,
.order-thumb-wrapper::after {
    content: '';
    position: absolute; inset: -1px; padding: 3px;
    background: conic-gradient(from var(--angle), transparent 40%, var(--primary), var(--accent), #38bdf8, white, var(--primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: inherit;
    z-index: 1; opacity: 0;
    transition: opacity 0.4s ease; pointer-events: none;
}

@property --angle {
    syntax: '<angle>'; initial-value: 0deg; inherits: false;
}

.card:hover::before,
.btn-load:hover::after,
.login-shell button[type="submit"]:hover::after,
.order-thumb-wrapper:hover::after {
    opacity: 1; animation: rotate-border 2s linear infinite;
}

@keyframes rotate-border {
    from { --angle: 0deg; }
    to { --angle: 360deg; }
}

.card-img-wrapper { 
    position: relative; width: 100%;
    background: var(--primary-soft); overflow: hidden; 
    display: flex; align-items: center; justify-content: center;
}

.card img { 
    width: 100%; height: auto; display: block;
    transition: 0.4s ease; 
}

.card:hover img { transform: scale(1.03); }

/* Card Content */
.card-content {
    padding: 1.5rem; flex-grow: 1; 
    display: flex; flex-direction: column; 
}

.card .sku { 
    color: var(--text-muted); font-size: 0.65rem; 
    font-weight: 700; text-transform: uppercase; 
    letter-spacing: 0.1em; margin-bottom: 0.5rem; 
}

.card h3 { 
    margin: 0 0 0.75rem; font-size: 1rem; 
    font-weight: 700; line-height: 1.4; color: var(--text-main); 
    height: 2.8em; overflow: hidden; 
    display: -webkit-box; -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
}

.card .price { 
    font-weight: 700; color: var(--text-muted); 
    font-size: 0.8rem; margin-top: auto; 
}

/* Description Container */
.description-container {
    position: relative; margin: 0.75rem 0; 
}

.description { 
    font-size: 0.8rem; color: var(--text-muted); 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; overflow: hidden; 
}

.description.expanded { 
    -webkit-line-clamp: unset; display: block; 
}

.read-more { 
    display: inline-block; font-size: 0.75rem; 
    font-weight: 700; color: var(--primary); 
    cursor: pointer; margin-top: 0.25rem; 
    text-decoration: none;
}

.read-more:hover { text-decoration: underline; }

/* Reviews Summary */
.reviews-summary { 
    font-size: 1.2rem; 
    color: #f59e0b; display: flex; 
    align-items: center; gap: 6px; 
    margin-top: 0.5rem; font-weight: 800;
    position: relative; cursor: help;
}

.reviews-summary span:first-child { font-size: 1.5rem; }

.reviews-summary.no-rating { color: var(--text-muted); opacity: 0.3; }
.reviews-summary.no-rating span { color: var(--text-muted) !important; }

.reviews-tooltip {
    position: absolute; bottom: 100%; left: 0;
    width: 260px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px; box-shadow: var(--shadow-lg);
    display: none; z-index: 100; 
    margin-bottom: 10px; color: var(--text-main);
    font-weight: 400; font-size: 0.8rem;
}

.reviews-summary:hover .reviews-tooltip { display: block; }
.review-item { 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 8px; 
    margin-bottom: 8px; 
}

.review-item:last-child { 
    border-bottom: none; padding-bottom: 0; margin-bottom: 0; 
}

.review-author { 
    font-weight: 700; color: var(--primary); 
    font-size: 0.75rem; 
}

.review-text { margin-top: 4px; font-style: italic; }

/* Table Styling */
.table-container { 
    background: var(--card-bg); border-radius: var(--radius); 
    box-shadow: var(--shadow); overflow-x: auto; 
    border: 1px solid var(--border); 
    animation: fadeIn 0.8s ease-out; 
}

.user-table { 
    width: 100%; border-collapse: collapse; 
    min-width: 800px; 
}

.user-table th { 
    background: var(--primary-soft); 
    padding: 1rem; 
    text-align: center; 
    font-size: 0.75rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    color: var(--primary); 
    border-bottom: 1px solid var(--border); 
    user-select: none; 
}

.user-table th .sort-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 6px; 
    width: 100%; 
    cursor: pointer; 
    transition: all 0.2s; 
    color: var(--primary);
}

.user-table th .sort-icon { 
    opacity: 0.5; transition: opacity 0.2s, transform 0.2s; 
    flex-shrink: 0; color: inherit; 
}

.user-table th .sort-wrapper:hover { color: var(--primary); }

.user-table th .sort-wrapper:hover .sort-icon { 
    opacity: 0.9; transform: scale(1.1); 
}

.user-table th .sort-wrapper.active { color: var(--primary); }

.user-table th .sort-wrapper.active .sort-icon { 
    opacity: 1; transform: scale(1.2); 
}

.user-table td { 
    padding: 1.5rem 1.5rem; 
    border-bottom: 1px solid var(--border); 
    vertical-align: middle; font-size: 1rem; 
}

.user-table tr:hover td { background: var(--row-hover); }

/* DVD Table Specific Styles */
.dvd-table-container { 
    margin: 2rem auto; 
    width: 100%;
}

.dvd-num-header, .dvd-sku-header { width: 180px; }
.dvd-name-cell { text-align: center; font-weight: 600; }
.dvd-num-cell { text-align: center; }
.dvd-sku { 
    background: var(--primary-soft); 
    color: var(--primary); 
    padding: 0.4rem 0.8rem; 
    border-radius: var(--radius); 
    font-weight: 700;
    display: inline-block;
    font-size: 0.85rem;
}

.dvd-row.hidden { display: none; }

/* Table Pagination Controls */
.table-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pagination-left label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pagination-left select {
    height: 42px;
    padding: 0 2.5rem 0 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1em;
    transition: all 0.2s;
}

.pagination-left select:hover {
    border-color: var(--primary);
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Client Table Styles */
.client-contact-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.client-contact-row svg {
    flex-shrink: 0;
    order: -1; /* Move icons before text */
}

.location-cell {
    font-size: 1.1rem;
}

.location-cell .country-flag {
    display: inline-block;
    font-size: 1.5rem;
    margin-right: 0.5rem;
    vertical-align: middle;
    line-height: 1;
}

.orders-cell {
    width: 30% !important;
    max-width: 400px;
}

.order-history-tag {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Badge Classes */
.badge { 
    display: inline-flex; align-items: center; 
    padding: 0.4rem 0.8rem; border-radius: 8px; 
    font-size: 0.7rem; font-weight: 800; 
    background: var(--primary-soft); 
    color: var(--primary); 
}

.badge-success { 
    background: #dcfce7; 
    color: #059669; 
}

/* Order Item Row */
.order-item-row { 
    padding: 0.75rem; 
    border-radius: 10px; 
    background: var(--card-bg); 
    border: 1px solid var(--border); 
    font-size: 0.8rem; 
    transition: box-shadow 0.25s ease, border-color 0.25s ease; 
}

.order-item-row:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.order-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.order-date {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}

.order-item-row strong {
    display: block; 
    margin-bottom: 0.5rem; 
    color: var(--primary); 
    font-size: 0.85rem; 
    font-weight: 700; 
}

.order-item-list { 
    list-style: none; padding: 0; margin: 0.5rem 0 0; 
}

.order-item-list li { 
    margin-bottom: 0.4rem; display: flex; 
    align-items: center; gap: 0.75rem; 
}

.order-item-list li:last-child { margin-bottom: 0; }

.order-thumb {
    width: 100%; height: 100%;
    border-radius: 8px; object-fit: cover; 
    border: 2px solid var(--border);
    display: block;
}

.dvd-sku {
    white-space: nowrap;
    display: inline-block; 
}

.order-item-list .name { 
    font-weight: 600; color: var(--text-main); 
    line-height: 1.4; display: block; 
    margin-bottom: 0.2rem; 
}

.order-item-list .code { 
    font-family: monospace; font-weight: 600; 
    color: var(--text-muted); font-size: 0.7rem; 
    display: block; 
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.order-total-price {
    color: var(--success);
    font-weight: 500;
    font-size: 1rem;
}

/* Tab Content */
.tab-content { 
    display: none; 
}
.tab-content.active { 
    display: block; 
}

/* Stats Classes */
.stats-grid { 
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; 
    margin-bottom: 1.5rem; 
}

.stats-details-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .stats-grid, .stats-details-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .stats-grid, .stats-details-row { grid-template-columns: 1fr; }
}

.stat-card { 
    background: var(--card-bg); padding: 1.5rem; 
    border-radius: var(--radius); 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow); 
}

.stat-value { 
    font-size: 1.75rem; font-weight: 800; 
    color: var(--primary); margin-bottom: 0.25rem; 
}

.stat-label { 
    font-size: 0.75rem; font-weight: 700; 
    color: var(--text-muted); text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

/* Load More Button */
.load-more-container { text-align: center; margin: 5rem 0; }

.btn-load { 
    padding: 1rem 3rem; 
    background: var(--primary); 
    color: white; border: 1px solid var(--primary); 
    border-radius: var(--radius); cursor: pointer; 
    font-weight: 800; font-size: 1rem; 
    transition: all 0.25s ease; 
    position: relative;
    overflow: visible;
}

.btn-load:hover { 
    box-shadow: 0 16px 20px -8px var(--primary-soft); 
}

/* Loading Spinner */
.loading-spinner { 
    display: none; margin: 1.5rem auto; 
    width: 32px; height: 32px; 
    border: 4px solid var(--primary-soft); 
    border-top-color: var(--primary); 
    border-radius: 50%; animation: spin 1s linear infinite; 
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* Count Info Styles */
.count-info { 
    margin-top: 1.5rem; 
    font-weight: 700; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    letter-spacing: 0.05em; 
}

/* Back to Top */
#back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--primary); color: white;
    width: 50px; height: 50px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-lg); 
    z-index: 1100; transition: all 0.3s; border: none;
}

#back-to-top:hover { 
    transform: scale(1.1); background: var(--primary-hover); 
}

/* Image Preview Modal */
.full-image-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.full-image-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Image Overlay Button */
.image-overlay-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
}

.card:hover .image-overlay-btn {
    opacity: 1;
    transform: scale(1);
}

.image-overlay-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .search-box { padding: 1.2rem; border-radius: var(--radius); }
    .search-box input, .search-box select, .search-box button { width: 100%; flex: none; }
    header h1 { font-size: 1.1rem; }
    footer .logo-container { gap: 1.5rem; }
    .footer-logo-wrapper { padding: 1rem 2rem; }
}

/* Utility */
.hidden { display: none !important; }

/* Footer Logos */
.footer-logo-wrapper img {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-logo-wrapper img:hover {
    transform: scale(1.1);
}

/* Recovered & New Styles */
.hidden { display: none !important; }

.footer-logo-wrapper img { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.footer-logo-wrapper img:hover { transform: scale(1.1); }

.order-thumb-wrapper { 
    position: relative; 
    border-radius: var(--radius); 
    overflow: visible;
    width: 45px; height: 45px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.order-thumb-wrapper:hover {
    transform: scale(2.5); 
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.order-thumb-wrapper:hover .order-thumb {
    border-color: var(--primary);
}
