:root {
    --primary: #16a085;
    --primary-dark: #0b7f6a;
    --primary-soft: #c8f3ea;
    --secondary: #e9f8f5;
    --accent: #2f80ed;
    --accent-strong: #118ab2;
    --bg: #f8fbff;
    --section: #eef7ff;
    --surface: #ffffff;
    --soft: #f5f8fb;
    --line: #dde5ee;
    --line-strong: #c7d7e8;
    --ink: #14213d;
    --muted: #667085;
    --success: #62b179;
    --success-soft: #eaf8ed;
    --warning: #f7b32b;
    --error: #e85d75;
    --error-soft: #fff0f2;
    --blue: #2f80ed;
    --violet: #9b6ad6;
    --radius: 8px;
    --shadow: 0 18px 44px rgba(20, 33, 61, .12);
    --shadow-soft: 0 10px 24px rgba(20, 33, 61, .08);
    --focus: 0 0 0 4px rgba(17, 138, 178, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(202, 243, 234, .58), transparent 32rem),
        linear-gradient(180deg, #f7fbff 0, var(--bg) 42rem, #fff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.skip-link {
    position: fixed;
    left: 16px;
    top: 12px;
    z-index: 90;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: var(--radius);
    color: #fff;
    background: var(--ink);
    transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(210px, auto) minmax(280px, 620px) minmax(240px, auto);
    gap: 18px;
    align-items: center;
    padding: 12px clamp(16px, 4vw, 56px);
    border-bottom: 1px solid rgba(221, 229, 238, .86);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.topbar.is-scrolled {
    border-color: transparent;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-soft);
}

.topbar-left,
.brand,
.nav-actions,
.top-search,
.hero-search,
.hero-actions,
.hero-metrics,
.price-row,
.card-actions,
.footer-links,
.footer-mini,
.chip-row,
.preview-toolbar,
.shop-mini,
.shop-profile-link,
.buy-actions,
.inline-actions,
.check-row,
.map-toolbar,
.map-shop-row,
.invoice-head,
.products-result-head,
.cart-item-main,
.qty-stepper,
.payment-card {
    display: flex;
    align-items: center;
}

.topbar-left { gap: 12px; min-width: 0; }
.brand { gap: 10px; min-width: 0; font-size: 1.15rem; font-weight: 900; }
.brand-logo { display: block !important; width: 32px !important; height: 32px !important; max-width: 32px !important; max-height: 32px !important; min-width: 32px !important; min-height: 32px !important; object-fit: contain !important; flex: 0 0 32px !important; flex-shrink: 0 !important; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand-mark,
.shop-logo,
.shop-profile-link span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent-strong));
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(17, 138, 178, .18);
}

.menu-toggle,
.sidebar-close {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 18px rgba(20, 33, 61, .06);
}
.menu-toggle { gap: 4px; }
.menu-toggle span,
.sidebar-close span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
}
.sidebar-close { position: relative; }
.sidebar-close span { position: absolute; }
.sidebar-close span:first-child { transform: rotate(45deg); }
.sidebar-close span:last-child { transform: rotate(-45deg); }

.top-search {
    justify-self: center;
    width: 100%;
    max-width: 520px;
    height: 46px;
    gap: 10px;
    padding: 0 7px 0 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(20, 33, 61, .05);
    transition: max-width .24s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.top-search:focus-within {
    max-width: 650px;
    border-color: var(--primary);
    background: #fff;
    box-shadow: var(--focus), var(--shadow-soft);
}
.top-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
}
.search-glyph {
    position: relative;
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border: 2px solid var(--primary-dark);
    border-radius: 50%;
}
.search-glyph::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-dark);
    transform: rotate(45deg);
}

.advanced-btn,
.ghost-btn,
.solid-btn,
button,
.secondary-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 15px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    line-height: 1;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.advanced-btn {
    flex: 0 0 auto;
    padding: 9px 13px;
    color: var(--primary-dark);
    background: var(--secondary);
    border-color: var(--primary-soft);
}
.solid-btn,
button,
.buy-now {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent-strong));
    border-color: transparent;
    box-shadow: 0 12px 20px rgba(17, 138, 178, .16);
}
.solid-btn:hover,
button:hover,
.buy-now:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--accent-strong), var(--primary-dark));
    box-shadow: 0 14px 24px rgba(10, 95, 82, .18);
}
.ghost-btn:hover,
.secondary-btn:hover,
.advanced-btn:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    background: var(--secondary);
    color: var(--primary-dark);
}
.full { display: block; width: 100%; text-align: center; }

