/* ═══════════════════════════════════════════════════════════════
   SheetSell — Professional Redesign
   Comprehensive CSS with all bug fixes
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --purple: #8b5cf6;
    --purple-dark: #7c3aed;
    --navy: #0f172a;
    --navy-light: #1e293b;
    --dark: #1e293b;
    --text: #334155;
    --text-secondary: #475569;
    --muted: #64748b;
    --light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --bg: #f8fafc;
    --bg-warm: #faf9f7;
    --card: #ffffff;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 10px 20px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 20px 48px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 60px rgba(0,0,0,.12);
    --shadow-primary: 0 4px 14px rgba(99,102,241,.25);
    --shadow-primary-lg: 0 8px 24px rgba(99,102,241,.35);
    --transition: all .25s cubic-bezier(.4,0,.2,1);
    --transition-fast: all .15s cubic-bezier(.4,0,.2,1);
    --font-display: 'Prompt', 'Sarabun', sans-serif;
    --font-body: 'Sarabun', 'Prompt', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ── Body flex layout — pushes footer down ── */
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--primary-100); color: var(--primary-dark); }

/* ══════════════════════════════════════════════════════════════
   Animations
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: none; opacity: 1; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Animation classes with stagger delays ── */
.animate-fadeInUp   { animation: fadeInUp .6s ease both; }
.animate-fadeInUp-1 { animation: fadeInUp .6s ease .1s both; }
.animate-fadeInUp-2 { animation: fadeInUp .6s ease .2s both; }
.animate-fadeInUp-3 { animation: fadeInUp .6s ease .3s both; }
.animate-fadeInUp-4 { animation: fadeInUp .6s ease .4s both; }
.animate-fadeInUp-5 { animation: fadeInUp .6s ease .5s both; }
.animate-fadeInUp-6 { animation: fadeInUp .6s ease .6s both; }
.animate-scaleIn    { animation: scaleIn .5s ease both; }
.animate-fadeIn     { animation: fadeIn .5s ease both; }

/* ══════════════════════════════════════════════════════════════
   Navbar
   ══════════════════════════════════════════════════════════════ */
.navbar {
    background: rgba(15, 23, 42, .97);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 20px rgba(0,0,0,.2);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.navbar .logo {
    color: #fff;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.3px;
}
.navbar .logo .logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-primary);
}
.navbar .logo .logo-highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar .nav-links a {
    color: rgba(255,255,255,.7);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.navbar .nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}
.navbar .nav-links .btn-nav {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: var(--shadow-primary);
}
.navbar .nav-links .btn-nav:hover {
    box-shadow: var(--shadow-primary-lg);
    transform: translateY(-1px);
}

/* ── Nav Cart Link ── */
.nav-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,.7) !important;
    font-size: 18px;
    padding: 8px 12px !important;
}
.nav-cart:hover {
    color: #fff !important;
}
.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.cart-badge:empty {
    display: none;
}

/* ── Mobile Hamburger Toggle ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    border-radius: 8px;
    transition: var(--transition-fast);
}
.nav-toggle:hover {
    background: rgba(255,255,255,.1);
}

/* ══════════════════════════════════════════════════════════════
   Container
   ══════════════════════════════════════════════════════════════ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: var(--shadow-primary-lg); }

.btn-secondary {
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-success { background: var(--success); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,.25); }
.btn-danger  { background: var(--danger); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.25); }
.btn-warning { background: var(--warning); color: var(--navy); box-shadow: 0 4px 14px rgba(245,158,11,.25); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text);
}
.btn-ghost:hover { background: var(--border-light); }

.btn-white {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow);
}
.btn-white:hover { box-shadow: var(--shadow-md); }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-xl { padding: 16px 40px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.btn-icon.btn-sm { width: 34px; height: 34px; border-radius: 8px; }

/* ══════════════════════════════════════════════════════════════
   Cards
   ══════════════════════════════════════════════════════════════ */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,.04);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(99,102,241,.1);
}
.card-body { padding: 20px; }

