/* =============================================
   HEADER
   ============================================= */

/* Sticky wrapper */
.site-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
}

header {
    display: block !important;
    visibility: visible !important;
}

/* ── Top bar ── */
.hdr-top {
    background: linear-gradient(to right, #13618C, #297B35);
    padding: 10px 0;
}

.hdr-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hdr-modes {
    display: flex;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 3px;
    gap: 0;
}

.hdr-mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    transition: all 0.2s;
    white-space: nowrap;
}

.hdr-mode svg { flex-shrink: 0; opacity: 0.6; transition: opacity 0.2s; }
.hdr-mode--on svg { opacity: 1; }

.hdr-mode--on {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hdr-mode:not(.hdr-mode--on):hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.08);
}

.hdr-top__contact {
    font-size: 12.5px;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    margin: 0;
}

.hdr-top__contact a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.hdr-top__contact a:hover { text-decoration: underline; }

/* ── Main header ── */
.hdr-main {
    background: #fff;
    padding: 14px 0;
    border-bottom: 1px solid #F1F5F9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.hdr-main__inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.hdr-main__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.hdr-main__logo img {
    height: 38px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Search */
.hdr-main__search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 999px;
    padding: 0 6px 0 16px;
    gap: 10px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    min-width: 0;
}

.hdr-main__search:focus-within {
    border-color: #13618C;
    box-shadow: 0 0 0 3px rgba(19,97,140,0.08);
    background: #fff;
}

.hdr-main__search-icon {
    display: flex;
    align-items: center;
    color: #94A3B8;
    flex-shrink: 0;
}

.hdr-main__search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 11px 0;
    font-size: 13.5px;
    color: #0f172a;
    outline: none;
    min-width: 0;
}

.hdr-main__search-input::placeholder { color: #94A3B8; }

.hdr-main__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #13618C, #297B35);
    border: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s;
}

.hdr-main__search-btn:hover { opacity: 0.88; transform: scale(1.05); }

/* Actions */
.hdr-main__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hdr-main__icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid #E2E8F0;
    background: #F8FAFC;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.hdr-main__icon-btn:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
    color: #0f172a;
}

/* Cart badge */
.hdr-main__icon-btn .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #13618C, #297B35);
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid #fff;
    line-height: 1;
    pointer-events: none;
}

.profile-link { outline: none; }
.profile-link:focus,
.profile-link:focus-visible { outline: none; }

/* Status dot on profile icon */
.hdr-profile-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    pointer-events: none;
}
.hdr-profile-dot--in  { background: #22c55e; }
.hdr-profile-dot--out { background: #ef4444; }

/* ============================================
   CART POPUP STYLES
   ============================================ */

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

/* Cart Popup */
.cart-popup {
    position: fixed;
    right: -440px;
    top: 0;
    width: 440px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-popup.active {
    right: 0;
}

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.cart-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.3px;
}

.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-header-cart-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}

.cart-header-cart-btn img {
    width: 18px;
    height: 18px;
}

.cart-header-cart-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.cart-close-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-close-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.cart-body::-webkit-scrollbar {
    width: 4px;
}

.cart-body::-webkit-scrollbar-track {
    background: transparent;
}

.cart-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.cart-body::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Empty Cart State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
}

.cart-empty-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.cart-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.cart-empty p {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.cart-empty-btn {
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(19, 97, 140, 0.25);
}

.cart-empty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 97, 140, 0.35);
}

/* Store Section */
.cart-store-section {
    margin-bottom: 20px;
}

.cart-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.cart-store-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-store-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #64748b;
}

.cart-store-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.cart-view-store {
    font-size: 12px;
    color: #13618C;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.cart-view-store:hover {
    color: #0e4d6f;
    text-decoration: underline;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
}

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

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-options {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 6px 0;
}

.cart-item-option {
    display: inline-block;
    margin-right: 10px;
}

.cart-item-option label {
    font-weight: 600;
    color: #64748b;
}

.cart-item-prices {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.cart-item-original-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cart-item-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.qty-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    height: 32px;
    line-height: 32px;
    padding: 0 4px;
}