.nav-actions {
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
}
.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-dark);
    background: var(--secondary);
    transform: translateY(-1px);
}
.inline-form { display: inline; margin: 0; }

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    background: rgba(61, 61, 61, .34);
    opacity: 0;
    transition: opacity .22s ease;
}
.site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(390px, calc(100vw - 28px));
    overflow-y: auto;
    padding: 16px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, var(--soft));
    box-shadow: 24px 0 50px rgba(20, 33, 61, .20);
    transform: translateX(-104%);
    transition: transform .25s ease;
}
body.sidebar-open { overflow: hidden; }
body.sidebar-open .site-sidebar { transform: translateX(0); }
body.sidebar-open .drawer-backdrop { pointer-events: auto; opacity: 1; }
.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
}
.sidebar-panel { padding: 16px 0; border-top: 1px solid var(--line); }
.sidebar-kicker {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.side-nav,
.side-actions { display: grid; gap: 9px; }
.side-link {
    display: grid;
    gap: 3px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.side-link:hover,
.side-link.is-active {
    transform: translateX(3px);
    border-color: var(--primary);
    background: var(--secondary);
    box-shadow: var(--shadow-soft);
}
.side-link span { font-weight: 900; }
.side-link small { color: var(--muted); }
.side-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.side-category {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 800;
}
.side-category span {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    background: var(--tile-color);
    font-size: .78rem;
}

.site-main { min-height: 60vh; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    gap: clamp(24px, 5vw, 62px);
    align-items: center;
    min-height: 560px;
    padding: 58px clamp(16px, 4vw, 56px) 48px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 88% 12%, rgba(47, 128, 237, .18), transparent 19rem),
        linear-gradient(115deg, rgba(202, 243, 234, .66) 0 36%, transparent 36% 100%),
        repeating-linear-gradient(135deg, rgba(17, 138, 178, .08) 0 1px, transparent 1px 18px),
        var(--bg);
}
.hero-copy { display: grid; gap: 18px; max-width: 760px; }
.eyebrow {
    margin: 0;
    color: var(--primary-dark);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.hero h1,
.page-head h1,
.dashboard h1,
.detail-copy h1 {
    margin: 0;
    font-size: 4.6rem;
    line-height: .96;
    letter-spacing: 0;
}
.hero p,
.page-head p,
.deal-copy p,
.detail-copy p {
    max-width: 690px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}
.hero-search { width: min(100%, 670px); gap: 10px; margin-top: 8px; }
.hero-search input {
    flex: 1;
    min-width: 0;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(20, 33, 61, .07);
}
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.filter-panel textarea:focus,
.auth-card input:focus,
.auth-card select:focus,
.panel-form input:focus,
.panel-form select:focus,
.panel-form textarea:focus,
.inline-actions input:focus,
.inline-actions select:focus,
.inline-actions textarea:focus,
.products-filter-panel input:focus,
.products-filter-panel select:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: var(--focus);
}
.hero-search button { min-height: 54px; padding-inline: 22px; }
.hero-actions { gap: 10px; flex-wrap: wrap; }
.quick-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.quick-category-row a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 11px 7px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(20, 33, 61, .05);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.quick-category-row a:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: #fff;
}
.quick-category-row span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: var(--tile-color);
    font-size: .76rem;
    font-weight: 900;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.hero-metrics div {
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 8px 18px rgba(20, 33, 61, .05);
}
.hero-metrics strong { display: block; font-size: 1.35rem; }
.hero-metrics span { color: var(--muted); font-size: .9rem; }

