:root {
    --primary: #1a73e8;
    --primary-700: #1557b0;
    --accent: #f9ab00;
    --accent-dark: #c87f00;
    --bg: #f4f6fb;
    --bg-alt: #ffffff;
    --ink: #111827;
    --muted: #5f6b7a;
    --border: #e0e6f0;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, #e8f1ff, #f7f8fc 40%, #ffffff 100%);
    color: var(--ink);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand.compact {
    gap: 0.1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.3rem;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(26, 115, 232, 0.35);
}

.tagline {
    color: var(--muted);
    font-size: 0.9rem;
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.location-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.location-wrap {
    position: relative;
}

.location-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: var(--shadow);
    display: none;
    z-index: 25;
}

.location-menu.open {
    display: grid;
    gap: 0.2rem;
}

.location-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.location-menu-btn:hover {
    background: #f4f7ff;
}

.location-text {
    font-weight: 600;
}

.search-wrap {
    flex: 1 1 240px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
}

.desktop-search {
    display: none;
}

.desktop-search-group {
    display: none;
}

.filter-wrap {
    position: relative;
}

.filter-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef3ff;
    color: var(--primary-700);
    border: none;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    max-width: 280px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: var(--shadow);
    display: none;
    z-index: 25;
}

.filter-menu.open {
    display: grid;
    gap: 0.2rem;
}

.filter-form-menu {
    display: grid;
    gap: 0.6rem;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.filter-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.filter-options {
    display: grid;
    gap: 0.3rem;
    max-height: 190px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.filter-option:hover {
    background: #f4f7ff;
}

.filter-option input {
    width: 16px;
    height: 16px;
}

.filter-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: space-between;
}

.btn.small {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.shopping-main {
    flex: 1;
    padding: 1.2rem 1.4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-panel {
    display: grid;
    gap: 0.8rem;
}

.search-form.wide {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    box-shadow: var(--shadow-soft);
}

.search-form.wide input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.search-form.wide i {
    color: var(--muted);
}

.search-submit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef3ff;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.deal-banner {
    display: grid;
    gap: 1rem;
}

.deal-carousel {
    display: grid;
    gap: 1rem;
}

.deal-card {
    padding: 1.4rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, #0ea5e9 0%, #2563eb 45%, #1d4ed8 100%);
    color: white;
    box-shadow: var(--shadow);
}

.deal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.deal-pill {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
}

.deal-count {
    font-size: 0.85rem;
    opacity: 0.9;
}

.deal-card h1 {
    font-size: 1.6rem;
    margin: 0.6rem 0 0.6rem;
}

.deal-card p {
    color: rgba(255, 255, 255, 0.85);
}

.deal-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.deal-stats .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.deal-stats .stat-value {
    font-weight: 700;
}

.deal-side {
    display: grid;
    gap: 0.8rem;
}

.deal-side-card {
    padding: 1.1rem;
    border-radius: var(--radius-md);
    background: #111827;
    color: #f8fafc;
    display: grid;
    gap: 0.6rem;
}

.deal-side-card p {
    color: rgba(248, 250, 252, 0.75);
}

.category-strip {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
}

.mobile-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: none;
    align-items: center;
    gap: 0.8rem;
    z-index: 30;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.1);
}

.mobile-cart {
    border: none;
    background: #eef3ff;
    color: var(--primary-700);
    padding: 0.55rem 0.8rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.mobile-count {
    background: var(--accent);
    color: #111827;
    border-radius: 999px;
    padding: 0 0.4rem;
    font-size: 0.75rem;
}

.mobile-total {
    flex: 1;
    display: grid;
    gap: 0.1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.mobile-total strong {
    color: var(--ink);
    font-size: 1rem;
}

.mobile-checkout {
    padding: 0.6rem 1rem;
}

.category-strip::-webkit-scrollbar {
    height: 4px;
}

.category-strip::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 999px;
}

.chip {
    white-space: nowrap;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--ink);
}

.filters.compact {
    padding: 1rem;
}

.filter-head.compact {
    gap: 0.8rem;
}

.filter-form.compact {
    width: 100%;
    justify-content: space-between;
}

.search-form {
    flex: 1;
}

.search-wrap input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.search-wrap i {
    color: var(--muted);
}

.cart-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -4px;
    background: var(--accent);
    color: #1b1b1b;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--primary-700);
    font-weight: 600;
}

