/* =============================================
   app.css – susang.shop Multi‑Vendor Marketplace
   ============================================= */

/* ---------- 1. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

/* ---------- 2. Design Tokens ---------- */
:root {
    --bg: #f8fafc;
    --bg-alt: #ffffff;
    --bg-muted: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #8b5cf6;
    --danger: #ef4444;
    --success: #22c55e;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --gap: 1rem;
    --max-width: 1200px;
    --header-h: 64px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.1);
}

/* ---------- 3. Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-alt);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gap);
    height: var(--header-h);
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}
.logo-img {
    height: 32px;
    width: auto;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
}
.logo-text span { color: var(--primary); }

/* ── Navbar search ── */
.navbar-search {
    display: none;
    position: relative;
    flex: 1;
    max-width: 360px;
}
.navbar-search input {
    width: 100%;
    height: 36px;
    padding: 0 .75rem 0 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: .8125rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.navbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    background: #fff;
}
.navbar-search::before {
    content: '';
    position: absolute;
    left: .625rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
    pointer-events: none;
    z-index: 1;
}
.navbar-search-close {
    display: none;
    position: absolute;
    right: .375rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
/* Mobile: full-width search bar below header when open */
@media (max-width: 767px) {
    .navbar-search {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-width: 100%;
        padding: .5rem 1rem;
        background: var(--bg-alt);
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
        z-index: 110;
    }
    .navbar-search.open { display: block; }
    .navbar-search::before { display: none; }
    .navbar-search input { padding: 0 2.75rem 0 .75rem; }
    .navbar-search-close {
        display: flex;
        right: .75rem;
    }
}
@media (min-width: 768px) {
    .navbar-search { display: block; }
    .navbar-search-close { display: none; }
}

/* ── Mobile search toggle icon ── */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #334155;
    cursor: pointer;
    border-radius: 8px;
}
.search-toggle:hover { background: #f1f5f9; }
@media (min-width: 768px) {
    .search-toggle { display: none; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.lang-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
}
@media (max-width: 640px) {
    .logo-text { display: none; }
    .logo-img { height: 28px; }
}

/* Navigation */
.desktop-nav {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    flex: 1 1 auto;
    mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
}
.desktop-nav::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    .desktop-nav {
        flex: 0 0 auto;
        overflow-x: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }
}
.desktop-nav a {
    flex-shrink: 0;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}
.desktop-nav a:hover { background: var(--bg-muted); }

/* Show/hide helpers for mobile vs desktop nav items */
.nav-mobile-only { display: none; }
@media (max-width: 767px) {
    .nav-desktop-only { display: none; }
    .nav-mobile-only { display: inline-flex; }
}

/* Profile icon in header */
.profile-icon-btn {
    position: relative;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-family: inherit;
}
.profile-icon-btn:hover { color: var(--primary); }

/* Cart icon */
.cart-icon {
    position: relative;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
}
.cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 4px;
}

/* Mobile bottom navigation (fixed) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--bg-alt);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    justify-content: space-around;
    align-items: center;
    padding: 0.35rem 0 env(safe-area-inset-bottom, 0.35rem) 0;
    height: 56px;
}
@media (max-width: 767px) {
    .bottom-nav { display: flex; }
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--text-muted);
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.15s;
    min-width: 0;
}
.bottom-nav-item:hover,
.bottom-nav-item:active { color: var(--primary); }
.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.bottom-nav-icon--profile {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 26px;
    text-align: center;
}
.bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
}

/* Mobile menu – kept hidden; nav is now scrollable on small screens */
.menu-toggle { display: none; }
.mobile-nav { display: none; }

/* ---------- 4. Main Content ---------- */
/* Main – flex column on mobile to reorder sections */
#content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
@media (max-width: 767px) {
    #content { padding-bottom: 64px; }
}
#content > .search-bar-section { order: 1; }
#content > #promo-section { order: 2; }
#content > #products-section   { order: 3; }
#content > .trust-section      { order: 4; }
#content > .newsletter         { order: 5; }
@media (min-width: 768px) {
    #content { display: block; }
}
@media (max-width: 767px) {
    #promo-section { padding-bottom: 0; }
}

/* ---------- 5. Search Bar ---------- */
.search-bar-section {
    padding: 1.5rem var(--gap);
    background: var(--surface);
    border-bottom: 1px solid #e5e7eb;
}
.search-bar-inner {
    max-width: 600px;
    margin: 0 auto;
}
.hero-search-field {
    display: flex;
    gap: 0.5rem;
}
.hero-search-field input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    outline: none;
}
.hero-search-field input:focus { outline: 2px solid var(--primary); }
/* Products page search */
.products-search {
    margin: 0 auto 1.25rem;
    max-width: 480px;
}
.products-search-field {
    display: flex;
    gap: 0.5rem;
}
.products-search-field input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    font-size: 0.9375rem;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}
.products-search-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.hero-search-back {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.hero-search-back:hover { background: rgba(255,255,255,.4); }
.hero-search-submit {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.hero-search-submit:hover { background: var(--primary-hover); }
@media (max-width: 640px) {
    .search-bar-section { padding: 1rem var(--gap); }
    .search-bar-inner { max-width: 100%; }
    .hero-search-field { flex-wrap: wrap; }
    .hero-search-field input { min-width: 0; font-size: 0.9375rem; padding: 0.625rem 0.875rem; }
    .hero-search-submit { width: 100%; padding: 0.625rem; margin-top: 0.25rem; }
}

/* Live search results grid */
#searchResultsGrid,
#productsSearchResults {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    width: 100%;
    text-align: left;
}
#searchResultsGrid:not(:empty),
#productsSearchResults:not(:empty) {
    max-height: none;
    margin-bottom: 1.5rem;
}
#searchResultsGrid .product-grid,
#productsSearchResults .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
#searchResultsGrid .section,
#productsSearchResults .section {
    padding-left: 0;
    padding-right: 0;
}

/* ---------- Search results: hide page sections ---------- */
#content.searching #promo-section,
#content.searching #products-section,
#content.searching .trust-section,
#content.searching .newsletter {
    display: none;
}
#content.searching .hero-search {
    margin-bottom: 0;
    max-width: 100%;
}
#content.searching #searchResultsGrid .section {
    padding-top: 0;
}
#content.searching #searchResultsGrid:not(:empty) {
    margin-top: 0.75rem;
}

/* ---------- 6. Sections ---------- */
.section {
    padding: 1.5rem var(--gap);
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}
.section--alt { background: var(--bg-muted); max-width: 100%; }
.section--alt > .section-header,
.section--alt > .section-footer { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.section-header {
    text-align: center;
    margin-bottom: 1rem;
}
.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.section-header p { color: var(--text-muted); max-width: 480px; margin: 0 auto; }
.section-header--left { text-align: left; }
.section-header--left h2 { font-size: 1.35rem; }
.section-header--left p { margin-left: 0; font-size: 0.95rem; }
.section-header--sm { margin-bottom: 1.5rem; }
.section-header--sm h2 { font-size: 1.15rem; font-weight: 600; }
#products-section { padding-top: 1rem; }
.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* ---------- 7. Categories ---------- */
.category-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.category-icon { font-size: 2rem; }
.category-card h3 { font-size: 0.9rem; font-weight: 600; }
.category-count { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- 8. Promo Banners ---------- */
.promo-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .promo-grid { grid-template-columns: repeat(3, 1fr); } }
.promo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    color: #fff;
    overflow: hidden;
    min-height: 180px;
}
.promo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .15;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.6) 0%, transparent 50%);
}
.promo-card--sale     { background: linear-gradient(135deg, #dc2626, #9333ea); }
.promo-card--shipping { background: linear-gradient(135deg, #2563eb, #0891b2); }
.promo-card--arrivals { background: linear-gradient(135deg, #059669, #0d9488); }
.promo-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,.2);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    position: relative;
    z-index: 1;
}
.promo-card h3 {
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}
.promo-card strong { font-weight: 800; }
.promo-card p {
    font-size: 0.85rem;
    opacity: .9;
    position: relative;
    z-index: 1;
}
.promo-cta {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    position: relative;
    z-index: 1;
    align-self: flex-start;
    border-bottom: 2px solid rgba(255,255,255,.4);
    padding-bottom: 2px;
    transition: border-color 0.15s;
}
.promo-cta:hover { border-color: #fff; }

/* Promo dot carousel (home page) */
.promo-carousel {
    overflow: hidden;
    position: relative;
}
.promo-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.promo-carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
}
.promo-carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.promo-carousel-track .promo-card {
    flex: 0 0 100%;
    min-height: 150px;
    padding: 1.25rem;
}
.promo-carousel-track .promo-card h3 { font-size: 1.125rem; }

/* Prev / Next arrows */
.promo-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
    opacity: 0;
}
.promo-carousel:hover .promo-arrow { opacity: 1; }
.promo-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.promo-arrow:active { transform: translateY(-50%) scale(0.95); }
.promo-arrow--prev { left: 8px; }
.promo-arrow--next { right: 8px; }
@media (max-width: 640px) {
    .promo-arrow {
        width: 32px;
        height: 32px;
        opacity: 1;
        background: rgba(255,255,255,0.85);
    }
    .promo-arrow--prev { left: 4px; }
    .promo-arrow--next { right: 4px; }
    .promo-arrow svg { width: 16px; height: 16px; }
}

/* Dots */
.promo-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.promo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.promo-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}
.promo-dot:hover { background: var(--text-muted); }
@media (max-width: 640px) {
    .promo-dots { gap: 0.4rem; margin-top: 0.75rem; }
    .promo-dot { width: 8px; height: 8px; }
}

/* Promo infinite scroll */
.promo-scroll-wrap {
    overflow: hidden;
    width: 100%;
    margin-bottom: 1.5rem;
    mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
}
.promo-scroll {
    display: flex;
    width: max-content;
    animation: promoroll 35s linear infinite;
}
.promo-scroll:hover,
.promo-scroll.paused,
.promo-scroll:active {
    animation-play-state: paused;
}
.promo-scroll-set {
    display: flex;
    gap: var(--gap);
}
@keyframes promoroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Products heading */
.products-heading {
    margin: 1.5rem 0 1rem;
}
.products-heading h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
}
.products-heading p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ---------- 9. How It Works ---------- */
.steps-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}
@media (min-width: 640px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
}
.step-card h3 { margin-bottom: 0.5rem; }
.step-card p { color: var(--text-muted); font-size: 0.9375rem; }