.hero-panel,
.summary-card,
.filter-panel,
.auth-card,
.panel-form,
.feature-card,
.category-tile,
.shop-card,
.dashboard-grid > div,
.product-card,
.map-toolbar,
.map-shop-row,
.products-filter-panel,
.products-result-head,
.invoice-card,
.review-card,
.spec-grid span {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.marketplace-preview { align-self: stretch; display: grid; align-content: center; gap: 6px; padding: 18px; }
.preview-toolbar { justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.preview-toolbar small { color: var(--muted); font-weight: 800; }
.live-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(98, 177, 121, .14);
}
.mini-result {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 5px 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.mini-result > span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    font-weight: 900;
}
.mini-result strong { align-self: end; }
.mini-result em { color: var(--muted); font-style: normal; }
.delivery-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
    padding: 14px;
    border-radius: var(--radius);
    color: var(--ink);
    background: linear-gradient(135deg, var(--secondary), #fff);
    border: 1px solid var(--line);
}
.delivery-card div { display: grid; gap: 2px; }
.delivery-card span { color: var(--muted); font-size: .9rem; }
.delivery-card a { color: var(--primary-dark); font-weight: 900; white-space: nowrap; }

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px clamp(16px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, var(--soft));
}
.feature-card {
    min-height: 126px;
    padding: 18px;
}
.feature-card span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 28px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    color: var(--primary-dark);
    background: var(--secondary);
    font-size: .78rem;
    font-weight: 900;
}
.feature-card strong { display: block; }
.feature-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }

.section,
.page-head,
.dashboard { padding: 38px clamp(16px, 4vw, 56px); }
.page-head {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 92% 0, rgba(202, 243, 234, .64), transparent 19rem),
        linear-gradient(120deg, #fff, var(--section));
}
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}
.section-title h2,
.deal-copy h2 { margin: 0; font-size: 2rem; line-height: 1.1; letter-spacing: 0; }
.section-title a,
.section-title span { color: var(--muted); font-weight: 800; }
.compact { margin-top: 20px; }

.deal-section { padding-top: 26px; padding-bottom: 26px; }
.deal-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    color: var(--ink);
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .75), transparent 12rem),
        linear-gradient(135deg, var(--primary-soft), var(--accent));
    box-shadow: var(--shadow);
}
.deal-banner .eyebrow { color: var(--primary-dark); }
.deal-copy p { color: rgba(61, 61, 61, .74); }
.deal-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.deal-pills a {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .66);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, .38);
    font-weight: 800;
}
.deal-stack { display: grid; gap: 9px; }
.deal-row {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .66);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .44);
}
.deal-row small { display: block; margin-top: 3px; color: var(--muted); }
.deal-row em { color: var(--primary-dark); font-style: normal; font-weight: 900; }
.deal-rank {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent-strong));
    font-weight: 900;
}

