/* ═══════════════════════════════════════
   BOTTOM NAVIGATION
═══════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height, 68px);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 0.5px solid #e8e8e8;
    display: flex;
    align-items: stretch;
    z-index: 3999;
}

@media (min-width: 769px) {
    .bottom-nav { display: none; }
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #bbb;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'DM Sans', sans-serif;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
}

.bottom-nav-item i {
    font-size: 17px;
    line-height: 1;
}

.bottom-nav-item.active,
.bottom-nav-item.overlay-active {
    color: #111;
}

.bottom-nav-item:active { opacity: 0.6; }

/* Cart badge */
.bottom-nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.bottom-nav-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--color-accent, #c4826a);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    border-radius: 100px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    font-family: 'DM Sans', sans-serif;
}



/* ═══════════════════════════════════════
   CATEGORY TAB BAR
═══════════════════════════════════════ */
.cat-tab-bar {
    position: sticky;
    top: var(--header-height, 64px);
    z-index: 200;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 0.5px solid #e8e8e8;
    overflow: hidden;
}

.cat-tab-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-tab-scroll::-webkit-scrollbar { display: none; }

.cat-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 100px;
    border: 1.5px solid #e8e8e8;
    background: #fff;
    color: #888;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.cat-tab:hover { border-color: #bbb; color: #444; }

.cat-tab.active {
    background: #111;
    color: #fff;
    border-color: #111;
}


/* ═══════════════════════════════════════
   CART DRAWER
═══════════════════════════════════════ */
.cart-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.36);
    z-index: 4500;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 100vw);
    background: #fff;
    z-index: 4501;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -12px 0 48px rgba(0,0,0,.12);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.cart-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 0.5px solid #f0f0f0;
    flex-shrink: 0;
}

.cart-drawer-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-drawer-count {
    background: #111;
    color: #fff;
    font-size: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    border-radius: 100px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    transition: background 0.15s;
}

.cart-drawer-close:hover { background: #f5f3f0; color: #111; }

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    -webkit-overflow-scrolling: touch;
}

.cart-drawer-loading,
.cart-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: #ccc;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
}

.cart-drawer-empty i { font-size: 2.5rem; }
.cart-drawer-empty p { color: #aaa; margin: 0; }

.cart-drawer-shop-btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 12px 28px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.15s;
}

.cart-drawer-shop-btn:hover { background: #333; }

/* Cart item row */
.cart-drawer-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 0.5px solid #f5f5f5;
}

.cart-drawer-img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f3f0;
    flex-shrink: 0;
}

.cart-drawer-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-top: 2px;
}

.cart-drawer-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-drawer-item-variant {
    font-size: 11px;
    color: #aaa;
    letter-spacing: 0.02em;
}

.cart-drawer-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-top: 4px;
}

.cart-drawer-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.cart-drawer-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e8e8e8;
    border-radius: 100px;
    overflow: hidden;
}

.cart-drawer-qty button {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
}

.cart-drawer-qty button:hover { background: #f5f3f0; }

.cart-drawer-qty span {
    min-width: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    font-family: 'DM Sans', sans-serif;
}

.cart-drawer-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ddd;
    font-size: 12px;
    padding: 4px;
    transition: color 0.15s;
}

.cart-drawer-remove:hover { color: #e53935; }

/* Footer */
.cart-drawer-foot {
    border-top: 0.5px solid #f0f0f0;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: #888;
    padding-bottom: 4px;
}

.cart-drawer-total-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
}

.cart-drawer-checkout {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 15px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s;
}

.cart-drawer-checkout:hover { background: #333; }

.cart-drawer-view-cart {
    background: transparent;
    color: #888;
    border: none;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    text-align: center;
    text-decoration: underline;
    padding: 4px;
    transition: color 0.15s;
}

.cart-drawer-view-cart:hover { color: #111; }


/* ═══════════════════════════════════════
   FILTER BOTTOM SHEET
═══════════════════════════════════════ */
.filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.36);
    z-index: 4100;
    animation: fadeIn 0.2s ease;
}

.filter-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 4101;
    animation: slideUp 0.28s cubic-bezier(0.4,0,0.2,1);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.filter-sheet-handle {
    width: 36px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 100px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

.filter-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    flex-shrink: 0;
}

.filter-sheet-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #111;
}

.filter-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
    transition: background 0.15s;
}

.filter-sheet-close:hover { background: #f5f3f0; color: #111; }

.filter-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 16px;
}

.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 0.5px solid #f5f5f5;
}

.filter-label {
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #333;
    font-weight: 500;
}

/* Toggle switch */
.filter-toggle {
    width: 44px;
    height: 26px;
    border-radius: 100px;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.filter-toggle.on { background: #111; }

.filter-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

.filter-toggle.on .filter-toggle-knob {
    transform: translateX(18px);
}

.filter-sheet-footer {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-top: 0.5px solid #f0f0f0;
    flex-shrink: 0;
}

.filter-clear-btn {
    flex: 1;
    padding: 13px;
    border-radius: 100px;
    border: 1.5px solid #e8e8e8;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    color: #666;
    transition: border-color 0.15s;
}

.filter-clear-btn:hover { border-color: #999; }

.filter-apply-btn {
    flex: 2;
    padding: 13px;
    border-radius: 100px;
    border: none;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.15s;
}

.filter-apply-btn:hover { background: #333; }

/* Filter trigger button */
.filter-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 14px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    white-space: nowrap;
}

.filter-trigger:hover { border-color: #ccc; }
.filter-trigger.filter-active { border-color: #111; background: #111; color: #fff; }
.filter-trigger.filter-active .sort-trigger-icon { color: #fff; }

.sort-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ═══════════════════════════════════════
   STICKY ADD-TO-CART BAR  (mobile only)
═══════════════════════════════════════ */
.sticky-atc {
    display: none;
}

@media (max-width: 768px) {
    .sticky-atc {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 0.5px solid #e8e8e8;
        padding: 10px 16px;
        gap: 12px;
        align-items: center;
        z-index: 199;
        box-shadow: 0 -4px 20px rgba(0,0,0,.07);
    }

    .sticky-atc--oos .sticky-atc-btn {
        background: #e0e0e0;
        color: #aaa;
    }
}

.sticky-atc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sticky-atc-name {
    font-size: 12px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'DM Sans', sans-serif;
}

.sticky-atc-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent, #c4826a);
    font-family: 'DM Sans', sans-serif;
}

.sticky-atc-btn {
    flex-shrink: 0;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 12px 22px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background 0.15s;
    white-space: nowrap;
}

.sticky-atc-btn:hover:not(:disabled) { background: #333; }
.sticky-atc-btn:disabled { background: #e0e0e0; color: #aaa; cursor: not-allowed; }


/* ═══════════════════════════════════════
   FULL-SCREEN SEARCH OVERLAY  (mobile)
═══════════════════════════════════════ */
@media (max-width: 768px) {
    .search-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-radius: 0;
        border: none;
        padding: 0;
        z-index: 6000;
        animation: fadeIn 0.18s ease;
        display: flex;
        flex-direction: column;
    }

    .search-overlay-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        height: var(--header-height, 56px);
        border-bottom: 0.5px solid #e8e8e8;
        flex-shrink: 0;
    }

    .search-overlay-body {
        flex: 1;
        padding: 16px;
        overflow-y: auto;
    }
}

@media (min-width: 769px) {
    .search-overlay-header { display: none; }
    .search-overlay-body   { display: contents; }
}

.search-overlay-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    letter-spacing: 0.04em;
    font-family: 'DM Sans', sans-serif;
}