/* ---------- 10. Product Grid ---------- */
.product-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

/* Product Card */
.product-card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.product-card-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.product-shop {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.product-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
}
.product-title a { color: var(--text); text-decoration: none; }
.product-title a:hover { color: var(--primary); }
.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
}
.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}
.product-card-footer .product-price {
    margin-top: 0;
}

.product-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    z-index: 2;
}
.product-sold {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.125rem;
}
.product-card .product-sold {
    margin-top: 0.25rem;
    padding: 0 0.75rem 0.75rem;
}
.price-compare {
    text-decoration: line-through;
    color: var(--muted);
    font-weight: 400;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}
.price-current {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}
.price-discount {
    display: inline-block;
    background: #fef2f2;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0 0.375rem;
    border-radius: 999px;
    margin-left: 0.25rem;
}
/* Gallery thumbs */
.gallery-thumbs {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s, border-color 0.15s;
}
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { opacity: 1; border-color: var(--primary); }
/* Product detail description */
.product-description {
    color: var(--muted);
    line-height: 1.7;
    margin-top: 0.75rem;
}

/* ---------- 11. Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

/* ---------- 12. Trust ---------- */
.trust-section { padding: 4rem var(--gap); }
.trust-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    max-width: var(--max-width);
    margin: 0 auto;
}
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { text-align: center; }
.trust-item svg { margin-bottom: 0.75rem; }
.trust-item h3 { margin-bottom: 0.375rem; font-size: 1.125rem; }
.trust-item p { color: var(--text-muted); font-size: 0.875rem; }

/* ---------- 13. Newsletter ---------- */
.newsletter {
    text-align: center;
    padding: 4rem var(--gap);
}
.newsletter-inner {
    max-width: 480px;
    margin: 0 auto;
}
.newsletter-inner h2 { margin-bottom: 0.5rem; }
.newsletter-inner p { color: var(--text-muted); margin-bottom: 1.5rem; }
.newsletter-form {
    display: flex;
    gap: 0.5rem;
}
.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 1rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); }
.newsletter-form button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.newsletter-form button:hover { background: var(--primary-hover); }

/* ---------- 14. Footer ---------- */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 3rem var(--gap) 1.5rem;
    margin-top: auto;
}
.footer-inner {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    max-width: var(--max-width);
    margin: 0 auto;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-inner { grid-template-columns: repeat(4, 1fr); } }
.footer-col h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.footer-col h4 span { color: var(--primary); }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.footer-logo-img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}
.footer-logo span {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}
.footer-logo span span { color: var(--primary); }
.footer-col p { font-size: 0.875rem; line-height: 1.6; }
.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }
.social-links { display: flex; gap: 0.75rem; }
.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1e293b;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
}
.social-links a:hover { background: var(--primary); color: #fff; }
.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.8125rem;
    color: #64748b;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

/* ---------- 15. Utilities ---------- */
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }

/* ---------- 16. HTMX Spinner ---------- */
.spinner {
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 17. Responsive Typography ---------- */
h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
p { margin-bottom: 0.75rem; }

/* ---------- 18. Forms (shared) ---------- */
label { font-weight: 500; }
input, textarea, select { font: inherit; }

/* ---------- 19. Search/Categories/Products pages ---------- */
.search-page-form {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 0 auto 2rem;
}
.search-page-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 1rem;
}
.search-page-form input:focus { outline: none; border-color: var(--primary); }
.search-page-form button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-page-form button:hover { background: var(--primary-hover); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state p { margin-bottom: 1rem; font-size: 1.125rem; }

/* Profile section (orders & cart) */
.profile-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}
.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.profile-email { display: block; font-size: 0.85rem; color: var(--text-muted); }
.profile-logout {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--danger);
    text-decoration: none;
    font-weight: 600;
}

/* Orders page */
.order-card {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-muted);
    border-bottom: 1px solid #e2e8f0;
}
.order-date { font-size: 0.85rem; color: var(--text-muted); margin-left: 0.75rem; }
.order-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
}
.order-status--pending { background: #fef3c7; color: #92400e; }
.order-status--processing { background: #dbeafe; color: #1e40af; }
.order-status--shipped { background: #d1fae5; color: #065f46; }
.order-status--delivered { background: #d1fae5; color: #065f46; }
.order-status--cancelled { background: #fee2e2; color: #991b1b; }
.order-items { padding: 1rem; }
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.order-item:last-child { border-bottom: none; }
.order-item a { font-weight: 600; text-decoration: none; color: var(--primary); }
.order-item-shop { font-size: 0.85rem; color: var(--text-muted); }
.order-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    font-size: 1.125rem;
}

/* Order card link (clickable order cards) */
.order-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
}
.order-card-link .order-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}
.order-card-link:hover .order-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.order-card-link:active .order-card {
    transform: translateY(0);
}
.order-view-detail {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 600;
    margin-left: 1rem;
}
.order-update-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    font-size: 0.8125rem;
    color: #1d4ed8;
    border-radius: 0 0 0.75rem 0.75rem;
}
.order-update-note svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}
.order-item-name {
    font-weight: 600;
    font-size: 0.875rem;
}
.order-item-qty {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.category-grid--large { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .category-grid--large { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .category-grid--large { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 20. Product Detail ---------- */
.breadcrumb { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.product-detail-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .product-detail-grid { grid-template-columns: 1fr 1fr; } }
.product-detail-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-muted);
    aspect-ratio: 1;
}
.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.product-detail-image img.loading {
    opacity: 0.4;
    transform: scale(0.98);
}
.product-detail-info .product-shop {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}
.product-detail-info h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
.product-price--large { font-size: 1.75rem; }
.price-cart-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.price-cart-row .btn--lg {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    white-space: nowrap;
}
.product-description { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; }
.product-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.product-meta { border-top: 1px solid #e2e8f0; padding-top: 1rem; font-size: 0.875rem; }
.product-meta div { margin-bottom: 0.375rem; }
.product-meta a { color: var(--primary); text-decoration: none; }

/* -- Variant Picker -- */
.variant-picker {
    margin-bottom: 1.5rem;
}
.variant-picker > label {
    display: block;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    color: var(--text);
}
.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.variant-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}
.variant-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}
.variant-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.variant-btn:hover::before {
    opacity: 0.04;
}
.variant-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    font-weight: 600;
}
.variant-btn.selected::before {
    opacity: 0;
}
.variant-btn:active {
    transform: scale(0.97);
}
.variant-btn .variant-check {
    display: none;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.variant-btn.selected .variant-check {
    display: inline-block;
}
.variant-btn .variant-price {
    font-weight: 600;
    margin-left: 0.25rem;
}
.variant-btn.selected .variant-price {
    color: #fff;
}
.variant-btn:not(.selected) .variant-price {
    color: var(--primary);
}

/* -- Stock Badge -- */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.stock-badge--in {
    background: #dcfce7;
    color: #15803d;
}
.stock-badge--low {
    background: #fef9c3;
    color: #a16207;
}
.stock-badge--out {
    background: #fee2e2;
    color: #dc2626;
}

/* ---------- 21. Cart Page ---------- */
.cart-page { max-width: var(--max-width); margin: 0 auto; }
.cart-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .cart-layout { grid-template-columns: 1fr 320px; }
}
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-card {
    display: flex;
    gap: 1rem;
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: box-shadow 0.15s;
}
.cart-card:hover { box-shadow: var(--shadow); }
.cart-card-img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
}
.cart-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 768px) {
    .cart-card-img { width: 100px; height: 100px; }
}
.cart-card-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.cart-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.cart-card-info { min-width: 0; }
.cart-card-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cart-card-name:hover { color: var(--primary); }
.cart-card-shop {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.cart-card-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}
.cart-card-remove:hover { background: #fee2e2; color: var(--danger); }
.cart-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}
.cart-card-qty-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-card-unit {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.cart-card-qty {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
}
.qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
}
.qty-btn:hover { background: #e2e8f0; }
.qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-card-price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--primary);
}