.category-grid,
.product-grid,
.shop-row,
.dashboard-grid { display: grid; gap: 16px; }
.category-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.category-tile {
    min-height: 132px;
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 18px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.category-tile span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--tile-color);
    font-weight: 900;
}
.shop-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-card,
.dashboard-grid > div {
    display: grid;
    gap: 10px;
    padding: 18px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.shop-card small,
.dashboard-grid p { color: var(--muted); line-height: 1.5; }
.shop-card:hover,
.product-card:hover,
.category-tile:hover,
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card {
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.rank-1 { border-color: rgba(22, 160, 133, .58); }
.rank-2 { border-color: rgba(47, 128, 237, .45); }
.product-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 190px;
    height: 190px;
    margin: 10px 10px 0;
    overflow: hidden;
    color: var(--primary-dark);
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}
.product-art img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: contain;
    padding: 18px;
    background: #fff;
    display: block;
}
.product-art > span:not(.product-badges) {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: var(--radius);
    background: var(--section);
    border: 1px solid var(--line);
    font-size: 1.9rem;
    font-weight: 900;
}
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}
.product-badges span {
    padding: 7px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(61, 61, 61, .78);
    font-size: .78rem;
    font-weight: 900;
    backdrop-filter: blur(8px);
}
.product-badges span:first-child {
    background: linear-gradient(135deg, var(--primary), var(--accent-strong));
}
.phone-case { background: linear-gradient(135deg, #2f80ed, #14213d); }
.phone-case-alt { background: linear-gradient(135deg, #7c3aed, #e85d75); }
.rice { background: linear-gradient(135deg, #77b255, #f7b32b); color: #17351e; }
.panjabi { background: linear-gradient(135deg, #16a085, #2f80ed); }
.aloe { background: linear-gradient(135deg, #16a085, #c8f3ea); color: #17351e; }
.lamp { background: linear-gradient(135deg, #f7b32b, #2f80ed); }
.default { background: linear-gradient(135deg, #43536a, #16a085); }

.card-body { display: grid; gap: 10px; padding: 15px; }
.card-kicker { color: var(--muted); font-size: .82rem; font-weight: 800; }
.card-title { display: block; min-height: 46px; font-size: 1rem; font-weight: 900; line-height: 1.35; }
.price-row { gap: 8px; flex-wrap: wrap; }
.price-row strong { font-size: 1.25rem; color: var(--primary-dark); }
.price-row del { color: var(--muted); }
.stock-meter {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--secondary);
}
.stock-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--accent));
}
.shop-mini,
.shop-profile-link { gap: 8px; color: var(--muted); font-weight: 800; }
.shop-mini span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: .75rem;
    font-weight: 900;
}
.meta-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-grid span,
.chip-row span,
.status-step,
.filter-chip,
.status-badge,
.verified-badge {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--primary-dark);
    font-size: .84rem;
    font-weight: 800;
}
.card-actions { gap: 8px; margin-top: 4px; }
.card-actions .cart-action { flex: 1; min-width: 118px; }
.card-actions .cart-action button { width: 100%; }
.card-link { display: inline-grid; place-items: center; min-height: 39px; }
.icon-btn {
    min-width: 58px;
    padding: 10px;
    color: var(--error);
    background: var(--error-soft);
    border-color: #ffd1d8;
    text-align: center;
    border-radius: 999px;
}

.search-layout,
.map-layout,
.cart-layout,
.product-detail,
.split {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 22px;
    padding: 24px clamp(16px, 4vw, 56px) 48px;
}
.filter-panel {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 14px;
    align-self: start;
    padding: 18px;
}
.filter-panel label,
.products-filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}
.filter-panel input,
.filter-panel select,
.filter-panel textarea,
.auth-card input,
.auth-card select,
.panel-form input,
.panel-form select,
.panel-form textarea,
.inline-actions input,
.inline-actions select,
.inline-actions textarea,
.products-filter-panel input,
.products-filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 12px;
    background: #fff;
}
.filter-panel textarea,
.panel-form textarea { min-height: 110px; resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.empty-state {
    padding: 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    background: #fff;
    font-weight: 800;
}

.products-browse { display: grid; gap: 18px; }
.products-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px;
}
.products-filter-panel input,
.products-filter-panel select { min-height: 42px; }
.products-stock-filter { align-self: end; min-height: 42px; padding: 0 4px; }
.products-filter-actions { display: flex; align-items: end; gap: 8px; }
.products-filter-actions button,
.products-filter-actions a { min-height: 42px; display: inline-grid; place-items: center; }
.products-result-head {
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
}
.products-result-head div { display: grid; gap: 3px; }
.products-result-head span { color: var(--muted); }
.active-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-detail {
    grid-template-columns: minmax(280px, 520px) 1fr;
    align-items: start;
}
.zoom-gallery { position: sticky; top: 84px; z-index: 4; }
.zoom-image {
    min-height: 460px;
    height: 460px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    transition: transform .2s ease, box-shadow .2s ease;
}
.zoom-image.product-art {
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
}
.zoom-image.product-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 26px;
    background: #fff;
}
.image-zoom-pane {
    position: absolute;
    top: 0;
    left: calc(100% + 18px);
    width: min(440px, 42vw);
    height: 460px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease;
}
.image-zoom-pane img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 26px;
    background: #fff;
    transform: scale(2.35);
    transform-origin: center center;
}
.zoom-gallery.is-zooming .image-zoom-pane {
    opacity: 1;
    visibility: visible;
}
.thumb-row { display: flex; gap: 10px; margin-top: 12px; }
.thumb-row button {
    width: 64px;
    height: 54px;
    border-radius: var(--radius);
    background: #fff;
    border-color: var(--line);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.thumb-row button:hover,
.thumb-row button.is-active {
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(22, 160, 133, .18);
    transform: translateY(-1px);
}
.thumb-row img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    background: #fff;
    display: block;
}
.detail-copy {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.big strong { font-size: 2rem; }
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0;
}
.spec-grid span,
.review-card { padding: 14px; }
.buy-actions { gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.buy-actions form { flex: 1; }
.buy-actions button,
.buy-actions a { width: 100%; min-height: 48px; display: inline-grid; place-items: center; }
.detail-tabs h2 { margin-top: 28px; }
.shop-info-card,
.purchase-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.shop-hero {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 310px;
    margin: 28px clamp(16px, 4vw, 56px);
    padding: 32px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .70), transparent 16rem),
        linear-gradient(135deg, var(--primary-soft), var(--accent));
    box-shadow: var(--shadow);
}
.shop-hero .eyebrow,
.shop-hero p { color: rgba(61, 61, 61, .72); }
.shop-hero h1 { margin: 0; font-size: 3rem; line-height: 1; letter-spacing: 0; }
.large {
    width: 96px;
    height: 96px;
    font-size: 1.6rem;
    background: rgba(255,255,255,.54);
    border: 2px solid rgba(255,255,255,.78);
}
.shop-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.verified-badge {
    color: #226b3d;
    background: var(--success-soft);
}

.map-card {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(17, 138, 178, .08) 1px, transparent 1px),
        linear-gradient(rgba(17, 138, 178, .08) 1px, transparent 1px),
        #f6fbff;
    background-size: 44px 44px;
}
.large-map { min-height: 560px; }
.map-pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--error);
    box-shadow: 0 10px 24px rgba(232, 93, 117, .30);
    font-weight: 900;
}
.map-shell { display: grid; gap: 14px; min-width: 0; }
.map-toolbar,
.map-shop-row,
.invoice-head { justify-content: space-between; gap: 14px; }
.map-toolbar { padding: 14px; }
.map-toolbar div { display: grid; gap: 3px; }
.map-toolbar span,
.map-shop-row small,
.invoice-head p,
.invoice-head span { color: var(--muted); }
.real-map {
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #eef7ff;
    box-shadow: var(--shadow-soft);
}
.map-list { display: grid; gap: 10px; }
.map-shop-row { padding: 12px; }
.map-shop-row > span:nth-child(2) { display: grid; gap: 3px; flex: 1; }
.map-shop-row em { color: var(--primary-dark); font-style: normal; font-weight: 900; }
.map-popup { display: grid; gap: 6px; min-width: 190px; }
.map-popup span { color: var(--muted); }
.map-popup a { display: inline-block; margin-top: 4px; color: var(--primary-dark); font-weight: 900; }

