/*
    DUSHLY — Design System
    Clean white canvas, warm orange accent, serif headlines, pill controls
*/

:root {
    /* Brand palette */
    --brand-orange: #F1641E;
    --brand-orange-hover: #D0541A;
    /* v48 WCAG contrast: pure #F1641E with white text = 3.19:1 (FAIL AA).
       Any element that puts WHITE text/icons on top of orange now uses
       --brand-orange-deep (5.99:1) instead. --brand-orange stays for purely
       decorative fills (dividers, dots, focus rings) where no text sits on top. */
    --brand-orange-deep: #A8432C;        /* white text 5.99:1 PASS */
    --brand-orange-deep-hover: #8E3523;  /* white text 7.83:1 PASS */
    /* Muted text sitting on the sand panels (--warm-sand #E8DCC9, footer
       newsletter box) needs a deeper tone: 5.72:1 PASS vs --text-muted's 4.26:1. */
    --text-muted-soft: #5A514B;
    --brand-orange-soft: #FDEBD2;
    --ink: #222222;
    --ink-2: #595959;
    --ink-3: #757575;

    /* Base */
    --bg-main: #ffffff;
    --bg-sub: #F7F7F5;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-secondary: #F7F7F5;

    /* Accents (legacy vars kept in sync) */
    --color-1: #F1641E;
    --color-2: #1F6F54;
    --color-3: #2A7A5E;
    --color-4: #B7791F;
    --color-5: #5B4FC7;

    --primary: var(--brand-orange);
    --secondary: var(--ink);
    --success: #2A7A5E;
    --warning: #B7791F;
    --error: #C4373C;
    --accent: var(--brand-orange); /* used by auth.css */

    /* Text */
    --text-main: #222222;
    --text-sub: #595959;
    --text-secondary: #595959;
    --text-muted: #757575;
    --text-dim: #757575;

    /* Borders */
    --border-light: #E1E3DF;
    --border-vibrant: var(--brand-orange);

    /* Typography */
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-md: 15px;
    --fs-lg: 17px;
    --fs-xl: 22px;
    --fs-xxl: 32px;
    --font-serif: Georgia, 'Times New Roman', serif;

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 6px 18px rgba(34, 34, 34, 0.12);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    --gradient-1: linear-gradient(135deg, #F1641E 0%, #F58536 100%);
    --gradient-2: linear-gradient(135deg, #FF7A45 0%, #F1641E 100%);

    --transition: all 0.2s ease;
    --transition-fast: all 0.12s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #ffffff;
    color: var(--ink);
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    font-size: var(--fs-md);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition-fast); }
img { max-width: 100%; display: block; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography — serif display headings */
h1 { font-family: var(--font-serif); font-size: var(--fs-xxl); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
h2 { font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: 700; color: var(--ink); }
h3 { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }

.section { padding: 40px 0; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }

/* ============ TOP ANNOUNCEMENT BAR ============ */
.top-announcement-bar {
    background: #FDEBD2;
    color: #8C3B00;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    padding: 6px 16px;
    letter-spacing: 0.01em;
}

/* ============ HEADER ============ */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0 0;
}

.header-top { display: flex; align-items: center; gap: 22px; padding-bottom: 10px; }

.logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--ink);
    letter-spacing: -0.02em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo:hover { color: var(--brand-orange); }

.logo-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--brand-orange-deep);
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif);
    font-weight: 700; font-size: 1.15rem;
    flex-shrink: 0;
}

/* Search pill */
.search-pill { flex: 1; max-width: 660px; margin: 0 auto; position: relative; }
.search-pill input {
    width: 100%; height: 46px;
    border: 1px solid var(--ink);
    border-radius: var(--radius-full);
    padding: 0 54px 0 22px;
    font-size: 15px; font-family: inherit;
    background: #ffffff; color: var(--ink);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-pill input::placeholder { color: var(--ink-3); }
.search-pill input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(241, 100, 30, 0.22);
}
.search-pill button {
    position: absolute; right: 6px; top: 6px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--brand-orange-deep); color: #ffffff;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.search-pill button:hover { background: var(--brand-orange-deep-hover); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.signin-link { font-weight: 600; font-size: 14px; color: var(--ink); }