/* Cart summary sidebar */
.cart-summary { position: sticky; top: calc(var(--header-h) + 1rem); align-self: start; }
.cart-summary-card {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.cart-summary-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}
.cart-summary-free { color: var(--success); font-weight: 600; }
.cart-summary-divider {
    border-top: 1px solid #e2e8f0;
    margin: 1rem 0;
}
.cart-summary-total {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.cart-checkout-btn { width: 100%; justify-content: center; padding: 0.875rem; font-size: 1rem; }
.cart-continue {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
}
.cart-continue:hover { color: var(--primary); }

/* Cart empty state */
.cart-empty {
    text-align: center;
    padding: 4rem 1rem;
}
.cart-empty-icon { margin-bottom: 1.5rem; }
.cart-empty h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.cart-empty p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Mini Cart */
.mini-cart { min-width: 220px; }
.mini-cart h4 { margin-bottom: 0.5rem; font-size: 0.9rem; }
.mini-cart-items { list-style: none; font-size: 0.8rem; margin-bottom: 0.5rem; }
.mini-cart-items li { display: flex; gap: 0.375rem; padding: 0.25rem 0; }
.mini-cart-qty { color: var(--text-muted); min-width: 2em; }
.mini-cart-price { margin-left: auto; color: var(--text); font-weight: 600; }
.mini-cart-more { text-align: center; font-style: italic; color: var(--text-muted); }
.mini-cart-total { font-weight: 700; margin-bottom: 0.75rem; }
.mini-cart-empty { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- 22. Auth pages (Sign In / Sign Up) ---------- */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h) - 200px);
    padding: 2rem var(--gap);
    position: relative;
}
.back-link {
    align-self: flex-start;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    transition: color 0.15s;
}
.back-link:hover { color: var(--primary); }
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}
.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-align: center;
}
.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.field {
    margin-bottom: 1rem;
}
.field label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text);
}
.field input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.btn--full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    margin-top: 0.5rem;
}
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    margin-bottom: 0;
}
.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

/* ---------- 23. Shops page & Shop detail ---------- */
.shops-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .shops-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .shops-grid { grid-template-columns: repeat(4, 1fr); } }
.shop-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shop-card-img {
    width: 100%;
    aspect-ratio: 2;
    overflow: hidden;
}
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.375rem; flex: 1; }
.shop-card-body h3 { font-size: 1rem; font-weight: 600; }
.shop-card-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
}