.comparison-summary,
.feature-page-grid,
.order-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}
.comparison-summary { margin-bottom: 18px; }
.comparison-summary h2 { margin: 4px 0; font-size: 2rem; }
.compact-summary { position: static; }
.recommended-row { background: var(--soft); }
.comparison-table small { color: var(--muted); }
.compare-search { padding-bottom: 8px; }

.feature-roadmap,
.timeline { display: grid; gap: 12px; }
.feature-roadmap-item,
.timeline-step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 4px 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.feature-roadmap-item span,
.timeline-step span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent-strong));
    font-weight: 900;
}
.timeline-step small { color: var(--muted); }
.timeline-step.is-current {
    border-color: var(--primary);
    background: var(--secondary);
}

.cart-layout { grid-template-columns: 1fr 340px; }
.cart-list { display: grid; gap: 12px; }
.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto 120px auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.cart-item .product-art {
    min-height: 76px;
    height: 76px;
    margin: 0;
    border-radius: var(--radius);
}
.cart-item .product-art > span { width: 44px; height: 44px; font-size: 1rem; }
.cart-item p,
.cart-item small { color: var(--muted); }
.cart-item input {
    width: 62px;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.qty-stepper {
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
}
.qty-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}
.summary-card {
    position: sticky;
    top: 84px;
    align-self: start;
    padding: 20px;
}
.summary-card p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}
.checkout-form { gap: 16px; }
.checkout-section {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.checkout-section h2 { margin: 0; }
.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.payment-card {
    gap: 8px;
    min-height: 58px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
    font-weight: 800;
}
.payment-card input { width: auto; }

.dashboard {
    background:
        radial-gradient(circle at 90% 0, rgba(202, 243, 234, .54), transparent 18rem),
        linear-gradient(180deg, var(--soft), transparent);
}
.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}
.dashboard-grid h2 { margin: 0; }
.dashboard-grid > div {
    position: relative;
    overflow: hidden;
}
.dashboard-grid > div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.dashboard-tabs a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.auth-card {
    display: grid;
    gap: 14px;
    width: min(440px, calc(100% - 32px));
    margin: 56px auto;
    padding: 24px;
}
.auth-card h1 { margin: 0; }
.footer {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 22px;
    align-items: start;
    padding: 30px clamp(16px, 4vw, 56px);
    border-top: 1px solid var(--line);
    background: #fff;
}
.footer p { color: var(--muted); margin: 6px 0 0; }
.footer-mini { gap: 8px; flex-wrap: wrap; }
.footer-mini span {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--secondary);
    font-weight: 800;
}
.footer-links { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.flash {
    margin: 16px clamp(16px, 4vw, 56px) 0;
    padding: 12px 16px;
    border: 1px solid #bfe4c8;
    border-radius: var(--radius);
    background: var(--success-soft);
    color: #226b3d;
    font-weight: 800;
}
.flash.error {
    border-color: #ffd1d8;
    background: var(--error-soft);
    color: #b4234f;
}
.stack-form,
.panel-form { display: grid; gap: 12px; }
.check-row { gap: 8px; color: var(--muted); }
.check-row input { width: auto; }
.danger-btn {
    background: linear-gradient(135deg, var(--error), #d63e5d);
    border-color: transparent;
    color: #fff;
}
.secondary-btn { background: #fff; color: var(--ink); border-color: var(--line); }
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}
.data-table th,
.data-table td {
    padding: 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.data-table th {
    color: var(--muted);
    font-size: .85rem;
    background: var(--soft);
}
.data-table tr:hover td { background: #f8fbff; }
.inline-actions { gap: 8px; flex-wrap: wrap; }
.inline-actions input,
.inline-actions select,
.inline-actions textarea { width: auto; min-width: 90px; padding: 8px; }
.inline-actions textarea { min-width: 180px; min-height: 42px; }
.panel-form { padding: 18px; }
.mt { margin-top: 16px; }
.image-admin-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.image-admin-row form { display: grid; gap: 8px; width: 112px; }
.image-admin-row img {
    width: 112px;
    height: 82px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--line);
}
.invoice-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}
.invoice-total {
    display: grid;
    justify-self: end;
    width: min(100%, 320px);
    gap: 8px;
}
.invoice-total p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

@media (max-width: 1120px) {
    .topbar { grid-template-columns: auto minmax(260px, 1fr) auto; }
    .nav-actions .nav-link { display: none; }
    .hero { grid-template-columns: 1fr; }
    .feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-grid,
    .shop-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .topbar { grid-template-columns: 1fr auto; gap: 12px; }
    .top-search { grid-column: 1 / -1; order: 3; max-width: none; }
    .nav-actions { justify-self: end; }
    .nav-actions .ghost-btn,
    .nav-actions .solid-btn,
    .nav-actions form { display: none; }
    .hero h1,
    .page-head h1,
    .dashboard h1,
    .detail-copy h1 { font-size: 3rem; }
    .deal-banner,
    .product-detail,
    .search-layout,
    .map-layout,
    .cart-layout,
    .split,
    .comparison-summary,
    .feature-page-grid,
    .order-detail-grid { grid-template-columns: 1fr; }
    .filter-panel,
    .summary-card,
    .zoom-gallery { position: static; }
    .image-zoom-pane { display: none; }
    .product-grid,
    .shop-row,
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .products-filter-panel,
    .payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .products-result-head { align-items: stretch; flex-direction: column; }
    .cart-item { grid-template-columns: 72px 1fr; }
    .cart-item input,
    .cart-item strong,
    .cart-item button { justify-self: start; }
    .footer { grid-template-columns: 1fr; }
    .footer-links { justify-content: flex-start; }
}

@media (max-width: 620px) {
    .topbar { padding: 10px 12px; }
    .brand { font-size: 1rem; }
    .brand-mark { width: 38px; height: 38px; }
    .top-search { height: auto; min-height: 46px; border-radius: var(--radius); }
    .advanced-btn { padding: 9px 10px; }
    .hero {
        min-height: auto;
        padding-top: 34px;
        background:
            repeating-linear-gradient(135deg, rgba(17, 138, 178, .08) 0 1px, transparent 1px 18px),
            var(--bg);
    }
    .hero h1,
    .page-head h1,
    .dashboard h1,
    .detail-copy h1 { font-size: 2.45rem; }
    .hero-search,
    .section-title,
    .shop-hero,
    .buy-actions,
    .delivery-card,
    .map-toolbar,
    .map-shop-row,
    .invoice-head,
    .products-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .hero-metrics,
    .feature-strip,
    .products-filter-panel,
    .category-grid,
    .product-grid,
    .shop-row,
    .dashboard-grid,
    .spec-grid,
    .two-col,
    .payment-grid {
        grid-template-columns: 1fr;
    }
    .feature-strip { padding-top: 14px; padding-bottom: 14px; }
    .deal-banner { padding: 20px; }
    .deal-row { grid-template-columns: 34px 1fr; }
    .deal-row em { grid-column: 2; }
    .product-art { height: 180px; min-height: 180px; }
    .card-actions { flex-wrap: wrap; }
    .card-actions .cart-action { flex-basis: 100%; }
    .card-link,
    .icon-btn { flex: 1; }
    .zoom-image { height: 340px; min-height: 340px; }
    .large-map,
    .real-map { min-height: 420px; }
}


.brand-logo-test {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    background: #16a085 !important;
    color: #fff !important;
    border-radius: 50% !important;
}

/* ===== ADMIN LAYOUT ===== */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(221, 229, 238, .86);
    padding: 12px clamp(16px, 4vw, 56px);
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #0b1e33;
    text-decoration: none;
    font-size: 1.1rem;
}

.admin-kpi-bar {
    background: linear-gradient(135deg, #0b1e33, #1a3148);
    color: #fff;
    padding: 20px clamp(16px, 4vw, 56px);
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
}

.admin-kpi-bar strong {
    color: #4ade80;
    font-size: 1.3rem;
    margin: 0 6px;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px clamp(16px, 4vw, 56px);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eef2f7;
}

.admin-tab {
    padding: 8px 18px;
    border-radius: 30px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: all .2s;
}

.admin-tab:hover {
    background: #e2e8f0;
}

.admin-tab.is-active {
    background: #0b1e33;
    color: #fff;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

.admin-stat-card .label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: #0b1e33;
}

.admin-stat-card.is-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fcd34d;
}

.admin-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

.admin-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0b1e33;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f7;
}