.cart-item-delete {
    background: none;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.cart-item-delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Cart Skeleton */
.cart-skeleton-store {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.cart-skeleton-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #f1f5f9;
}

.cart-skeleton-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: cartSkeletonShimmer 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

.cart-skeleton-content {
    flex: 1;
}

.cart-skeleton-line {
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: cartSkeletonShimmer 1.4s ease-in-out infinite;
}

.cart-skeleton-store-title {
    width: 45%;
}

.cart-skeleton-store-link {
    width: 22%;
}

.cart-skeleton-title {
    width: 82%;
    margin-bottom: 10px;
}

.cart-skeleton-sub {
    width: 60%;
    margin-bottom: 10px;
}

.cart-skeleton-price {
    width: 35%;
}

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

/* Cart Footer */
.cart-footer {
    border-top: 1px solid #f1f5f9;
    padding: 20px 24px;
    flex-shrink: 0;
    background: #ffffff;
}

.cart-login-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.cart-login-message p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.cart-signin-btn {
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: #ffffff;
    border: none;
    padding: 11px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(19, 97, 140, 0.2);
}

.cart-signin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 97, 140, 0.3);
}

.cart-totals {
    margin-bottom: 16px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.cart-total-row span:last-child {
    font-weight: 600;
    color: #334155;
}

.cart-total-amount {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.cart-checkout-btn {
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(19, 97, 140, 0.2);
}

.cart-checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 97, 140, 0.3);
}

.cart-checkout-btn svg,
.cart-signin-btn svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-popup {
        width: 100%;
        right: -100%;
    }

    .cart-header {
        padding: 16px 18px;
    }

    .cart-body {
        padding: 16px 18px;
    }

    .cart-footer {
        padding: 16px 18px;
    }

    .cart-item {
        padding: 12px;
    }

    .cart-item-image {
        width: 68px;
        height: 68px;
    }

    .cart-item-name {
        font-size: 12px;
    }
}


.profile-link {
    outline: none;
    display: flex;
    align-items: center;
}

.profile-link:focus,
.profile-link:focus-visible {
    outline: none;
}

/* ============================================
   MOBILE FLOATING BOTTOM NAV
   ============================================ */
.mobile-bottom-nav {
    display: block;
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    z-index: 1100 !important;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

/* Hide floating nav on desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.mobile-bottom-nav-inner {
    pointer-events: auto;
    background: rgba(226, 232, 240, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 22px;
    padding: 6px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.mobile-bottom-modes {
    display: flex;
    gap: 2px;
    background: transparent;
}

/* Base item — both <a> and <button> */
.mnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    text-decoration: none;
    border-radius: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

/* Reset button default styles when used as a nav item */
button.mnav-item {
    font-family: inherit;
    outline: none;
    box-shadow: none;
}

/* Icon wrapper */
.mnav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(30, 41, 59, 0.45);
    transition: color 0.22s ease;
}

.mnav-icon svg { flex-shrink: 0; }

/* Label */
.mnav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(30, 41, 59, 0.45);
    line-height: 1;
    white-space: nowrap;
    transition: color 0.22s ease;
}

/* Active state — gradient blue-green */
.mnav-item.active .mnav-icon {
    color: #13618C;
}

.mnav-item.active .mnav-label {
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Cart badge inside nav */
.mnav-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    min-width: 15px;
    font-size: 8px;
    font-weight: 700;
    background: #d32f2f;
    color: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hover for non-active */
.mnav-item:not(.active):hover .mnav-icon,
.mnav-item:not(.active):hover .mnav-label {
    color: rgba(30, 41, 59, 0.75);
}

/* =============================================
   RESPONSIVE: TABLET (max 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .hdr-top__contact { font-size: 12px; }
    .hdr-main__search-input { font-size: 13px; }
    .hdr-main__search-input::placeholder { font-size: 12.5px; }
}

/* =============================================
   RESPONSIVE: MOBILE (max 768px)
   ============================================= */
@media (max-width: 768px) {
    /* Top bar hidden — floating bottom nav takes over */
    .hdr-top { display: none; }

    /* Account icon hidden — accessible via bottom nav */
    .profile-link { display: none !important; }

    .hdr-main { padding: 10px 0 8px; }

    .hdr-main__inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 14px;
    }

    .hdr-main__logo img { height: 32px; }

    .hdr-main__actions { margin-left: auto; }

    .hdr-main__icon-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px;
    }

    /* Search drops to full-width second row */
    .hdr-main__search {
        order: 1;
        flex: 0 0 100%;
        border-radius: 12px;
        padding: 0 5px 0 14px;
    }

    .hdr-main__search-input {
        padding: 9px 0;
        font-size: 13px;
    }

    .hdr-main__search-btn {
        width: 32px;
        height: 32px;
    }

    /* Float nav clearance */
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* =============================================
   RESPONSIVE: SMALL MOBILE (max 480px)
   ============================================= */