.signin-link:hover { color: var(--brand-orange); }

.seller-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    padding: 7px 12px;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}
.seller-hub-btn:hover {
    background: var(--bg-sub);
    color: var(--brand-orange);
}

.icon-link {
    position: relative;
    color: var(--ink);
    font-size: 1.15rem;
    display: flex; align-items: center;
    padding: 7px;
    border-radius: 50%;
}
.icon-link:hover { background: var(--bg-sub); }

.cart-count {
    position: absolute; top: -3px; right: -5px;
    background: var(--brand-orange-deep); color: #ffffff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #ffffff;
}

/* User Dropdown */
.user-menu-dropdown {
    position: relative;
}
.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}
.user-avatar-btn:hover {
    background: var(--bg-sub);
    border-color: var(--ink-3);
}
.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-orange-deep);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-name-text {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}
.dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    min-width: 220px;
    z-index: 1100;
    padding: 8px 0;
}
.dropdown-panel.show {
    display: block;
    animation: dropdownFade 0.15s ease-out;
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
    padding: 10px 16px 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 4px;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13.5px;
    color: var(--ink);
    font-weight: 500;
    transition: var(--transition-fast);
}
.dropdown-item i {
    width: 16px;
    font-size: 13px;
    opacity: 0.7;
}
.dropdown-item:hover {
    background: var(--bg-sub);
    color: var(--brand-orange);
}
.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 0;
}

/* Category nav row under search */
.cat-nav { display: flex; gap: 24px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
    font-size: 13.5px;
    color: var(--ink-2);
    white-space: nowrap;
    padding: 4px 0 3px;
    border-bottom: 2px solid transparent;
}
.cat-nav a:hover { color: var(--brand-orange); border-color: var(--brand-orange); }
.cat-nav a.active { color: var(--brand-orange); border-color: var(--brand-orange); font-weight: 600; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-full);
    font-size: 14px; font-weight: 600; font-family: inherit;
    line-height: 1.2; cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}