.profile-menu {
    position: relative;
}

.profile-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #eef3ff;
    color: var(--primary-700);
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 0.4rem;
    display: none;
    z-index: 30;
}

.profile-dropdown.open {
    display: grid;
}

.profile-dropdown a,
.profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    color: var(--ink);
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.profile-dropdown form {
    margin: 0;
}

.detail-nav {
    display: flex;
    align-items: center;
}

.detail-actions-bar {
    gap: 0.8rem;
    justify-content: flex-end;
}

.back-btn,
.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef3ff;
    color: var(--primary-700);
    border: none;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background: #f4f7ff;
}

main {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero {
    display: grid;
    gap: 1.5rem;
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, #1a73e8 0%, #5691ff 45%, #8bc6ff 100%);
    color: white;
    box-shadow: var(--shadow);
}

.hero-content h1 {
    font-size: 2rem;
    margin: 0.7rem 0 1rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.8);
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 600;
    font-size: 0.85rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: var(--accent);
    color: #1a1a1a;
    box-shadow: 0 10px 20px rgba(249, 171, 0, 0.35);
}

.btn.ghost {
    background: var(--bg-alt);
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn.ghost.inverse {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-1px);
}

.hero-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: grid;
    gap: 0.8rem;
}

.hero-stat {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.hero-tip {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.alert.success {
    background: #e7f8ef;
    color: #0f7a3a;
}

.alert.danger {
    background: #ffe7e7;
    color: #b42318;
}

.filters {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.filter-head {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.filter-head h2 {
    font-size: 1.4rem;
}

.filter-head p {
    color: var(--muted);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field label {
    font-size: 0.85rem;
    color: var(--muted);
}

.field input,
.field select {
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.products {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: 1fr;
}

.product-card {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.product-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f0f4ff;
    display: grid;
    place-items: center;
}

.card-share-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-700);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    z-index: 2;
}

.card-share-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 2rem;
    background: linear-gradient(135deg, #eef2ff, #fff9e5);
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.82rem;
    gap: 0.6rem;
}

.product-info h3 {
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .product-info {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .product-info h3 {
        font-size: 0.84rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: calc(1.3em * 1);
    }

    .rating-badge {
        font-size: 0.66rem;
    }

    .rating-count {
        font-size: 0.66rem;
    }

    .price {
        font-size: 0.94rem;
    }

    .price-row {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .price-old,
    .price-discount {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .product-actions .btn {
        font-size: 0.72rem;
        padding: 0.4rem 0.65rem;
    }

    .product-image {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 768px) {
    .rating-row {
        gap: 0.4rem;
    }

    .product-actions {
        gap: 0.4rem;
    }
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #16a34a;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
}

.rating-count {
    color: var(--muted);
    font-size: 0.82rem;
}


.price-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
}

.price-old {
    text-decoration: line-through;
    color: var(--muted);
}

.price-discount {
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 700;
}

.product-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.product-actions .btn {
    justify-content: center;
}

.empty-state {
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    display: grid;
    gap: 0.8rem;
    color: var(--muted);
}

.empty-state h3 {
    color: var(--ink);
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.pagination {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
    color: var(--muted);
}

.page-links {
    display: flex;
    gap: 0.6rem;
}

.page-link {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--ink);
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.footer {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--muted);
}

.footer-link {
    color: var(--primary);
    font-weight: 600;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100%);
    background: var(--bg-alt);
    box-shadow: -20px 0 60px rgba(15, 23, 42, 0.2);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.drawer-subtitle {
    color: var(--muted);
    font-size: 0.85rem;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: grid;
    gap: 1rem;
}

.empty-cart {
    text-align: center;
    color: var(--muted);
    display: grid;
    gap: 0.5rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0.8rem;
    align-items: center;
}

.cart-thumb {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    background: #f4f6fb;
}

.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-details h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.cart-details p {
    color: var(--muted);
    font-size: 0.82rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    cursor: pointer;
}

.qty {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.remove-btn {
    margin-left: auto;
    border: none;
    background: none;
    color: #b42318;
    font-size: 0.82rem;
    cursor: pointer;
}

.cart-total {
    grid-column: 2;
    font-weight: 700;
    color: var(--ink);
}

.drawer-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.8rem;
}

.coupon-box {
    display: flex;
    gap: 0.6rem;
}

.coupon-box input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.coupon-status {
    font-size: 0.82rem;
    color: var(--muted);
}

.coupon-status.error {
    color: #b42318;
}

.cart-summary {
    display: grid;
    gap: 0.4rem;
}

.subtotal-row {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.9rem;
}

.hidden {
    display: none;
}

.orders-main {
    flex: 1;
    padding: 1.5rem 1.5rem 3rem;
    display: grid;
    gap: 1.6rem;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.orders-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.orders-filters .field {
    display: grid;
    gap: 0.35rem;
}

.orders-filters label {
    font-size: 0.85rem;
    color: var(--muted);
}

.orders-filters input,
.orders-filters select {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

.orders-filters .filter-actions {
    display: flex;
    gap: 0.6rem;
    align-items: flex-end;
}

.orders-grid {
    display: grid;
    gap: 1rem;
}

.order-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    display: grid;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
}

.order-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.order-number {
    font-weight: 700;
    font-size: 1rem;
}

.order-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.status-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}

.status-pill {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    background: #eef2ff;
    color: #1d4ed8;
}

.status-pill.status-cancelled,
.status-pill.status-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pill.status-refunded {
    background: #ffe4e6;
    color: #9f1239;
}

.status-pill.status-success,
.status-pill.status-confirmed,
.status-pill.status-completed {
    background: #dcfce7;
    color: #166534;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.order-items {
    display: grid;
    gap: 0.3rem;
}

.order-item-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.order-item-more {
    color: var(--muted);
    font-size: 0.85rem;
}

.order-totals {
    display: grid;
    gap: 0.4rem;
    text-align: right;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 700;
}

.order-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-detail-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.order-detail-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 0.8rem;
}

.detail-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.order-items-list {
    display: grid;
    gap: 0.8rem;
}

.order-item-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 0.8rem;
    align-items: center;
}

.order-item-media {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #f4f6fb;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.order-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.order-item-total {
    font-weight: 700;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.detail-row.total {
    color: var(--ink);
    font-weight: 700;
}

.order-detail-sidebar {
    display: grid;
    gap: 1rem;
}

@media (max-width: 900px) {
    .orders-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .orders-filters {
        grid-template-columns: 1fr;
    }

    .order-detail-grid {
        grid-template-columns: 1fr;
    }

    .order-item-row {
        grid-template-columns: 52px 1fr;
    }

    .order-item-total {
        grid-column: 2;
        text-align: right;
    }
}

.subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.icon-btn {
    border: none;
    background: #f1f5ff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--primary-700);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 60;
    padding: 1.5rem;
}

.modal.open {
    display: grid;
}

.modal-card {
    width: min(540px, 100%);
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--border);
    border-bottom: none;
    color: var(--muted);
    font-size: 0.85rem;
}

.modal-body {
    padding: 1.2rem 1.5rem;
    display: grid;
    gap: 1rem;
}

.modal-body.scrollable {
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

.location-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.location-saved {
    display: grid;
    gap: 0.4rem;
    padding: 0.4rem 0.2rem 0.2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.location-saved-title {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    padding: 0 0.4rem;
}

.location-menu-btn.saved-address {
    align-items: flex-start;
}

.saved-address-text {
    font-weight: 600;
}

.saved-address-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.saved-addresses {
    display: grid;
    gap: 0.6rem;
}

.saved-addresses-title {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.saved-addresses-list {
    display: grid;
    gap: 0.5rem;
}

.saved-address-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    background: var(--bg-alt);
    display: grid;
    gap: 0.2rem;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
}

.saved-address-card:hover {
    border-color: #c9d6f2;
    background: #f5f8ff;
}

.search-toggle {
    display: flex;
    justify-content: flex-start;
}

.city-search-panel {
    display: grid;
    gap: 0.8rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.city-search-panel.open {
    max-height: 420px;
}

.muted {
    color: var(--muted);
    font-size: 0.85rem;
}

.city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.city-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    background: #f4f7ff;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
}

.city-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #111827;
    color: white;
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.detail-head {
    display: flex;
    justify-content: flex-start;
}

.detail-grid {
    display: grid;
    gap: 2rem;
}

.detail-gallery {
    display: grid;
    gap: 1rem;
}

.main-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f0f4ff;
    min-height: 260px;
    display: grid;
    place-items: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb.active {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.2);
    transform: translateY(-2px);
}

.detail-dots {
    display: none;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.detail-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: transparent;
    border: 1.5px dotted rgba(17, 24, 39, 0.4);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.detail-dot.active {
    width: 20px;
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.detail-info {
    display: grid;
    gap: 1rem;
}

.detail-meta {
    color: var(--muted);
    font-weight: 600;
}

.detail-info h1 {
    font-size: 1.8rem;
}

.detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.detail-card {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.9rem;
}

.detail-block h3 {
    margin-bottom: 0.6rem;
}

.detail-block ul {
    display: grid;
    gap: 0.35rem;
    padding-left: 1.2rem;
    list-style: disc;
    color: var(--muted);
}

.desc-group {
    margin-bottom: 0.8rem;
}

.desc-group h4 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
    color: var(--ink);
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 90;
}

.lightbox.open {
    display: grid;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: #ffffff;
}

.lightbox-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: grid;
    place-items: center;
    z-index: 1;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
    touch-action: none;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(248, 250, 252, 0.95);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(248, 250, 252, 0.95);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.lightbox-nav.prev {
    left: 12px;
}

.lightbox-nav.next {
    right: 12px;
}

.lightbox-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.swipe-indicator.left {
    left: 20px;
}

.swipe-indicator.right {
    right: 20px;
}

.lightbox.drag-left .swipe-indicator.left,
.lightbox.drag-right .swipe-indicator.right {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.lightbox.controls-hidden .lightbox-nav,
.lightbox.controls-hidden .lightbox-close,
.lightbox.controls-hidden .lightbox-dots {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox .lightbox-nav,
.lightbox .lightbox-close,
.lightbox .lightbox-dots {
    transition: opacity 0.3s ease;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: transparent;
    border: 1.5px dotted rgba(17, 24, 39, 0.35);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lightbox-dot.active {
    width: 20px;
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
    animation: dotPulse 0.6s ease;
}

@keyframes dotPulse {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.12);
    }
    100% {
        transform: scale(1.05);
    }
}

@media (min-width: 768px) {
    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .top-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .desktop-search-group {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        margin-right: auto;
        max-width: 880px;
        flex: 1;
    }

    .desktop-search {
        display: flex;
        min-width: 360px;
        max-width: 520px;
        flex: 1;
    }

    .hero {
        grid-template-columns: 2fr 1fr;
        align-items: center;
    }

    .filter-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .pagination {
        flex-direction: row;
        justify-content: space-between;
    }

    .footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .detail-grid {
        grid-template-columns: 1.05fr 1fr;
        align-items: start;
    }

    .deal-carousel {
        grid-template-columns: 2fr 1fr;
        align-items: stretch;
    }
}

@media (max-width: 767px) {
    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .top-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .detail-actions-bar {
        flex: 1;
        justify-content: flex-end;
    }

    .shopping-bar .logo-text {
        font-size: 1rem;
    }

    .shopping-bar .tagline {
        display: none;
    }

    .shopping-bar .logo-text {
        display: none;
    }

    .shopping-bar .top-actions {
        gap: 0.5rem;
    }

    .location-btn {
        padding: 0.45rem 0.6rem;
        font-size: 0.85rem;
    }

    .location-btn .bi-chevron-down {
        display: none;
    }

    .location-text {
        display: none;
    }

    .shopping-main {
        padding: 1rem 1rem 5.5rem;
        gap: 1.2rem;
    }

    .deal-card h1 {
        font-size: 1.35rem;
    }

    .deal-carousel {
        display: flex;
        overflow-x: auto;
        gap: 0.8rem;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.2rem;
    }

    .deal-carousel::-webkit-scrollbar {
        height: 4px;
    }

    .deal-carousel::-webkit-scrollbar-thumb {
        background: rgba(15, 23, 42, 0.2);
        border-radius: 999px;
    }

    .deal-slide {
        min-width: 82%;
        scroll-snap-align: start;
    }

    .deal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
        gap: 1rem;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

    .filters.compact .filter-form.compact {
        flex-direction: column;
        align-items: stretch;
    }

    .filters.compact .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-bar {
        display: flex;
    }

    .thumbs {
        display: none;
    }

    .detail-dots {
        display: flex;
    }
}

@media (min-width: 1024px) {
    main {
        padding: 2rem 3.5rem 3rem;
    }

    .topbar {
        padding: 1.2rem 3.5rem;
    }
}
    .search-panel {
        display: none;
    }