@media (max-width: 480px) {
    .hdr-main { padding: 8px 0 6px; }

    .hdr-main__inner { padding: 0 12px; gap: 6px; }

    .hdr-main__logo img { height: 28px; }

    .hdr-main__icon-btn {
        width: 32px !important;
        height: 32px !important;
        border-radius: 9px;
    }

    .hdr-main__icon-btn .badge {
        width: 16px;
        height: 16px;
        min-width: 16px;
        font-size: 9px;
        top: -5px;
        right: -5px;
    }

    .hdr-main__search { padding: 0 4px 0 12px; }

    .hdr-main__search-input { padding: 8px 0; font-size: 12.5px; }
    .hdr-main__search-input::placeholder { font-size: 11.5px; }

    .hdr-main__search-btn { width: 30px; height: 30px; }
}

/* second duplicate removed — see first block above */

/* ============================================
   RESPONSIVE: TABLET (max 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .contact-info {
        font-size: 12px;
    }

    .search-bar input {
        font-size: 12px;
    }

    .search-bar input::placeholder {
        font-size: 12px;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (max 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Hide top bar — replaced by floating bottom nav */
    .top-bar {
        display: none;
    }

    /* Header: two-row layout */
    header {
        padding: 10px 0 8px;
    }

    .container.header-flex {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 14px;
    }

    .logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    .logo img {
        height: 30px;
    }

    /* Icons row: pushed right */
    .header-icons {
        flex: 0 0 auto;
        margin-left: auto;
        gap: 14px;
    }

    .header-icons img {
        width: 22px;
        height: 22px;
    }

    .cart-icon img {
        width: 22px;
        height: 22px;
    }

    /* Search bar drops to second full-width row */
    .search-bar {
        order: 1;
        flex: 0 0 100%;
        width: 100%;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 10px;
        border-color: #E2E8F0;
        background-color: #F8FAFC;
    }

    .search-bar input {
        font-size: 13px;
        min-width: 0;
    }

    .search-bar input::placeholder {
        font-size: 12px;
        color: #94A3B8;
    }

    .search-bar img {
        width: 16px;
        height: 16px;
    }

    /* Add bottom padding for floating nav + safe area */
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* ============================================
   RESPONSIVE: SMALL MOBILE (max 480px)
   ============================================ */
@media (max-width: 480px) {
    header {
        padding: 8px 0 6px;
    }

    .container.header-flex {
        gap: 6px;
        padding: 0 12px;
    }

    .logo img {
        height: 26px;
    }

    .search-bar {
        padding: 7px 10px;
        gap: 6px;
        border-radius: 8px;
    }

    .search-bar img {
        width: 15px;
        height: 15px;
    }

    .search-bar input::placeholder {
        font-size: 11px;
    }

    .header-icons {
        gap: 10px;
    }

    .header-icons img {
        width: 20px;
        height: 20px;
    }

    .cart-icon img {
        width: 20px;
        height: 20px;
    }

    .cart-icon .badge {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }

    .mobile-bottom-nav {
        padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-bottom-nav-inner {
        border-radius: 18px;
        padding: 5px;
    }

    .mnav-item {
        padding: 9px 4px;
        border-radius: 14px;
    }

    .mnav-icon svg {
        width: 18px;
        height: 18px;
    }

    .mnav-label { font-size: 9.5px; }
}