.btn-primary { background: var(--brand-orange-deep); color: #ffffff; }
.btn-primary:hover { background: var(--brand-orange-deep-hover); color: #ffffff; }
.btn-outline { background: #ffffff; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14); color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn-block { width: 100%; display: flex; }
.btn-seller, .btn-admin { background: var(--brand-orange-deep); color: #ffffff; }
.btn-seller:hover, .btn-admin:hover { background: var(--brand-orange-deep-hover); }

/* ============ HOMEPAGE HERO ============ */
.hero { text-align: center; padding: 56px 0 36px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.15; max-width: 780px; margin: 0 auto 12px; }
.hero p { color: var(--ink-2); font-size: 16px; max-width: 560px; margin: 0 auto; }

.cat-circles { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; padding: 18px 0 6px; }
.cat-circle {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 13px; color: var(--ink); width: 104px; text-align: center;
}
.cat-circle .thumb {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    background: var(--bg-sub);
    transition: var(--transition-fast);
}
.cat-circle:hover .thumb { background: var(--brand-orange-soft); }
.cat-circle:hover { color: var(--brand-orange); }

/* ============ PRODUCT GRID ============ */
.product-grid, .dense-grid, .grid-6 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px 18px;
}

.product-card { display: block; }
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--bg-sub);
}
.product-card:hover .product-title { text-decoration: underline; }
.product-info { padding: 10px 2px 0; }
.product-title {
    font-size: 13.5px;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-shop { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.product-price { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-top: 5px; }

/* Legacy card — flattened look */
.card-clean {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-fast);
}
.card-clean:hover { box-shadow: var(--shadow-hover); }

/* ============ BADGES & CHIPS ============ */
.c-badge {
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
}
.c-badge-1 { background: var(--brand-orange-soft); color: #9A4B0E; }
.c-badge-2 { background: #E3EEE7; color: #1F5B43; }
.c-badge-3 { background: #E9EFF6; color: #2C5A78; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 13px; font-weight: 500;
    color: var(--ink-2);
    background: #ffffff;
    white-space: nowrap;
    transition: var(--transition-fast);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #ffffff; }

.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
}
.badge-success { background: #EAF4EF; color: var(--success); }
.badge-warning { background: #FBF3E4; color: var(--warning); }
.badge-error { background: #FCEDEB; color: var(--error); }

/* ============ FORMS ============ */
.input-field, .form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #C9CCC7;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    color: var(--ink);
    transition: var(--transition-fast);
}
.input-field:focus, .form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(241, 100, 30, 0.14);
}

.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-group { margin-bottom: 18px; }
.form-hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; flex-wrap: wrap; gap: 8px; }
.form-container { max-width: 720px; }
.remember-me { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.forgot-password { font-size: 13px; color: var(--brand-orange); font-weight: 600; }
.forgot-password:hover { text-decoration: underline; }

/* ============ ALERTS ============ */
.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-error { background: #FCEDEB; color: var(--error); border-color: #F5C6C0; }
.alert-success { background: #EAF4EF; color: var(--success); border-color: #BFE0D2; }

/* ============ FOOTER (light) ============ */
.site-footer { background: #ffffff; border-top: 1px solid var(--border-light); margin-top: 70px; padding: 46px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 44px; margin-bottom: 38px; }
.footer-grid h4 {
    font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink); margin-bottom: 15px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13.5px; color: var(--ink-2); }
.footer-links a:hover { color: var(--brand-orange); }
.footer-brand p { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; margin-top: 14px; max-width: 300px; }
.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 22px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
    color: var(--ink-3); font-size: 12.5px;
}
.footer-bottom a { color: var(--ink-3); }
.footer-bottom a:hover { color: var(--brand-orange); }
.sidebar-btn {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: var(--ink-2);
}
.sidebar-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }

/* ============ LISTING PAGES ============ */
.page-header { background: #ffffff; border-bottom: 1px solid var(--border-light); padding: 26px 0; }
.marketplace-layout { display: grid; grid-template-columns: 230px 1fr; gap: 36px; padding: 28px 0; }
.filter-group { margin-bottom: 24px; }
.filter-title {
    display: block;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--ink-3); margin-bottom: 10px;
}
.chip-bar { display: flex; gap: 10px; overflow-x: auto; padding: 16px 0 6px; scrollbar-width: none; }
.chip-bar::-webkit-scrollbar { display: none; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty-state i { font-size: 44px; margin-bottom: 14px; opacity: 0.4; }

/* ============ DASHBOARD LAYOUT (seller/admin) ============ */
.dash-layout, .dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-sidebar, .sidebar { background: #ffffff; border-right: 1px solid var(--border-light); padding: 24px 16px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav-link, .side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--ink-2);
    font-weight: 500; font-size: 14px;
}
.side-link:hover, .dash-nav-link:hover { background: var(--bg-sub); color: var(--ink); }
.side-link.active, .dash-nav-link.active { background: var(--brand-orange-soft); color: #9A4B0E; font-weight: 600; }
.dash-main, .main-content { padding: 30px; background: #FAFAF8; }

/* Stat cards */
.stat-card, .stat-card-gradient {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.icon-box {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-orange-soft);
    color: var(--brand-orange);
}

/* Tables */
.table-premium, .table-admin {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 13.5px;
}
.table-premium th, .table-admin th {
    background: var(--bg-sub);
    text-align: left;
    padding: 12px 14px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-2);
}
.table-premium td, .table-admin td { padding: 13px 14px; border-top: 1px solid var(--border-light); vertical-align: middle; }
.table-premium tr:hover td, .table-admin tr:hover td { background: #FBFBFA; }
.img-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }

/* ============ PRODUCT DETAIL ============ */
.detail-page { padding: 30px 0; }
.breadcrumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--brand-orange); }
.detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; }
.gallery-main img { width: 100%; border-radius: var(--radius-lg); background: var(--bg-sub); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    cursor: pointer;
}
.detail-title { font-size: 24px; line-height: 1.3; margin-bottom: 8px; }
.detail-seller { font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.detail-price { font-size: 28px; font-weight: 700; color: var(--ink); }
.detail-price-box { margin: 16px 0; }
.detail-stock { font-size: 13px; color: var(--success); font-weight: 600; }
.detail-desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.75; margin: 18px 0; }
.detail-meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.wishlist-btn {
    width: 46px; height: 46px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: #ffffff;
    color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}
.wishlist-btn:hover { color: var(--brand-orange); border-color: var(--brand-orange); }
.trust-badges { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 24px; }
.trust-badges i { color: var(--brand-orange); }

/* ============ SHOP PAGE ============ */
.shop-hero { background: var(--bg-sub); border-radius: var(--radius-lg); padding: 32px; }
.shop-avatar, .seller-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.6rem; font-weight: 700;
}
.shop-name { font-size: 22px; font-weight: 700; }
.shop-desc { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.shop-stats { display: flex; gap: 28px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); flex-wrap: wrap; }
.shop-products { margin-top: 30px; }

/* ============ WALLET ============ */
.wallet-card-premium { background: var(--ink); color: #ffffff; border-radius: var(--radius-lg); padding: 28px; }
.balance-amount { font-size: 32px; font-weight: 800; color: #ffffff; }
.balance-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #B8B8B3; }
.earnings-section, .payout-section { margin-top: 30px; }
.transaction-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 2px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

/* ============ MISC ============ */
.text-muted, .text-dim { color: var(--ink-3); }
.text-secondary { color: var(--ink-2); }
.settings-container { max-width: 760px; }
.inventory-list, .left-form, .right-form, .card-container { min-width: 0; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.urgency-text { color: #B4570F; font-size: 12.5px; font-weight: 600; }
.viewers-badge { font-size: 12px; color: var(--ink-2); }
.floating-cta-mobile {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    padding: 12px 16px;
    display: flex; gap: 12px;
    z-index: 900;
}
.banner-upload-box, .logo-upload-box, .image-preview-box {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    color: var(--ink-3);
    background: var(--bg-sub);
}
.preview-img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border-light); }
.product-mini-card { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.back-link { font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.back-link:hover { color: var(--brand-orange); }
.login-card { max-width: 420px; margin: 0 auto; }

/* Loaders */
.loading {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.pulsate { animation: pulsate 1.6s ease infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulsate { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ============ MOBILE DRAWER (hamburger menu) ============ */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary, #222);
    cursor: pointer;
    padding: 6px 8px;
    line-height: 1;
}
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mobile-drawer-overlay.show {
    display: block;
    opacity: 1;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    background: #ffffff;
    z-index: 1300;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
}
.mobile-drawer.open {
    transform: translateX(0);
}
.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light, #E5E7EB);
}
.mobile-drawer-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
    color: var(--text-primary, #222);
}
.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted, #777);
    cursor: pointer;
    padding: 6px;
}
.mobile-drawer-nav {
    overflow-y: auto;
    padding: 10px 8px 24px;
    display: flex;
    flex-direction: column;
}
.mobile-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary, #222);
    text-decoration: none;
    border-radius: 10px;
}
.mobile-drawer-nav a i {
    width: 20px;
    text-align: center;
    color: var(--primary, #F1641E);
    opacity: 0.85;
}
.mobile-drawer-nav a:hover {
    background: var(--bg-sub, #F6F2EE);
}
.mobile-drawer-nav a.active {
    background: #FFF0E6;
    /* v48 WCAG: --primary on the peach pill = 3.78:1 (FAIL). Deep terracotta = 5.38:1. */
    color: var(--brand-orange-deep, #A8432C);
}
.mobile-drawer-divider {
    height: 1px;
    background: var(--border-light, #E5E7EB);
    margin: 10px 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 991px) {
    .marketplace-layout { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; gap: 26px; }
    .dash-layout, .dashboard-layout { grid-template-columns: 1fr; }
    .dash-sidebar, .sidebar { border-right: none; border-bottom: 1px solid var(--border-light); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .hero { padding: 40px 0 28px; }
}

@media (max-width: 767px) {
    .header-top { flex-wrap: wrap; gap: 12px; }
    .search-pill { order: 3; flex-basis: 100%; max-width: none; }
    .product-grid, .dense-grid, .grid-6 { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
    .footer-grid { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }

    /* Hamburger + drawer replace the inline category bar */
    .mobile-menu-btn { display: inline-block; order: 0; }
    .cat-nav { display: none; }

    /* Header: logo + actions on one row, search below */
    .header-top {
        display: flex;
        align-items: center;
    }
    .logo { order: 1; }
    .header-actions { order: 2; margin-left: auto; gap: 10px; }
    .seller-hub-btn span, .signin-link { font-size: 13px; }

    /* Hero stacks and centers */
    .hero-content { text-align: center; padding: 0 6px; }
    .hero-content h1 { font-size: 30px !important; line-height: 1.2; }
    .hero-highlight { font-size: 30px !important; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .hero-actions .btn { width: 100%; max-width: 320px; margin: 0 auto; }
    .hero-tags { justify-content: center; flex-wrap: wrap; }

    /* Checkout + forms stack */
    .checkout-layout { grid-template-columns: 1fr !important; }
    .checkout-layout > div { min-width: 0; }
    .checkout-card { padding: 16px !important; }
    .checkout-card .form-group input, .checkout-card .form-group select { width: 100%; }

    /* Order detail + generic two-column grids stack */
    div[style*="grid-template-columns: 1fr 340px"] { grid-template-columns: 1fr !important; }
    div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }

    /* Tables scroll instead of overflowing */
    .sm-table-responsive, .table-wrap, .order-items-wrap { overflow-x: auto; }

    /* Product detail gallery + info stack */
    .product-detail-layout { grid-template-columns: 1fr !important; gap: 18px; }

    /* Announcement bar smaller */
    .top-announcement-bar { font-size: 12px; padding: 7px 0; }

    /* Footer subscribe form: no overflow */
    .site-footer form { max-width: 100% !important; min-width: 0 !important; }
    .site-footer form input { min-width: 0 !important; width: 100%; }
    .site-footer form button { max-width: 100%; }

    /* Body: no sideways scroll */
    body { overflow-x: hidden; }
}
/* Multi-level category nav dropdown — loaded via header.php (v1) */
.cat-nav-item { position: relative; display: inline-flex; align-items: center; }
.cat-nav-item > a { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cat-caret { font-size: 8px; opacity: .7; transition: transform .15s ease; }
.cat-nav-item:hover .cat-caret { transform: translateY(1px); }

.cat-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -10px;
    z-index: 60;
    min-width: 210px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
    padding: 6px;
    max-height: 70vh;
    overflow-y: auto;
}
.cat-nav-item:hover .cat-dropdown,
.cat-nav-item:focus-within .cat-dropdown { display: block; }

.cat-dd-item { position: relative; }
.cat-dd-item > a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    border-radius: 7px;
    line-height: 1.3;
}
.cat-dd-item > a:hover { background: #FFF3EC; color: var(--brand-orange, #EA580C); }
/* nested submenu opens to the right on hover */
.cat-dd-item.has-sub > a::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 9px;
    color: #9CA3AF;
    float: right;
    margin-top: 3px;
}
.cat-dd-item .cat-dropdown { top: -7px; left: 100%; min-width: 190px; }

/* touch devices: tap opens via :focus-within on the item anchor */
.cat-dd-item > a:focus { background: #FFF3EC; }