/* ── Sheet Card — consistent height with flex ── */
.sheet-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}
.sheet-card .preview {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, var(--primary-100), #f0f0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.sheet-card .preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.sheet-card:hover .preview img { transform: scale(1.05); }
.sheet-card .preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.06), transparent 40%);
    pointer-events: none;
}
.sheet-card .wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 16px;
    z-index: 2;
    box-shadow: var(--shadow-xs);
}
.sheet-card .wishlist-btn:hover { background: #fff; transform: scale(1.1); }
.sheet-card .wishlist-btn.active { color: var(--danger); }
.sheet-card .info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sheet-card .title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.sheet-card .meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sheet-card .card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}
.sheet-card .card-rating .stars { font-size: 12px; }
.sheet-card .card-rating .rating-count { font-size: 11px; color: var(--light); }
.sheet-card .bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.sheet-card .price {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.sheet-card .price.free { color: var(--success); }
.sheet-card .sales {
    font-size: 12px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── Cart button on sheet card ── */
.sheet-card .btn-cart {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    white-space: nowrap;
}
.sheet-card .btn-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ── Sheet Grid ── */
.sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ══════════════════════════════════════════════════════════════
   Hero Section — clean gradient, no broken curves
   ══════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--navy) 0%, #1e293b 100%);
    padding: 56px 0 48px;
    text-align: center;
    color: #fff;
    overflow: hidden;
}
.hero::before {
    display: none;
}
.hero::after {
    display: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.8);
    margin-bottom: 16px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}
.hero h1 .text-gradient {
    color: var(--warning);
    -webkit-text-fill-color: var(--warning);
}
.hero p {
    font-size: 16px;
    color: rgba(255,255,255,.6);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}
.hero-stats {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 20px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 12px 32px;
}
.hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-stats .stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--warning);
}
.hero-stats .stat-label {
    font-size: 13px;
    color: rgba(255,255,255,.5);
}

/* ── Search Bar ── */
.search-bar {
    max-width: 520px;
    margin: 20px auto 0;
    display: flex;
    gap: 0;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 5px;
}
.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: rgba(255,255,255,.95);
    color: var(--text);
    transition: var(--transition);
    min-width: 0;
}
.search-bar input::placeholder { color: var(--light); }
.search-bar input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.search-bar button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--warning), #f97316);
    color: var(--navy);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(245,158,11,.3);
}
.search-bar button:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,.4); }

/* ══════════════════════════════════════════════════════════════
   Trust / Why Us Section — 2 or 4 column grid that wraps
   ══════════════════════════════════════════════════════════════ */
.trust-section {
    padding: 24px 0 16px;
    position: relative;
    background: #fff;
}
.trust-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}
.trust-section .section-header h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}
.trust-section .section-header p {
    font-size: 16px;
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}
.trust-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: .2s;
}
.trust-card::before { display: none; }
.trust-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-100);
}
.trust-card:hover::before { display: none; }
.trust-card .trust-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--primary-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition);
}
.trust-card:hover .trust-icon {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    transform: scale(1.05);
}
.trust-card:hover .trust-icon span { filter: brightness(10); }
.trust-card h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}
.trust-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   Stats Counter Section
   ══════════════════════════════════════════════════════════════ */
.stats-banner {
    background: linear-gradient(135deg, var(--navy), #1a1e3a, var(--primary-dark));
    padding: 48px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.stats-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99,102,241,.15), transparent 50%);
}
.stats-banner .container { position: relative; }
.stats-counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}
.stats-counter-item .counter-value {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.stats-counter-item .counter-label {
    font-size: 14px;
    color: rgba(255,255,255,.6);
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   Category Pills
   ══════════════════════════════════════════════════════════════ */
.cat-section {
    padding: 40px 0 8px;
}
.cat-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 4px 0;
}
.cat-pill {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
    box-shadow: var(--shadow-xs);
}
.cat-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}
.cat-pill .pill-count {
    font-size: 11px;
    background: rgba(0,0,0,.08);
    padding: 1px 7px;
    border-radius: 10px;
}
.cat-pill.active .pill-count {
    background: rgba(255,255,255,.2);
}

/* ══════════════════════════════════════════════════════════════
   Section Titles
   ══════════════════════════════════════════════════════════════ */
.section { padding: 40px 0; }
.section-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 24px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-header .section-title { margin-bottom: 0; }
.section-header .view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ══════════════════════════════════════════════════════════════
   Stars / Rating
   ══════════════════════════════════════════════════════════════ */