/* Shop detail */
.shop-detail-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}
.shop-detail-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}
@media (min-width: 640px) {
    .shop-detail-header {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
}
.shop-detail-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #e2e8f0;
}
@media (min-width: 640px) {
    .shop-detail-img {
        width: 100px;
        height: 100px;
    }
}
.shop-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-detail-info { flex: 1; }
.shop-detail-info h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
@media (min-width: 640px) {
    .shop-detail-info h1 { font-size: 1.5rem; }
}
.shop-detail-desc { color: var(--text-muted); margin-bottom: 0.5rem; line-height: 1.5; font-size: 0.9375rem; }
.shop-detail-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.shop-categories { margin-bottom: 1.5rem; }
.shop-cat-list { display: flex; flex-wrap: wrap; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.shop-cat-tag {
    display: inline-flex;
    padding: 0.4rem 0.9rem;
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.shop-cat-tag:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

.shop-products h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; }

/* ---------- 24. Floating back button ---------- */
.float-back {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem 0.5rem 0.625rem;
    border: none;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.15s, box-shadow 0.15s;
    line-height: 1;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.float-back.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.float-back:hover {
    background: var(--bg-muted);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.float-back:active { transform: scale(0.95); }
.float-back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.float-back-label {
    padding-right: 0.25rem;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .float-back {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem;
    }
    .float-back-label { display: none; }
    .float-back-icon { width: 32px; height: 32px; }
}

/* ---------- 25. Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
    .product-card, .category-card, .step-card, .trust-item {
        opacity: 0;
        animation: fadeUp 0.5s ease forwards;
    }
    .product-card:nth-child(1) { animation-delay: 0.05s; }
    .product-card:nth-child(2) { animation-delay: 0.1s; }
    .product-card:nth-child(3) { animation-delay: 0.15s; }
    .product-card:nth-child(4) { animation-delay: 0.2s; }
    .product-card:nth-child(5) { animation-delay: 0.25s; }
    .product-card:nth-child(6) { animation-delay: 0.3s; }
    @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
}

/* ---------- 26. Profile Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 90vw;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: scaleIn 0.2s ease;
}
.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.profile-detail { text-align: center; margin-bottom: 1.5rem; }
.profile-detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.profile-detail h3 { margin: 0; font-size: 1.125rem; }
.profile-detail-name { margin: 0 0 0.2rem; font-size: 1.35rem; }
.profile-detail-email { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.modal-content .field { margin-bottom: 1rem; }
.modal-content label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.85rem; }
.modal-content select,
.modal-content input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
}
.profile-success {
    text-align: center;
    color: var(--success, #16a34a);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}
/* Phone & OTP inside profile modal */
.profile-phone-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.profile-phone-section label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
}
/* Verified display state */
.phone-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.phone-display-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.phone-display-number {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}
.phone-badge--verified {
    background: #dcfce7;
    color: #16a34a;
}
.phone-badge--verified::before {
    content: '';
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #16a34a;
}
.phone-change-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.phone-change-link:hover {
    background: rgba(0,0,0,0.05);
}
/* Edit state */
.phone-edit label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
}
.phone-edit input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 0.75rem;
}
.phone-edit-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.phone-edit-actions .btn {
    flex-shrink: 0;
}
.btn--ghost {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: color 0.15s, background 0.15s;
}
.btn--ghost:hover {
    color: var(--text);
    background: rgba(0,0,0,0.04);
}
#otpResult { margin-top: 0.5rem; }
.otp-error { color: #dc2626; font-size: 0.85rem; }
.otp-sent { color: var(--primary); font-size: 0.85rem; }
.otp-success { color: #16a34a; font-size: 0.85rem; font-weight: 600; }
.otp-resend { margin-top: 0.35rem; text-align: center; }
.otp-resend a { font-size: 0.8rem; color: var(--primary); }
.otp-timer {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin: 0.5rem 0;
}
.otp-timer--expired { color: #dc2626; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* =============================================
   Seller Dashboard – Components (kept, layout in v2)
   ============================================= */

/* Seller tables */
.seller-table-wrap { overflow-x: auto; }
.seller-table {
    width: 100%; border-collapse: collapse; font-size: 0.875rem;
}
.seller-table th {
    text-align: left; padding: 0.625rem 0.75rem;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-muted); border-bottom: 2px solid #e2e8f0;
}
.seller-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.seller-table tbody tr:hover { background: #f8fafc; }

/* Stock colours */
.stock-out { color: #dc2626; font-weight: 600; }
.stock-low { color: #d97706; font-weight: 600; }

/* Product actions */
.seller-actions { display: flex; gap: 0.375rem; flex-wrap: nowrap; }
.btn--xs { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
.seller-product-name { font-weight: 600; text-decoration: none; color: var(--text); }
.seller-product-name:hover { color: var(--primary); }

/* Order card */
.seller-order-card { padding: 1rem 1.25rem; }
.seller-order-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem;
}
.seller-order-header strong { font-size: 1rem; }
.seller-order-date { font-size: 0.78rem; color: var(--text-muted); margin-left: 0.5rem; }
.seller-order-status-area { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.seller-status-form { display: flex; align-items: center; gap: 0.375rem; }
.seller-order-customer { font-size: 0.85rem; margin-bottom: 0.25rem; }
.seller-order-address { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.seller-order-items { margin-bottom: 0.5rem; }
.seller-order-items td a { text-decoration: none; color: var(--text); font-weight: 500; }
.seller-order-items td a:hover { color: var(--primary); }
.seller-order-total { text-align: right; font-size: 0.95rem; }

/* Order row (dashboard) */
.seller-order-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem;
    flex-wrap: wrap; gap: 0.25rem;
}
.seller-order-row:last-child { border-bottom: none; }
.seller-order-row strong { margin-right: 0.5rem; }
.seller-order-customer { color: var(--text-muted); }

/* =============================================
   Shop Categories Management
   ============================================= */
.category-form { margin-bottom: 0; }
.category-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.category-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.category-group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}
.category-group-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--bg-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    background: var(--bg-muted);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.category-item:hover {
    border-color: #cbd5e1;
}
.category-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.category-item-name {
    font-weight: 500;
    font-size: 0.9375rem;
}
.category-item-slug {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.form-hint a {
    color: var(--primary);
    text-decoration: none;
}
.form-hint a:hover {
    text-decoration: underline;
}

/* =============================================
   Quantity Units Management
   ============================================= */
.unit-form { margin-bottom: 0; }
.unit-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.unit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-muted);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.unit-item:hover { border-color: #cbd5e1; }
.unit-item-info { display: flex; flex-direction: column; gap: 0.15rem; }
.unit-item-name {
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.unit-item-short {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}
.unit-item-conversion {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.unit-examples {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.unit-examples h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.unit-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}
.unit-example {
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    font-size: 0.8125rem;
}
.unit-example strong {
    display: block;
    font-size: 0.9375rem;
    color: #166534;
    margin-bottom: 0.25rem;
}
.unit-example span {
    color: #15803d;
}

/* =============================================
   Shop Banner
   ============================================= */
.banner-preview {
    margin-bottom: 1.5rem;
}
.banner-preview h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.banner-preview-card {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #e2e8f0;
}
.banner-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-position--left img {
    object-position: left center;
}
.banner-position--center img {
    object-position: center center;
}
.banner-position--right img {
    object-position: right center;
}
.banner-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.banner-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.banner-live-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.banner-live-preview h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.banner-tips {
    list-style: none;
    padding: 0;
    margin: 0;
}
.banner-tips li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-left: 1.25rem;
    position: relative;
}
.banner-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* =============================================
   Shop Settings
   ============================================= */
.settings-section { margin-bottom: 1.5rem; }
.settings-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text);
}
.settings-title svg { color: var(--primary); }
.settings-grid {
    display: grid; gap: 1rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
}
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-card { padding: 1.25rem; }
.settings-card--full { margin-bottom: 1rem; }
.settings-card-header {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}
.settings-card-header svg { color: var(--primary); flex-shrink: 0; }
.settings-card-header h3 { font-size: 0.9375rem; font-weight: 600; margin: 0; flex: 1; }
.settings-badge {
    font-size: 0.75rem; font-weight: 600;
    background: var(--primary-light); color: var(--primary);
    padding: 0.15rem 0.5rem; border-radius: 999px;
}
.settings-profile {
    display: flex; gap: 1.25rem; align-items: flex-start;
}
@media (max-width: 640px) { .settings-profile { flex-direction: column; align-items: stretch; } }
.settings-profile-img {
    width: 72px; height: 72px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0; border: 2px solid #e2e8f0;
}
.settings-profile-img img { width: 100%; height: 100%; object-fit: cover; }
.settings-profile-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    font-size: 1.5rem; font-weight: 700;
}
.settings-profile-form { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.settings-banner-preview {
    border-radius: var(--radius); overflow: hidden;
    margin-bottom: 1rem; max-height: 150px;
}
.settings-banner-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-banner-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 0.5rem;
    padding: 2rem; margin-bottom: 1rem;
    background: var(--bg-muted); border-radius: var(--radius);
    border: 1px dashed #d1d5db; color: var(--text-muted); font-size: 0.875rem;
}
.settings-form-row {
    display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap;
}
.settings-form-row .form-input { flex: 1; min-width: 100px; }
@media (max-width: 640px) {
    .settings-form-row { flex-direction: column; align-items: stretch; }
    .settings-form-row .form-input { min-width: 0; width: 100%; }
}

/* File upload area */
.file-upload-area {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.375rem; padding: 1.25rem;
    border: 2px dashed #d1d5db; border-radius: var(--radius);
    cursor: pointer; text-align: center;
    transition: border-color 0.15s, background 0.15s;
    color: var(--text-muted);
}
.file-upload-area:hover, .file-upload-area--active {
    border-color: var(--primary); background: var(--primary-light);
}
.file-upload-area span { font-size: 0.875rem; font-weight: 500; }
.file-upload-area small { font-size: 0.75rem; }

/* Media preview cards */
.settings-media-preview {
    position: relative; border-radius: var(--radius); overflow: hidden;
    cursor: pointer; aspect-ratio: 1; max-height: 160px;
}
.settings-media-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-media-preview--banner { aspect-ratio: 3/1; }
.settings-media-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    font-size: 2rem; font-weight: 700; gap: 0.5rem;
}
.settings-media-placeholder--banner { background: var(--bg-muted); font-size: 0.875rem; font-weight: 400; color: var(--text-muted); }
.settings-media-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem;
    background: rgba(0,0,0,0.5); color: #fff;
    opacity: 0; transition: opacity 0.2s;
    font-size: 0.8125rem; font-weight: 500;
}
.settings-media-preview:hover .settings-media-overlay { opacity: 1; }

/* Modal overrides */
.modal-content--md { max-width: 480px; }
.modal-content--lg { max-width: 600px; }
.modal-current { margin-bottom: 1rem; }
.modal-current label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.modal-current-img { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 2px solid #e2e8f0; }
.modal-current-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-current-banner { border-radius: var(--radius); overflow: hidden; max-height: 150px; }
.modal-current-banner img { width: 100%; height: 100%; object-fit: cover; }
.modal-upload { margin-bottom: 1rem; }
.modal-upload > label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.modal-preview { margin-top: 0.75rem; border-radius: var(--radius); overflow: hidden; max-height: 150px; border: 1px solid #e2e8f0; }
.modal-preview img { width: 100%; height: 100%; object-fit: cover; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid #e2e8f0; }

/* Image gallery in modals */
.modal-gallery { margin-bottom: 1.25rem; }
.modal-gallery > label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.modal-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}
.modal-gallery-grid--banner {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.modal-gallery-item {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 2px solid transparent; aspect-ratio: 1;
    transition: border-color 0.15s;
}
.modal-gallery-item--banner { aspect-ratio: 3/1; }
.modal-gallery-item--active { border-color: var(--primary); }
.modal-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-gallery-badge {
    position: absolute; top: 4px; left: 4px;
    font-size: 0.625rem; font-weight: 700;
    background: var(--primary); color: #fff;
    padding: 0.1rem 0.35rem; border-radius: 4px;
    text-transform: uppercase;
}
.modal-gallery-actions {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; gap: 0.25rem; padding: 0.25rem;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    opacity: 0; transition: opacity 0.15s;
}
.modal-gallery-item:hover .modal-gallery-actions { opacity: 1; }

/* My Shop page */
.shop-preview-card {
    background: var(--bg-alt); border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid #e2e8f0; margin-bottom: 1.5rem;
}
.shop-preview-banner {
    width: 100%; height: 180px; overflow: hidden; background: #e2e8f0;
}
.shop-preview-banner img { width: 100%; height: 100%; object-fit: cover; }
.shop-preview-banner--empty {
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.875rem;
}
.shop-preview-header {
    display: flex; gap: 1rem; padding: 1rem 1.25rem; align-items: center;
}
@media (max-width: 640px) { .shop-preview-header { flex-direction: column; text-align: center; } }
.shop-preview-profile {
    width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
    border: 3px solid #fff; flex-shrink: 0; margin-top: -32px;
}
.shop-preview-profile img { width: 100%; height: 100%; object-fit: cover; }
.shop-preview-profile-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    font-size: 1.25rem; font-weight: 700;
}
.shop-preview-info h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.15rem; }
.shop-preview-info p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.shop-preview-meta { display: flex; gap: 1rem; font-size: 0.8125rem; color: var(--text-muted); flex-wrap: wrap; }
@media (max-width: 640px) { .shop-preview-meta { justify-content: center; } }

/* My Shop gallery */
.myshop-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}
.myshop-gallery--banner {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.myshop-gallery-item {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 2px solid transparent; aspect-ratio: 1;
    transition: border-color 0.15s;
}
.myshop-gallery-item--banner { aspect-ratio: 3/1; }
.myshop-gallery-item--active { border-color: var(--primary); }
.myshop-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.myshop-active-badge {
    position: absolute; top: 4px; left: 4px;
    font-size: 0.625rem; font-weight: 700;
    background: var(--primary); color: #fff;
    padding: 0.1rem 0.35rem; border-radius: 4px;
    text-transform: uppercase;
}
.myshop-gallery-actions {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; gap: 0.25rem; padding: 0.25rem;
    background: rgba(0,0,0,0.6); justify-content: center;
    opacity: 0; transition: opacity 0.15s;
}
.myshop-gallery-item:hover .myshop-gallery-actions { opacity: 1; }

/* Shop Banner (public display) */
.shop-banner {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #e2e8f0;
}
@media (max-width: 768px) {
    .shop-banner { height: 150px; }
}
.shop-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* =============================================
   Product Form (Modern)
   ============================================= */
.product-form { display: flex; flex-direction: column; gap: 1.25rem; }

/* Section card */
.form-section {
    background: var(--bg-alt); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid #e2e8f0;
}
.form-section-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem 1.25rem; background: var(--bg-muted);
    border-bottom: 1px solid #e2e8f0;
}
.form-section-header h3 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.section-icon { flex-shrink: 0; color: var(--primary); }
.section-subtitle { font-size: 0.78rem; color: var(--text-muted); margin: 0.1rem 0 0 0; }
.form-section-body { padding: 1.25rem; }
@media (max-width: 640px) {
    .form-section-body { padding: 1rem; }
}

/* Form row layout */
.form-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.form-row:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .form-row { flex-direction: column; gap: 0.75rem; } }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.8125rem; font-weight: 600; color: #334155; }
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-alt);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 100px; }
.flex-1 { flex: 1; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }
.required { color: var(--danger); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); outline: none; }