/* ============================================================
   FIX AUTH (register + login)
   ============================================================ */

/* Boton de submit visible */
.auth-card button[type="submit"],
.stack-form button[type="submit"] {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2e7d32, #3a9940);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-card button[type="submit"]:hover,
.stack-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(46, 125, 50, 0.4);
}

/* Alerta de exito (login + register) */
.alert-success {
    display: block;
    padding: 14px 18px;
    margin: 12px 0;
    border: 2px solid #2e7d32;
    border-radius: 12px;
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Alerta de error (cuenta pendiente, rechazada, etc) */
.alert-error,
.auth-card .error {
    display: block;
    padding: 14px 18px;
    margin: 12px 0;
    border: 2px solid #c62828;
    border-radius: 12px;
    background: #ffebee;
    color: #b71c1c;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* FIX AUTH - FORZAR VISIBILIDAD (Tailwind override) */
button[type="submit"],
.auth-card button[type="submit"],
.stack-form button[type="submit"] {
    background: linear-gradient(135deg, #2e7d32, #3a9940) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 20px !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    width: 100% !important;
    display: block !important;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3) !important;
    cursor: pointer !important;
}

.auth-card .error,
.auth-card span.error,
.stack-form .error,
span.error {
    display: block !important;
    padding: 14px 18px !important;
    margin: 12px 0 !important;
    border: 2px solid #c62828 !important;
    border-radius: 12px !important;
    background: #ffebee !important;
    color: #b71c1c !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}