.stars {
    display: inline-flex;
    gap: 1px;
    color: var(--warning);
    font-size: 14px;
    line-height: 1;
}
.stars .star-empty { color: #d1d5db; }
.stars-lg { font-size: 20px; gap: 2px; }

.rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rating-display .rating-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
}
.rating-display .rating-count {
    font-size: 13px;
    color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   Badges
   ══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-pending  { background: var(--warning-light); color: #92400e; }
.badge-approved { background: var(--success-light); color: #065f46; }
.badge-rejected { background: var(--danger-light); color: #991b1b; }
.badge-verified {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    color: var(--primary-dark);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.badge-verified::before {
    content: '\2713';
    font-size: 10px;
    font-weight: 700;
}
.badge-free {
    background: var(--success-light);
    color: #065f46;
}
.badge-popular {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}
.badge-new {
    background: linear-gradient(135deg, var(--primary-100), #ddd6fe);
    color: var(--primary-dark);
}

/* ══════════════════════════════════════════════════════════════
   Forms
   ══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
    color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--light); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-group .error-text { font-size: 12px; color: var(--danger); margin-top: 6px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ══════════════════════════════════════════════════════════════
   Auth Card — centered vertically
   ══════════════════════════════════════════════════════════════ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #1a1e3a 40%, var(--primary-dark) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.auth-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(139,92,246,.15), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(99,102,241,.1), transparent 40%);
}
.auth-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: scaleIn .4s ease both;
}
.auth-card h1 {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--dark);
    text-align: center;
    margin-bottom: 6px;
}
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: 14px; }

/* ══════════════════════════════════════════════════════════════
   Sheet Detail Page — 2-column on desktop, 1-column mobile
   ══════════════════════════════════════════════════════════════ */
.detail-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}
.detail-main {}
.detail-card {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.04);
}
.detail-preview {
    width: 100%;
    height: 360px;
    background: linear-gradient(135deg, var(--primary-100), #f0f0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    position: relative;
}
.detail-preview img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: 32px; }
.detail-body h1 {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.3;
}
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}
.detail-meta span { display: flex; align-items: center; gap: 5px; }
.detail-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 24px;
    white-space: pre-wrap;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.detail-tags .tag {
    background: var(--primary-50);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
}
.detail-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.detail-price {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}
.detail-price.free { color: var(--success); }
.detail-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.file-info {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
}
.file-info span { display: flex; align-items: center; gap: 4px; }

/* ── Seller Sidebar Card — sticky on desktop ── */
.seller-sidebar {
    position: sticky;
    top: 84px;
}
.seller-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    text-align: center;
    border: 1px solid rgba(0,0,0,.04);
}
.seller-card .seller-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-primary);
}
.seller-card .seller-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.seller-card .seller-role {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}
.seller-card .seller-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}
.seller-card .seller-stats .s-stat {
    text-align: center;
}
.seller-card .seller-stats .s-stat .s-val {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}
.seller-card .seller-stats .s-stat .s-label {
    font-size: 12px;
    color: var(--muted);
}
.seller-price-box {
    background: var(--primary-50);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}
.seller-price-box .sp-price {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}
.seller-price-box .sp-price.free { color: var(--success); }

/* ── Reviews Section ── */
.reviews-section {
    margin-top: 32px;
}
.reviews-section h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.review-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.review-summary .avg-score {
    text-align: center;
    min-width: 80px;
}
.review-summary .avg-score .big-num {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.review-summary .avg-score .count-text {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}
.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}
.review-item:last-child { border-bottom: none; }
.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--muted);
}
.review-author { font-weight: 600; color: var(--dark); font-size: 14px; }
.review-date { font-size: 12px; color: var(--light); }
.review-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ── Review Form ── */
.review-form {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    margin-top: 20px;
}
.review-form h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ── Star Input ── */
.star-input {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.star-input .star-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    transition: var(--transition-fast);
    padding: 2px;
}
.star-input .star-btn.active,
.star-input .star-btn:hover { color: var(--warning); }

/* ── Related Sheets ── */
.related-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.related-section h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════════════════
   Wishlist Heart Button
   ══════════════════════════════════════════════════════════════ */