/* Image preview */
.image-preview { margin-top: 0.5rem; }
.image-preview img {
    max-width: 120px; max-height: 90px;
    border-radius: var(--radius); border: 1px solid #e2e8f0;
    object-fit: cover;
}

/* Form footer */
.form-footer {
    display: flex; gap: 0.75rem; justify-content: flex-end; align-items: center;
    padding: 1rem 0;
    position: sticky; bottom: 0;
    background: var(--bg);
    border-top: 1px solid #e2e8f0;
    margin: 0 -1rem;
    padding: 1rem;
    z-index: 10;
}
@media (max-width: 640px) {
    .form-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .form-footer .btn { width: 100%; justify-content: center; }
}
.btn--lg { padding: 0.625rem 1.25rem; font-size: 0.9rem; }
.btn svg { vertical-align: middle; margin-right: 0.3rem; }

/* ── Attribute Builder ── */
.attr-builder { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.attr-def-row {
    display: flex; gap: 0.5rem; align-items: center;
    background: var(--bg-muted); border: 1px solid #e2e8f0;
    border-radius: var(--radius); padding: 0.625rem 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.attr-def-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.08); }
.attr-def-handle { flex-shrink: 0; color: #94a3b8; display: flex; cursor: grab; }
.attr-def-name { flex: 0 0 180px; min-width: 120px; }
.attr-def-vals { flex: 1; min-width: 150px; }
@media (max-width: 640px) {
    .attr-def-row { flex-wrap: wrap; }
    .attr-def-name { flex: 1 1 100%; min-width: 0; }
    .attr-def-vals { flex: 1 1 100%; min-width: 0; }
    .attr-def-handle { display: none; }
}
.btn-remove-attr {
    flex-shrink: 0;
    background: none; border: none; color: #94a3b8; font-size: 1.2rem;
    cursor: pointer; padding: 0.25rem; line-height: 1; border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.btn-remove-attr:hover { background: #fee2e2; color: var(--danger); }
.attr-builder-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.attr-builder-actions .btn { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ── Variant Grid (Card Layout) ── */
.variant-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}
@media (max-width: 640px) {
    .variant-grid { grid-template-columns: 1fr; }
}
.variant-card {
    position: relative;
    background: var(--bg-alt); border: 1px solid #e2e8f0;
    border-radius: var(--radius); padding: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.variant-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.variant-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.08); }
.variant-card-remove {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: none; border: none; color: #94a3b8;
    cursor: pointer; padding: 0.25rem; line-height: 1; border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.variant-card-remove:hover { background: #fee2e2; color: var(--danger); }
.variant-card-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.75rem; padding-right: 1.5rem; }

/* Variant tags */
.variant-tag {
    display: inline-flex; align-items: center; gap: 0.15rem;
    font-size: 0.72rem; font-weight: 600;
    padding: 0.25rem 0.5rem; border-radius: 4px;
    background: #e0f2fe; color: #075985;
}
.vt-label { font-weight: 400; color: #0369a1; }
.variant-tag--none { background: #f1f5f9; color: #94a3b8; font-weight: 400; }

/* Variant card fields */
.variant-card-fields { display: flex; gap: 0.5rem; }
@media (max-width: 640px) {
    .variant-card-fields { flex-direction: column; }
}
.vfield { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.vfield label { font-size: 0.68rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; }
.vfield .form-input {
    font-size: 0.8125rem; padding: 0.4rem 0.5rem;
    border: 1px solid #e2e8f0; border-radius: 4px; width: 100%;
    background: var(--bg-alt); color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.vfield .form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.08); outline: none; }
.vfield--sm { flex: 0 0 70px; }
.form-input--file { padding: 0.3rem; font-size: 0.75rem; cursor: pointer; }
.variant-image-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; margin-top: 0.25rem; border: 1px solid #e2e8f0; }
.file-upload-area--sm { padding: 0.75rem; }
@media (max-width: 640px) {
    .vfield--sm { flex: 1; }
}

/* Empty state */
.variant-empty {
    text-align: center; padding: 3rem 1rem; color: var(--text-muted);
    background: var(--bg-muted); border-radius: var(--radius); border: 1px dashed #e2e8f0;
}
.variant-empty-icon { margin-bottom: 1rem; opacity: 0.6; }
.variant-empty-text { font-size: 0.875rem; margin: 0; line-height: 1.5; }
.variant-empty-text strong { color: #475569; }

/* =============================================
   Product Form (pf-*) — Premium, Mobile-First
   ============================================= */
.pf-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
@media (min-width: 900px) {
    .pf-form { max-width: 1040px; margin: 0 auto; }
}

.pf-pair {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .pf-pair { grid-template-columns: 1fr 1fr; }
}
.pf-section {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
@media (min-width: 768px) {
    .pf-section { padding: 1.5rem; }
}
.pf-section--stack > .pf-section-title {
    margin-bottom: 0.75rem;
}
.pf-section--stack > .pf-section-title:first-child {
    margin-bottom: 1rem;
}
.pf-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1rem 0;
}
.pf-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pf-section-title svg { flex-shrink: 0; color: var(--text-muted); width: 18px; height: 18px; }
.pf-section-title--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pf-section-title--row > div { display: flex; align-items: center; gap: 8px; }
.pf-section-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2px;
}
.pf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.pf-field { margin-bottom: 0.875rem; }
.pf-field:last-child { margin-bottom: 0; }
.pf-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}
.pf-field input[type="text"],
.pf-field input[type="number"],
.pf-field input[type="tel"],
.pf-field select,
.pf-field textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.pf-field input:focus,
.pf-field select:focus,
.pf-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.pf-field textarea { resize: vertical; min-height: 72px; line-height: 1.6; font-size: 0.875rem; }
.pf-field--grow { flex: 1; }
.pf-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; display: block; line-height: 1.4; }
.pf-hint a { color: var(--primary); text-decoration: none; font-weight: 500; }
.pf-hint a:hover { text-decoration: underline; }
.pf-row { display: flex; gap: 0.75rem; }
.pf-row--2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .pf-row--2 { grid-template-columns: 1fr 1fr; }
}

/* Image row */
.pf-img-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.pf-img-preview {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f8fafc;
}
.pf-img-preview img { width: 100%; height: 100%; object-fit: cover; }
.pf-file-drop {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: #fafbfc;
}
.pf-file-drop:hover {
    border-color: var(--primary);
    background: rgba(37,99,235,0.04);
}
.pf-file-drop svg { flex-shrink: 0; color: #94a3b8; }

/* Attribute builder */
.pf-attr-builder {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}
.pf-attr-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
@media (min-width: 480px) {
    .pf-attr-row { grid-template-columns: 1fr 2fr auto; }
}
.pf-attr-row input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.pf-attr-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }
.pf-btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.pf-btn-icon:hover { background: #f1f5f9; }
.pf-btn-icon--danger:hover { background: #fee2e2; color: #dc2626; }
.pf-attr-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Variants */
.pf-variant-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.pf-variant-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1rem 1rem 1.125rem;
    position: relative;
    transition: border-color 0.15s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pf-variant-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.pf-variant-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.pf-variant-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.pf-variant-remove:hover { background: #fee2e2; color: #dc2626; }
.pf-variant-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding-right: 30px;
}
.pf-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 600;
}
.pf-tag--muted { background: #f1f5f9; color: #94a3b8; font-weight: 500; }
.pf-tag-key { font-weight: 400; color: #818cf8; }
.pf-variant-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    word-break: break-word;
}
.pf-variant-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}
@media (min-width: 600px) {
    .pf-variant-pricing { grid-template-columns: 1fr 1fr 1fr; }
}
.pf-variant-extra {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}
@media (min-width: 480px) {
    .pf-variant-extra { grid-template-columns: 1fr 1fr; }
}
.pf-vfield { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pf-vfield label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pf-vfield input,
.pf-vfield select {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}
.pf-vfield input:focus,
.pf-vfield select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }
.pf-vfield--sm { max-width: 100px; }
.pf-vfield-hint { font-size: 0.6875rem; color: var(--text-muted); line-height: 1.3; }
.pf-vfield--tags { grid-column: 1 / -1; }
.pf-tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; min-height: 38px; }
.pf-tag-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }
.pf-tag-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-tag-chip { display: inline-flex; align-items: center; gap: 2px; background: #e5e7eb; border-radius: 6px; padding: 2px 4px 2px 8px; font-size: 0.8125rem; line-height: 1.4; }
.pf-tag-chip-text { color: #374151; }
.pf-tag-chip-remove { background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1; color: #6b7280; padding: 0 2px; border-radius: 4px; }
.pf-tag-chip-remove:hover { color: #dc2626; background: #f3f4f6; }
.pf-tag-input-field { flex: 1; min-width: 80px; border: none; outline: none; font-size: 0.8125rem; padding: 2px 0; background: transparent; }
.related-products { margin-top: 2.5rem; }
.pf-variant-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    margin-top: 4px;
}
.pf-variant-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    text-align: center;
}
.pf-variant-placeholder p { font-size: 0.875rem; margin: 0; line-height: 1.6; max-width: 320px; }
.pf-variant-placeholder strong { color: #475569; }
.pf-variant-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    text-align: center;
}
.pf-variant-empty p { font-size: 0.875rem; margin: 0; line-height: 1.6; max-width: 320px; }
.pf-variant-empty strong { color: #475569; }

/* Toggle */
.pf-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.pf-toggle-label { font-size: 0.9375rem; font-weight: 500; color: #1e293b; }
.pf-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    border: none;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.pf-toggle--on { background: #16a34a; }
.pf-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.pf-toggle--on .pf-toggle-knob { left: 22px; }

/* Vertical image layout inside pair */
.pf-img-row--vert {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.pf-img-row--vert .pf-img-preview {
    width: 96px;
    height: 96px;
}
.pf-img-row--vert .pf-field--grow {
    width: 100%;
}

/* Actions */
.pf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.25rem;
    flex-wrap: wrap;
}
@media (max-width: 480px) {
    .pf-actions { flex-direction: column-reverse; }
    .pf-actions .btn { width: 100%; justify-content: center; }
}

/* ── Responsive tweaks ── */
@media (max-width: 520px) {
    .pf-form { gap: 1rem; }
    .pf-pair { gap: 1rem; }
    .pf-section { padding: 1rem; }
    .pf-file-drop { padding: 0.6rem 0.75rem; font-size: 0.8125rem; }
    .pf-toggle-label { font-size: 0.875rem; }
}
@media (max-width: 440px) {
    .pf-variant-pricing { grid-template-columns: 1fr; }
    .pf-img-preview { width: 72px; height: 72px; }
    .pf-img-row--vert .pf-img-preview { width: 80px; height: 80px; }
}

/* =============================================
   Seller Order Management
   ============================================= */
.order-card { padding: 0; overflow: hidden; }
.order-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.order-id { font-weight: 700; font-size: 1.05rem; }
.order-date { font-size: 0.78rem; color: var(--text-muted); margin-left: 0.5rem; }
.order-card-meta { display: flex; align-items: center; gap: 0.5rem; }
.order-card-section { padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.order-card-section:last-child { border-bottom: none; }

.order-card-customer {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; flex-wrap: wrap; margin-bottom: 0.5rem;
}
.order-customer-icon { color: var(--primary); display: flex; align-items: center; }
.order-customer-phone { font-size: 0.8rem; color: var(--text-muted); }
.order-payment-badge {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    padding: 0.125rem 0.45rem; border-radius: 999px;
    background: #e2e8f0; color: #475569;
}
.order-address {
    display: flex; align-items: flex-start; gap: 0.35rem;
    font-size: 0.8rem; color: var(--text-muted);
}
.order-address svg { flex-shrink: 0; margin-top: 0.15rem; color: #94a3b8; }

.seller-table .col-num { text-align: right; white-space: nowrap; }
.order-total { text-align: right; padding-top: 0.5rem; font-size: 0.95rem; }

/* ── Order item card ── */
.order-item-card {
    display: flex;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.order-item-card:last-child { border-bottom: none; }
.order-item-img {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-body { flex: 1; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.order-item-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.order-item-name {
    background: none; border: none; padding: 0;
    font: inherit; font-weight: 600; font-size: .85rem; color: #1e293b;
    cursor: pointer; text-align: left;
}
.order-item-name:hover { color: #2563eb; }
.order-item-sku { font-size: .7rem; color: #94a3b8; }
.order-item-bottom {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.order-item-qty { font-size: .8rem; color: #64748b; }
.order-item-price { font-size: .8rem; color: #475569; }
.order-item-subtotal { font-size: .85rem; font-weight: 700; color: #0f172a; margin-left: auto; }

/* Notes & ETA display */
.order-card-extra {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    background: #fffbeb; border-bottom: 1px solid #fde68a;
}
.extra-label {
    display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #92400e; margin-bottom: 0.15rem;
}
.order-notes-display p { margin: 0; font-size: 0.85rem; color: #78350f; }
.order-eta-display span:last-child { font-size: 0.85rem; font-weight: 600; color: #92400e; }

/* Status form */
.order-card-action { background: #fafafa; }
.order-card-final { text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.order-final-label strong { text-transform: uppercase; }
.order-status-form { display: flex; flex-direction: column; gap: 0.75rem; }
.order-form-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.order-form-field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 160px; }
.order-form-field label { font-size: 0.75rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: 0.03em; }
.order-form-field--grow { flex: 1; min-width: 240px; }
.order-form-field textarea { resize: vertical; }
.order-form-actions {
    display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end;
}

/* Spinner */
.order-spinner { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--text-muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* Mini ETA badge on dashboard */
.seller-order-row-main { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.order-eta-mini {
    font-size: 0.7rem; font-weight: 600;
    padding: 0.1rem 0.35rem; border-radius: 4px;
    background: #fef3c7; color: #92400e;
    white-space: nowrap;
}

/* =============================================
   Admin Panel
   ============================================= */
.admin-body { background: #f1f5f9; }
.admin-shell { display: flex; min-height: 100vh; }

/* Admin Sidebar */
.admin-sidebar {
    width: 240px;
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.25s ease;
}
.admin-sidebar-header {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid #1e293b;
}
.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}
.admin-logo-img { height: 28px; width: auto; }
.admin-sidebar-nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; }
.admin-nav-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.625rem 1.25rem;
    color: #cbd5e1; text-decoration: none; font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}
.admin-nav-item:hover { background: #1e293b; color: #fff; }
.admin-nav-item.active { background: #1e293b; color: #fff; font-weight: 600; border-right: 3px solid var(--primary); }
.admin-sidebar-footer { border-top: 1px solid #1e293b; padding: 0.75rem 0; }
.admin-nav-item--logout:hover { color: #ef4444; }

/* Sidebar toggle (mobile) */
.admin-sidebar-toggle {
    display: none;
    position: fixed; top: 0.75rem; left: 0.75rem; z-index: 101;
    background: var(--bg); border: 1px solid #e2e8f0;
    border-radius: var(--radius); padding: 0.375rem 0.5rem;
    cursor: pointer; color: var(--text);
}
@media (max-width: 767px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .admin-main { margin-left: 0 !important; padding-top: 3.5rem !important; }
}

/* Admin main content */
.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}
@media (max-width: 767px) {
    .admin-main { padding: 1rem; }
}

/* Admin page header */
.admin-page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem;
}
.admin-page-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.15rem; }
.admin-page-subtitle { font-size: 0.85rem; color: var(--text-muted); }

/* Admin stats grid */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
}
.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.admin-stat-icon--blue { background: #dbeafe; color: #2563eb; }
.admin-stat-icon--green { background: #d1fae5; color: #059669; }
.admin-stat-icon--purple { background: #ede9fe; color: #7c3aed; }
.admin-stat-icon--amber { background: #fef3c7; color: #d97706; }
.admin-stat-icon--red { background: #fee2e2; color: #dc2626; }
.admin-stat-icon--teal { background: #ccfbf1; color: #0d9488; }
.admin-stat-info { display: flex; flex-direction: column; }
.admin-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.admin-stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Admin grid */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .admin-grid { grid-template-columns: 1fr; }
}

/* Admin cards */
.admin-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.admin-card-header h3 { font-size: 0.9375rem; font-weight: 600; margin: 0; }
.admin-card-link {
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.admin-card-link:hover { text-decoration: underline; }
.admin-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Admin list items */
.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.admin-list-item:last-child { border-bottom: none; }
.admin-list-info { display: flex; align-items: center; gap: 0.5rem; }
.admin-list-date { font-size: 0.8rem; color: var(--text-muted); }

/* Admin badges */
.admin-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: capitalize;
}
.admin-badge--customer { background: #e2e8f0; color: #475569; }
.admin-badge--seller { background: #dbeafe; color: #1d4ed8; }
.admin-badge--delivery { background: #d1fae5; color: #065f46; }
.admin-badge--staff { background: #ede9fe; color: #6d28d9; }
.admin-badge--admin { background: #fee2e2; color: #991b1b; }
.admin-badge--pending { background: #fef3c7; color: #92400e; }
.admin-badge--approved { background: #d1fae5; color: #065f46; }
.admin-badge--rejected { background: #fee2e2; color: #991b1b; }
.admin-badge--green { background: #d1fae5; color: #065f46; }
.admin-badge--red { background: #fee2e2; color: #991b1b; }
.admin-badge--active { background: #d1fae5; color: #065f46; }
.admin-badge--inactive { background: #fee2e2; color: #991b1b; }

/* Admin table */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.admin-table tbody tr:hover { background: #f8fafc; }
.admin-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.admin-link:hover { text-decoration: underline; }

/* Admin tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}
.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab--active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.admin-tab-count {
    font-size: 0.75rem;
    background: #e2e8f0;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
}
.admin-tab--active .admin-tab-count {
    background: var(--primary-light);
    color: var(--primary);
}

/* Admin request card */
.admin-request-card {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.admin-request-card:last-child { border-bottom: none; }
.admin-request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.admin-request-header h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem; }
.admin-request-meta { font-size: 0.8125rem; color: var(--text-muted); }
.admin-request-desc { font-size: 0.9375rem; color: var(--text); margin-bottom: 0.5rem; }
.admin-request-location { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.admin-request-date { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 1rem; }
.admin-request-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Admin request actions */
.admin-request-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.admin-approve-form, .admin-reject-form {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.admin-approve-form .form-row { margin-bottom: 0; flex: 1; min-width: 200px; }
.admin-request-btns { display: flex; gap: 0.5rem; }

/* Admin filters */
.admin-filters {
    margin-bottom: 1.5rem;
}
.admin-filter-form { display: block; }
.admin-filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.admin-filter-group .form-input { width: auto; min-width: 150px; }

/* Inline form */
.inline-form { display: inline-flex; align-items: center; }
.form-input--sm { padding: 0.35rem 0.5rem; font-size: 0.8125rem; }

/* Admin banner management */
.admin-banner-item {
    border-bottom: 1px solid #e2e8f0;
}
.admin-banner-item:last-child { border-bottom: none; }
.admin-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    gap: 0.5rem;
}
.admin-banner-preview {
    padding: 0 1.25rem 0.875rem;
    max-height: 160px;
    overflow: hidden;
    position: relative;
}
.admin-banner-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}
.admin-banner-preview > * {
    max-width: 100%;
    overflow: hidden;
}
.admin-banner-preview img,
.admin-banner-preview svg {
    max-height: 120px;
}
.admin-banner-edit {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.admin-banner-edit-open {
    max-height: 800px;
}
.banner-content-editor {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    tab-size: 2;
    min-height: 120px;
    resize: vertical;
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    padding: 0.75rem;
}
.banner-content-editor:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    outline: none;
}
@media (max-width: 640px) {
    .admin-banner-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 1rem;
    }
    .admin-banner-header > div:last-child {
        width: 100%;
        display: flex;
        gap: 0.35rem;
        flex-wrap: wrap;
    }
    .admin-banner-preview {
        padding: 0 1rem 0.75rem;
    }
    .banner-content-editor {
        font-size: 0.75rem;
        min-height: 100px;
    }
}

/* =============================================
   Checkout Page
   ============================================= */
.page-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem var(--gap);
}
.page-container .seller-page-header {
    margin-bottom: 1.25rem;
}

/* Layout: details + summary side by side on desktop, stacked on mobile */
.checkout-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .checkout-layout { grid-template-columns: 1fr 380px; }
}

.checkout-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Section cards */
.checkout-section {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.checkout-section h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.checkout-section h3 .section-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Form fields inside checkout */
.checkout-field {
    margin-bottom: 0.875rem;
}
.checkout-field:last-child {
    margin-bottom: 0;
}
.checkout-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}
.checkout-field .form-input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-alt);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.checkout-field .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}
.checkout-field .form-input[readonly] {
    background: var(--bg-muted);
    color: var(--text-muted);
}
.checkout-field textarea.form-input {
    min-height: 80px;
    resize: vertical;
}
@media (max-width: 767px) {
    .checkout-field .form-input {
        font-size: 16px; /* prevent iOS zoom */
        padding: 0.875rem 0.875rem;
    }
}

/* User info row (readonly fields) */
.checkout-user-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}
@media (max-width: 480px) {
    .checkout-user-row { grid-template-columns: 1fr; }
}
.checkout-user-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.checkout-user-field .form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background: var(--bg-muted);
    color: var(--text);
}

/* Payment options — grid on desktop, stacked on mobile */
.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}
@media (max-width: 480px) {
    .payment-options { grid-template-columns: 1fr; }
}
.payment-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.payment-option:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.payment-option:active {
    transform: scale(0.98);
}
.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary);
}
.payment-option input { display: none; }
.payment-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
}
.payment-icon { font-size: 1.5rem; line-height: 1; }

/* Order Summary — sticky sidebar on desktop, sticky bottom bar on mobile */
.checkout-summary {
    position: relative;
}
@media (min-width: 768px) {
    .checkout-summary-inner {
        position: sticky;
        top: calc(var(--header-h) + 1rem);
    }
}
.checkout-summary-card {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

/* Item list in summary */
.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    max-height: 280px;
    overflow-y: auto;
}
.checkout-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.checkout-item-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-muted);
}
.checkout-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.checkout-item-info {
    flex: 1;
    min-width: 0;
}
.checkout-item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.checkout-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}
.checkout-item-total {
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
    color: var(--text);
}

/* Totals */
.checkout-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}
.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.checkout-total-grand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    padding-top: 0.625rem;
    border-top: 2px solid #e2e8f0;
    margin-top: 0.25rem;
}
.checkout-shipping-free {
    color: var(--success);
    font-weight: 600;
}

/* Place Order button */
.checkout-submit-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    justify-content: center;
}

/* Mobile sticky bottom bar */
.checkout-mobile-bar {
    display: none;
    position: fixed;
    bottom: 56px; /* above bottom-nav */
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-alt);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    padding: 0.75rem var(--gap);
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
}
@media (max-width: 767px) {
    .checkout-mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
    .checkout-layout { padding-bottom: 0; }
    .checkout-summary-card { border: none; border-radius: 0; padding: 0; background: transparent; }
    .checkout-submit-btn { display: none; }
    .checkout-items { max-height: 0; overflow: hidden; margin: 0; padding: 0; border: none; }
    .checkout-totals { display: none; }
}
.checkout-mobile-total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.checkout-mobile-total small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}
.checkout-mobile-btn {
    flex: 1;
    max-width: 280px;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    justify-content: center;
}

/* Error alert */
.checkout-error {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.checkout-error svg { flex-shrink: 0; }

/* Empty state */
.checkout-empty {
    text-align: center;
    padding: 3rem 1rem;
}
.checkout-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.checkout-empty p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Back link on mobile */
@media (max-width: 767px) {
    .checkout-back-link {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-muted);
        text-decoration: none;
        padding: 0.5rem 0;
        margin-bottom: 0.5rem;
        -webkit-tap-highlight-color: transparent;
    }
    .checkout-back-link:active { color: var(--primary); }
    .checkout-page-header-mobile { display: none; }
}
@media (min-width: 768px) {
    .checkout-back-link { display: none; }
    .checkout-page-header-mobile { display: block; }
}

/* =============================================
   Order Confirmation
   ============================================= */
.confirmation-page {
    text-align: center;
    padding: 1.5rem 0 3rem;
    max-width: 560px;
    margin: 0 auto;
}
.confirmation-icon {
    margin-bottom: 1rem;
    animation: confirmPop 0.4s ease;
}
@keyframes confirmPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
.confirmation-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text);
}
.confirmation-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}
.confirmation-card {
    text-align: left;
}
.confirmation-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.confirmation-order-info {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.confirmation-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    gap: 1rem;
}
.confirmation-info-row > span:first-child {
    color: var(--text-muted);
    white-space: nowrap;
}
.confirmation-info-row > strong:last-child,
.confirmation-info-row > span:last-child {
    text-align: right;
}
.confirmation-address {
    text-align: right;
    max-width: 280px;
    line-height: 1.4;
}
.confirmation-info-total {
    padding-top: 0.625rem;
    border-top: 1px solid #e2e8f0;
    font-size: 1.125rem;
}
.confirmation-items-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}
.confirmation-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.confirmation-item:last-child { border-bottom: none; }
.confirmation-item-info { text-align: left; min-width: 0; flex: 1; }
.confirmation-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.confirmation-item-name:hover { color: var(--primary); }
.confirmation-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.125rem; }
.confirmation-item-total { font-weight: 700; font-size: 0.875rem; white-space: nowrap; }
.confirmation-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}
@media (max-width: 480px) {
    .confirmation-actions { flex-direction: column; }
    .confirmation-actions .btn { width: 100%; justify-content: center; }
    .confirmation-address { max-width: 160px; }
}

/* =============================================
   Status Timeline (Order Updates)
   ============================================= */
.status-timeline {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
    text-align: left;
}
.status-timeline h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.timeline-item {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.875rem;
    top: 1.75rem;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
.timeline-item:last-child::before { display: none; }
.timeline-item--completed::before { background: #22c55e; }
.timeline-item--current::before { background: #e2e8f0; }
.timeline-icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.timeline-icon--completed {
    background: #22c55e;
    color: #fff;
}
.timeline-icon--current {
    background: #3b82f6;
    color: #fff;
}
.timeline-icon--pending {
    background: #fff;
    color: #94a3b8;
    border: 2px solid #cbd5e1;
}
.timeline-icon--cancelled {
    background: #ef4444;
    color: #fff;
}
.timeline-content {
    flex: 1;
    min-width: 0;
    padding-top: 0.125rem;
}
.timeline-content strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text);
}
.timeline-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}
.timeline-note {
    font-size: 0.8125rem;
    color: #475569;
    margin-top: 0.25rem;
    line-height: 1.5;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid #3b82f6;
}
.timeline-item--cancelled .timeline-note {
    border-left-color: #ef4444;
}
.timeline-item--adjustment .timeline-icon--adjustment {
    background: #f59e0b;
    color: #fff;
}
.timeline-note--adjustment {
    border-left-color: #f59e0b;
    background: #fffbeb;
}
@media (max-width: 480px) {
    .timeline-icon { width: 1.5rem; height: 1.5rem; }
    .timeline-item::before { left: 0.75rem; }
    .timeline-note { font-size: 0.75rem; padding: 0.375rem 0.625rem; }
}

/* =============================================
   Time Adjustment (Seller)
   ============================================= */
.time-adjust-details {
    margin-top: 0.625rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.625rem;
}
.time-adjust-summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0;
}
.time-adjust-summary:hover { color: var(--primary); }
.time-adjust-body {
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.time-adjust-current {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.time-adjust-inputs {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}
.time-adjust-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 80px;
}
.time-adjust-field span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}
.time-adjust-field input {
    text-align: center;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
}

/* =============================================
   Seller v2 – Modern, Mobile-First
   ============================================= */

/* ── Two-tone sidebar v2 ── */
.seller-body { background: #f8fafc; }
.seller-shell {
    min-height: 100vh;
    display: flex;
}
.seller-sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform .25s ease;
}
.seller-sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.seller-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}
.seller-logo-img { width: 28px; height: 28px; filter: brightness(0) invert(1); }
.seller-logo span { color: #94a3b8; }
.seller-sidebar-shop {
    display: block;
    margin-top: .5rem;
    font-size: .75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.seller-sidebar-nav {
    flex: 1;
    padding: .75rem 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.seller-nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1.25rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.seller-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.seller-nav-item.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-left-color: #3b82f6;
}
.seller-nav-item svg { flex-shrink: 0; opacity: .7; }
.seller-nav-item.active svg { opacity: 1; }
.seller-nav-item--back { margin-top: auto; }
.seller-nav-item--logout { color: #fca5a5; }
.seller-nav-item--logout:hover { background: rgba(239,68,68,.12); color: #fca5a5; }

/* ── Mobile top bar ── */
.seller-topbar {
    display: none;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 90;
}
.seller-topbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
}
.seller-topbar-title {
    font-size: .9375rem;
    font-weight: 600;
    color: #0f172a;
    flex: 1;
}

/* ── Seller main ── */
.seller-main {
    flex: 1;
    margin-left: 250px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
    background: #f8fafc;
}

/* ── Mobile bottom nav (seller) ── */
.seller-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: .375rem 0 env(safe-area-inset-bottom,0);
    justify-content: space-around;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.seller-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: .375rem .5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: .625rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all .15s;
    min-width: 56px;
    text-align: center;
}
.seller-bottom-nav-item.active { color: #3b82f6; }
.seller-bottom-nav-item svg { width: 22px; height: 22px; }

/* ── Profile Page (Facebook-style) ── */
.profile-page {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* Cover */
.profile-cover {
    position: relative;
    height: 280px;
    background: #e2e8f0;
    overflow: hidden;
}
.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255,255,255,.5);
    font-size: .875rem;
}
.profile-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.5) 100%);
    pointer-events: none;
}
.profile-cover-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .4rem .75rem;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,.9);
    color: #1e293b;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    transition: background .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.profile-cover-btn:hover { background: #fff; }

/* Avatar row */
.profile-avatar-row {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 1.5rem;
    margin-top: -60px;
    z-index: 2;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    position: relative;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #64748b;
    background: #cbd5e1;
}
.profile-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #3b82f6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: background .15s;
}
.profile-avatar-btn:hover { background: #2563eb; }
.profile-avatar-btn svg { width: 14px; height: 14px; }

/* Profile info */
.profile-info {
    padding: .75rem 1.5rem 1rem;
}
.profile-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}
.profile-info-desc {
    color: #475569;
    font-size: .9375rem;
    margin-top: .125rem;
}
.profile-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin-top: .5rem;
    font-size: .875rem;
    color: #64748b;
}
.profile-info-meta span { display: flex; align-items: center; gap: .3rem; }

/* Profile tabs */
.profile-tabs {
    display: flex;
    border-top: 1px solid #e2e8f0;
    padding: 0 1.5rem;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.profile-tab {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .75rem 1rem;
    color: #64748b;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    white-space: nowrap;
}
.profile-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }
.profile-tab:hover { color: #1e293b; background: #f8fafc; }

/* Profile body (tab content) */
.profile-body {
    padding: 1.5rem;
}
.profile-body h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

/* ── Shop Settings inline ── */
.profile-settings-section {
    margin-bottom: 1.5rem;
}
.profile-settings-section h3 {
    font-size: .9375rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Sidebar backdrop ── */
.seller-sidebar-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.seller-sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
}
@media (min-width: 768px) {
    .seller-sidebar-backdrop { display: none !important; }
}

/* ── Mobile responsive seller ── */
@media (max-width: 767px) {
    .seller-shell {
        flex-direction: column;
    }
    .seller-sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s ease;
    }
    .seller-sidebar.open {
        transform: translateX(0);
        visibility: visible;
    }
    .seller-topbar {
        display: flex;
    }
    .seller-bottom-nav {
        display: flex;
    }
    .seller-main {
        margin-left: 0 !important;
        padding: 1rem 1rem 5rem !important;
    }
    .profile-cover { height: 180px; }
    .profile-avatar { width: 88px; height: 88px; }
    .profile-avatar-row { margin-top: -44px; padding: 0 1rem; }
    .profile-avatar-placeholder { font-size: 1.75rem; }
    .profile-info { padding: .5rem 1rem .75rem; }
    .profile-info h1 { font-size: 1.25rem; }
    .profile-tabs { padding: 0 1rem; }
    .profile-tab { padding: .625rem .75rem; font-size: .8125rem; }
    .profile-body { padding: 1rem; }
    .seller-page-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .seller-bottom-nav { padding-bottom: env(safe-area-inset-bottom,0); }
}

/* ── Dashboard v2 ── */
.seller-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.seller-page-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
}
.seller-page-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.seller-page-subtitle {
    font-size: .8125rem;
    color: #64748b;
    margin-top: 2px;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: #0f172a; display: block; }
.stat-label { font-size: .75rem; color: #64748b; margin-top: 2px; display: block; }
.seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}
.seller-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
}
.seller-card h3 { font-size: .9375rem; font-weight: 600; color: #0f172a; margin-bottom: .75rem; }

/* ── About tab content ── */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.about-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.about-row:last-child { border-bottom: none; }
.about-row svg { flex-shrink: 0; color: #94a3b8; margin-top: 2px; }
.about-row-label { font-size: .75rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; min-width: 80px; }
.about-row-value { font-size: .875rem; color: #334155; }

/* ── Settings tab content ── */
.settings-form-compact {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.settings-form-compact .form-input--sm { min-width: 0; flex: 1; }
.settings-list {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.settings-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: .8125rem;
}
.settings-list-item-name { font-weight: 500; color: #1e293b; }
.settings-list-item-sub { font-size: .75rem; color: #94a3b8; }

/* ── Table overflow fix ── */
.seller-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.seller-table-wrap table { min-width: 600px; }

/* ── Seller product detail modal ── */
.seller-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    padding: 1rem;
}
.seller-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.seller-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.seller-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.seller-modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}
.seller-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.seller-modal-close:hover { background: #e2e8f0; color: #0f172a; }
.seller-modal-body {
    overflow-y: auto;
    padding: 1.25rem;
}

.seller-product-detail-main {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.seller-product-detail-image {
    width: 160px;
    min-width: 160px;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}
.seller-product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.seller-product-detail-info { flex: 1; }
.seller-product-detail-info h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .25rem;
}
.seller-product-detail-cat {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: .5rem;
}
.seller-product-detail-desc {
    font-size: .8125rem;
    color: #475569;
    line-height: 1.6;
    margin: .5rem 0 1rem;
}
.seller-product-detail-variants h3 {
    font-size: .9375rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 .75rem;
}

@media (max-width: 500px) {
    .seller-product-detail-main {
        flex-direction: column;
    }
    .seller-product-detail-image {
        width: 100%;
        min-width: 0;
        height: 200px;
    }
}

/* ── Seller product name button (looks like link) ── */
.seller-product-name-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #2563eb;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: .875rem;
    text-align: left;
}
.seller-product-name-btn:hover { color: #1d4ed8; text-decoration: underline; }

/* ── Product card image/title buttons (my-shop) ── */
.product-card-img-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}
.product-card-img-btn img { display: block; width: 100%; }
.product-title-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}
.product-title-btn:hover { color: #2563eb; }
