:root {
    --background: #ffffff;
    --foreground: #1f2937;
    --card: #ffffff;
    --muted: #f8fafc;
    --muted-foreground: #6b7280;
    --primary: #1a56db;
    --primary-foreground: #ffffff;
    --accent: #f97316;
    --accent-foreground: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --radius-sm: 4px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--foreground);
    background: var(--muted);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: #1648b8;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.top-line {
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 13px;
    padding: 8px 0;
}

.main-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 700;
}

.logo-title {
    font-weight: 700;
    color: var(--foreground);
}

.logo-sub {
    font-size: 12px;
    color: var(--muted-foreground);
}

.search-wrap {
    position: relative;
}

.search-wrap .bi-search,
.search-wrap .bi-mic-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-wrap .bi-search {
    left: 12px;
}

.search-wrap .bi-mic-fill {
    right: 12px;
}

.search-wrap .form-control {
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--muted);
    padding-left: 36px;
    padding-right: 36px;
}

.search-wrap .form-control:focus,
.form-control:focus,
.form-select:focus {
    border-color: #99b8ff;
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.15);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--foreground);
    position: relative;
}

.icon-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: 11px;
    color: #fff;
    background: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.category-nav {
    border-top: 1px solid var(--border);
}

.category-nav .nav-link {
    color: var(--foreground);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 12px;
}

.category-nav .nav-link:hover {
    color: var(--primary);
}

.category-nav .nav-link.text-accent,
.text-accent {
    color: var(--accent) !important;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    z-index: 1100;
    max-height: 280px;
    overflow-y: auto;
    display: none;
}

.search-suggest a {
    display: block;
    padding: 10px 12px;
    color: var(--foreground);
}

.search-suggest a:hover {
    background: #eef4ff;
}

.hero-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hero-slide {
    min-height: 340px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-slide-1 {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(249, 115, 22, .45), transparent 45%),
        linear-gradient(125deg, #1a56db, #0f3ca2);
}

.hero-slide-2 {
    background-image:
        radial-gradient(circle at 80% 25%, rgba(255, 255, 255, .22), transparent 45%),
        linear-gradient(125deg, #0f766e, #1a56db);
}

.hero-slide-3 {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(248, 250, 252, .25), transparent 45%),
        linear-gradient(125deg, #f97316, #1a56db);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    color: #fff;
    padding: 42px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
    display: flex;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(3px);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
}

.surface-card,
.metric-card,
.testi-card,
.product-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.metric-card {
    padding: 16px;
}

.product-card {
    overflow: hidden;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-card {
    position: sticky;
    top: 120px;
}

.section-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.cat-item {
    text-align: center;
    padding: 16px 10px;
    color: var(--foreground);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26, 86, 219, .15);
}

.cat-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    font-size: 30px;
}

.flash-wrap {
    background: var(--muted);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}

.flash-head {
    padding: 14px 18px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--danger);
    color: #fff;
}

.timer {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 20px;
    font-weight: 700;
}

.horizontal-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 14px;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.product-thumb-wrap {
    position: relative;
    overflow: hidden;
}

.product-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .25s ease;
}

.product-card:hover .product-thumb {
    transform: scale(1.04);
}

.card-action {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    gap: 6px;
    opacity: 0;
    transition: opacity .2s ease;
}

.product-card:hover .card-action {
    opacity: 1;
}

.mini-action {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
}

.brand-tag {
    font-size: 12px;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: .25px;
}

.rating {
    color: var(--warning);
    font-size: 13px;
}

.price {
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
}

.price-old {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 13px;
}

.promo-banner {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.newsletter {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #eef4ff;
    padding: 24px;
}

.main-footer {
    margin-top: 28px;
    background: #111827;
    color: #d1d5db;
    padding: 36px 0 28px;
}

.main-footer a {
    color: #d1d5db;
}

.main-footer a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    display: grid;
    place-items: center;
}

.breadcrumb {
    margin-bottom: 12px;
    background: transparent;
}

.chip {
    background: #edf3ff;
    color: var(--primary);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chip button {
    border: 0;
    background: transparent;
    color: var(--primary);
    line-height: 1;
    padding: 0;
}

.thumb-strip {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.thumb-strip img {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    object-fit: cover;
    cursor: pointer;
}

.variant-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
}

.qty-box {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-box button {
    width: 36px;
    height: 36px;
    border: 0;
    background: var(--muted);
}

.qty-box input {
    width: 52px;
    border: 0;
    text-align: center;
}

.tabs-card .nav-link {
    color: var(--muted-foreground);
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-weight: 500;
}

.tabs-card .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.freeship-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.freeship-track > span {
    height: 100%;
    display: block;
    background: var(--primary);
}

.checkout-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.step-pill {
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 600;
    background: #e5e7eb;
    color: var(--muted-foreground);
}

.step-pill.active {
    background: #e8f0ff;
    color: var(--primary);
}

.order-timeline {
    position: relative;
    padding-left: 22px;
}

.order-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d1d5db;
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
}

.timeline-item.active::before {
    background: var(--success);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-shipping {
    background: #e0ecff;
    color: #1d4ed8;
}

.status-done {
    background: #d1fae5;
    color: #047857;
}

.status-cancel {
    background: #fee2e2;
    color: #b91c1c;
}

.auth-shell {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
}

.auth-card {
    max-width: 520px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.admin-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
    background: #f3f4f6;
}

.admin-login-card {
    max-width: 460px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.admin-layout {
    min-height: 100vh;
    background: #f3f4f6;
}

.admin-sidebar {
    width: 260px;
    border-right: 1px solid var(--border);
    background: #fff;
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: var(--muted-foreground);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
    background: var(--primary);
    color: #fff;
}

.admin-top {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.change-up {
    color: var(--success);
}

.change-down {
    color: var(--danger);
}

.chart-wrap {
    position: relative;
    width: 100%;
}

.chart-wrap-lg {
    height: 320px;
}

.chart-wrap-sm {
    height: 320px;
}

.chart-wrap > canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.table-striped > tbody > tr:nth-child(odd) > * {
    background: #f8fafc;
}

.table-hover > tbody > tr:hover > * {
    background: #eef4ff;
}

.stock-pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
}

.stock-ok { background: #d1fae5; color: #047857; }
.stock-low { background: #fef3c7; color: #92400e; }
.stock-out { background: #fee2e2; color: #b91c1c; }

.toast-stack {
    position: fixed;
    top: 84px;
    right: 14px;
    z-index: 1100;
    display: grid;
    gap: 10px;
}

.toast-item {
    min-width: 240px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    background: #fff;
    padding: 10px 12px;
    transition: all .35s ease;
}

.toast-success { border-left-color: var(--success); }
.toast-warning { border-left-color: var(--warning); }
.toast-error { border-left-color: var(--danger); }

.skeleton {
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.mobile-bottom-bar {
    display: none;
}

.empty-state {
    text-align: center;
    padding: 40px 22px;
}

.empty-illo {
    font-size: 66px;
    color: #cbd5e1;
}

.modal-backdrop.show {
    opacity: .45;
    backdrop-filter: blur(2px);
}

@media (max-width: 1024px) {
    .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }
    .hero-slide {
        min-height: 260px;
    }
    .hero-overlay {
        padding: 24px;
    }
    .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .checkout-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-wrap-lg,
    .chart-wrap-sm {
        height: 260px;
    }
}

@media (max-width: 576px) {
    .top-line {
        display: none;
    }
    .cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mobile-bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        border-top: 1px solid var(--border);
        background: #fff;
        padding: 10px 12px;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    }
    .main-footer {
        padding-bottom: 94px;
    }
}