.wishlist-heart {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--light);
    transition: var(--transition);
    flex-shrink: 0;
}
.wishlist-heart:hover { border-color: var(--danger); color: var(--danger); }
.wishlist-heart.active { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

/* ══════════════════════════════════════════════════════════════
   Stats Grid (Dashboard)
   ══════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat-card .value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}
.stat-card .value.primary { color: var(--primary); }
.stat-card .value.success { color: var(--success); }

/* ══════════════════════════════════════════════════════════════
   Table — no overflow
   ══════════════════════════════════════════════════════════════ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
th {
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--bg);
    white-space: nowrap;
}
tr:hover { background: var(--border-light); }

/* ══════════════════════════════════════════════════════════════
   Toast
   ══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 14px 22px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideIn .3s ease;
    max-width: 380px;
    backdrop-filter: blur(10px);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   Modal
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn .3s ease;
}
.modal h2 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════════════════
   Tabs
   ══════════════════════════════════════════════════════════════ */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    gap: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   File Upload
   ══════════════════════════════════════════════════════════════ */
.file-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}
.file-drop:hover, .file-drop.dragover {
    border-color: var(--primary);
    background: var(--primary-50);
}
.file-drop .icon { font-size: 36px; margin-bottom: 12px; }
.file-drop .text { font-size: 14px; color: var(--muted); }
.file-drop .name { font-size: 13px; color: var(--primary); font-weight: 600; margin-top: 10px; }

/* ══════════════════════════════════════════════════════════════
   Empty State
   ══════════════════════════════════════════════════════════════ */
.empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--muted);
}
.empty .icon { font-size: 52px; margin-bottom: 16px; }
.empty p { font-size: 15px; }

/* ══════════════════════════════════════════════════════════════
   Loading
   ══════════════════════════════════════════════════════════════ */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--muted);
}
.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

/* ══════════════════════════════════════════════════════════════
   Pagination
   ══════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.pagination .page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination .page-btn:hover, .pagination .page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

/* ══════════════════════════════════════════════════════════════
   Footer — sticks to bottom via margin-top: auto
   ══════════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.7);
    margin-top: auto;
}
.footer-main {
    padding: 48px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-brand .footer-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
    color: rgba(255,255,255,.5);
}
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    font-size: 16px;
    transition: var(--transition-fast);
}
.footer-social a:hover {
    background: var(--primary);
    color: #fff;
}
.footer-col h4 {
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: rgba(255,255,255,.5);
    font-size: 14px;
    transition: var(--transition-fast);
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.35);
}

/* ══════════════════════════════════════════════════════════════
   About / FAQ / Content Pages
   ══════════════════════════════════════════════════════════════ */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1a1e3a 40%, var(--primary-dark) 100%);
    padding: 56px 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(99,102,241,.15), transparent 60%);
}
.page-hero .container { position: relative; }
.page-hero h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}
.page-hero p {
    font-size: 16px;
    color: rgba(255,255,255,.6);
}

.content-section {
    padding: 56px 0;
}
.content-section h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 12px;
}
.content-section .subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 36px;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.step-card {
    text-align: center;
    padding: 28px 20px;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    transition: var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    margin: 0 auto 14px;
    box-shadow: var(--shadow-primary);
}
.step-card .step-icon { font-size: 32px; margin-bottom: 10px; }
.step-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}
.step-card p { font-size: 14px; color: var(--muted); }

/* ── FAQ Accordion ── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-question {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 15px;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition-fast);
    user-select: none;
}
.faq-question:hover { color: var(--primary); }
.faq-question .faq-toggle {
    font-size: 20px;
    color: var(--muted);
    transition: var(--transition);
    flex-shrink: 0;
}
.faq-item.active .faq-toggle { transform: rotate(45deg); color: var(--primary); }
.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
}
.faq-item.active .faq-answer {
    padding: 0 24px 18px;
    max-height: 500px;
}
.faq-answer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ══════════════════════════════════════════════════════════════
   Sort bar
   ══════════════════════════════════════════════════════════════ */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}
.sort-bar select {
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text);
}
.sort-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

/* Seller info row in cards */
.seller-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius);
}
.seller-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

/* ══════════════════════════════════════════════════════════════
   Cart Page Styles
   ══════════════════════════════════════════════════════════════ */
.cart-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}
.cart-wrap h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 24px;
}
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cart-item {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,.04);
}
.cart-item:hover {
    box-shadow: var(--shadow-md);
}
.cart-item .cart-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-100), #f0f0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item .cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item .cart-info {
    flex: 1;
    min-width: 0;
}
.cart-item .cart-title {
    font-weight: 600;
    color: var(--dark);
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item .cart-seller {
    font-size: 12px;
    color: var(--muted);
}
.cart-item .cart-price {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.cart-item .cart-remove {
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: var(--transition-fast);
    flex-shrink: 0;
}
.cart-item .cart-remove:hover {
    color: var(--danger);
}

/* Cart Summary */
.cart-summary {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    position: sticky;
    top: 84px;
}
.cart-summary h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
}
.cart-summary .summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--border);
}
.cart-summary .summary-row.total .amount {
    color: var(--primary);
    font-family: var(--font-display);
}
.cart-summary .summary-row.discount {
    color: var(--success);
}

/* Coupon Input */
.coupon-input {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.coupon-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    min-width: 0;
}
.coupon-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.coupon-input button {
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.coupon-input button:hover {
    background: var(--primary-dark);
}

/* Cart Empty */
.cart-empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--muted);
}
.cart-empty .icon {
    font-size: 64px;
    margin-bottom: 16px;
}
.cart-empty h2 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 8px;
}
.cart-empty p {
    font-size: 15px;
    margin-bottom: 24px;
}

/* ══════════════════════════════════════════════════════════════
   Admin Panel Layout Fixes
   ══════════════════════════════════════════════════════════════ */
.admin-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.admin-table-wrap .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-table-wrap table {
    margin: 0;
    min-width: 600px;
}
.admin-table-wrap th {
    background: #f8fafc;
}

/* ══════════════════════════════════════════════════════════════
   Coupon Admin Styles
   ══════════════════════════════════════════════════════════════ */
.coupon-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.coupon-form h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
}
.coupon-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.coupon-form .form-grid .form-group {
    margin-bottom: 0;
}
.badge-active  { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fef3c7; color: #92400e; }

/* ══════════════════════════════════════════════════════════════
   Content Editor Styles (Admin)
   ══════════════════════════════════════════════════════════════ */
.content-editor {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.content-editor h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.trust-item-editor {
    background: var(--bg);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    position: relative;
}
.trust-item-editor .remove-trust-item {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trust-item-editor .form-grid {
    display: grid;
    grid-template-columns: 60px 1fr 1fr;
    gap: 10px;
}

/* ══════════════════════════════════════════════════════════════
   Responsive — Better breakpoints at 1024px, 768px, 480px
   ══════════════════════════════════════════════════════════════ */

/* -- 1024px breakpoint -- */
@media (max-width: 1024px) {
    .detail-layout { grid-template-columns: 1fr; }
    .seller-sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}

/* -- 768px breakpoint -- */
@media (max-width: 768px) {
    .hero { padding: 48px 0 60px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 16px; }
    .hero-stats { gap: 24px; }
    .hero-stats .stat-value { font-size: 22px; }
    .search-bar { flex-direction: column; }
    .search-bar button { width: 100%; }
    .sheet-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .sheet-card .preview { height: 140px; }
    .navbar { padding: 0 16px; }

    /* Mobile hamburger menu */
    .nav-toggle {
        display: block;
    }
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, .98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: 0 8px 32px rgba(0,0,0,.3);
        border-bottom: 1px solid rgba(255,255,255,.06);
        z-index: 999;
    }
    .navbar .nav-links.open {
        display: flex;
    }
    .navbar .nav-links a {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 8px;
    }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stats-counter-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .stats-counter-item .counter-value { font-size: 28px; }
    .container { padding: 0 16px; }
    .page-hero h1 { font-size: 28px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .form-row { grid-template-columns: 1fr; }
    .review-summary { flex-direction: column; text-align: center; }
    .detail-preview { height: 260px; }
    .coupon-form .form-grid { grid-template-columns: 1fr 1fr; }
    .trust-item-editor .form-grid { grid-template-columns: 1fr; }
}

/* -- 480px breakpoint -- */
@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .hero-stats { gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
    .hero-stats .stat-value { font-size: 16px; }
    .hero-stats .stat-label { font-size: 11px; }
    .sheet-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sheet-card .preview { height: 130px; }
    .sheet-card .info { padding: 12px; }
    .sheet-card .title { font-size: 13px; }
    .sheet-card .price { font-size: 16px; }
    .navbar .logo { font-size: 18px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stats-counter-grid { grid-template-columns: 1fr; gap: 20px; }
    .trust-grid { grid-template-columns: 1fr; }
    .cat-pills { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
    .cart-item { flex-wrap: wrap; }
    .cart-item .cart-thumb { width: 48px; height: 48px; }
    .coupon-input { flex-direction: column; }
    .coupon-form .form-grid { grid-template-columns: 1fr; }
    .detail-body { padding: 20px; }
    .detail-body h1 { font-size: 22px; }
    .detail-price { font-size: 24px; }
    .auth-card { padding: 28px 20px; }
}
