:root {
    --primary: #FFC107;
    --primary-dark: #FFB300;
    --primary-soft: #FFF8E1;
    --dark: #1A1A1A;
    --dark-2: #2C2C2C;
    --text: #1A1A1A;
    --text-muted: #8A8A8A;
    --bg: #F5F5F5;
    --card: #FFFFFF;
    --border: #EEEEEE;
    --success: #4CAF50;
    --danger: #E53935;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 90px;
    -webkit-font-smoothing: antialiased;
}

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

/* ========== DARK HERO HEADER ========== */
.hero {
    background: var(--dark);
    color: white;
    padding: 16px 20px 28px;
    border-radius: 0 0 28px 28px;
    position: relative;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 10px;
}

.hero-logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo img {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 8px;
}

.hero-logo-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Sticky header on scroll */
.hero.scrolled {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 20px 14px;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    transition: padding 0.25s ease;
}

.hero.scrolled .hero-title {
    display: none;
}

.hero.scrolled .hero-top {
    margin-bottom: 12px;
}

.hero.scrolled .search-bar {
    display: flex;
}

.location-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-box .loc-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-box .loc-text small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.6;
}

.location-box .loc-text span {
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 10px;
}

.hero-icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    transition: background 0.2s;
}

.hero-icon-btn:active { background: rgba(255,255,255,0.2); }

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: var(--dark);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.search-wrap {
    flex: 1;
    position: relative;
}

.search-wrap svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    z-index: 1;
}

.search-wrap input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 12px 16px 12px 44px;
    color: white;
    font-size: 0.9rem;
}

.search-wrap input::placeholder { color: rgba(255,255,255,0.45); }

/* Search hints dropdown */
.search-hints {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 56px;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    max-height: 260px;
    overflow-y: auto;
    display: none;
    animation: hintIn 0.25s ease;
}

.search-hints.show { display: block; }

.search-hint-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}

.search-hint-item:last-child { border-bottom: none; }
.search-hint-item:active { background: var(--bg); }

.search-hint-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg);
}

.search-hint-item .hint-info { flex: 1; }

.search-hint-item .hint-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.search-hint-item .hint-price {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-hint-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-btn {
    background: var(--primary);
    color: var(--dark);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.filter-btn:active { transform: scale(0.95); }

/* ========== OFFER BANNER ========== */
.offer-section {
    padding: 20px 20px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.section-header a {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.offer-card {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
}

.offer-content { flex: 1; z-index: 1; }

.offer-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark);
}

.offer-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.offer-btn {
    background: var(--dark);
    color: white;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s, background 0.2s;
}

.offer-btn:active { transform: scale(0.97); background: #333; }

.offer-emoji {
    font-size: 4rem;
    line-height: 1;
    flex-shrink: 0;
}

.offer-product-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.offer-card {
    cursor: default;
}


/* ========== CATEGORIES ========== */
.categories {
    display: flex;
    gap: 12px;
    padding: 20px 20px 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar { display: none; }

.cat-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 10px;
    border-radius: 50px;
    background: var(--card);
    box-shadow: var(--shadow);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.25s ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

.cat-btn .cat-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
}
.cat-btn .cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-btn.active {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(255,193,7,0.35);
    transform: translateY(-2px);
}

.cat-btn:active { transform: scale(0.97); }

/* ========== PRODUCTS ========== */
.products-section {
    padding: 16px 20px 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 600px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }
}

.product-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeUp 0.5s ease both;
    position: relative;
    cursor: pointer;
}

.product-card:active { transform: scale(0.98); }

.product-img-wrap {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img { transform: scale(1.06); }

.product-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-body {
    padding: 12px 14px 14px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
}

.add-btn {
    background: var(--primary);
    color: var(--dark);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(255,193,7,0.4);
    z-index: 2;
    position: relative;
}

.add-btn:active {
    transform: scale(1.15);
    background: var(--primary-dark);
}

/* ========== MODAL OVERLAY ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.center {
    align-items: center;
    padding: 20px;
}

/* Filter Categories Popup */
.filter-popup {
    background: var(--card);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 8px 20px 32px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 70vh;
    overflow-y: auto;
}

.modal-overlay.open .filter-popup {
    transform: translateY(0);
}

.filter-popup .drag-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 8px auto 16px;
}

.filter-popup h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.filter-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.filter-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.filter-cat-item:active,
.filter-cat-item.active {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.filter-cat-item .fc-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow);
}

/* Product Detail Popup */
.detail-popup {
    background: var(--card);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 480px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-overlay.open .detail-popup {
    transform: translateY(0);
}

.detail-img-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
}

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

.detail-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--dark);
    box-shadow: var(--shadow);
    z-index: 5;
}

.detail-body {
    padding: 20px 20px 30px;
}

.detail-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.detail-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-price {
    font-size: 1.4rem;
    font-weight: 700;
    flex: 1;
}

.detail-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border-radius: 50px;
    padding: 6px 8px;
}

.detail-qty button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.detail-add-btn {
    background: var(--primary);
    color: var(--dark);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 16px rgba(255,193,7,0.4);
    white-space: nowrap;
    transition: transform 0.2s;
}

.detail-add-btn:active { transform: scale(0.97); }

/* ========== CART DRAWER ========== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-radius: 24px 0 0 24px;
}

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

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

.cart-header h2 { font-size: 1.2rem; font-weight: 700; }

.close-cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg);
}

.cart-item-info { flex: 1; }

.cart-item-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.cart-item-price {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: background 0.2s;
}

.qty-btn:active { background: var(--primary); }

.cart-item-total {
    font-weight: 700;
    font-size: 0.95rem;
    align-self: center;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cart-total-row.grand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    margin-bottom: 16px;
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--dark);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 16px rgba(255,193,7,0.4);
}

.btn-checkout:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

.btn-checkout:disabled {
    background: #ddd;
    color: #999;
    box-shadow: none;
    cursor: not-allowed;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-cart .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ========== CHECKOUT PAGE ========== */
.checkout-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.checkout-header {
    background: var(--dark);
    color: white;
    padding: 16px 20px 24px;
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.checkout-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.checkout-body { padding: 20px; }

.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.form-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: white;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.summary-item:last-child { border-bottom: none; }

.summary-item img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xs);
    object-fit: cover;
    background: var(--bg);
}

.summary-item-info { flex: 1; }

.summary-item-info .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.summary-item-info .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.summary-item .price {
    font-weight: 700;
    font-size: 0.9rem;
}

.totals-box {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.total-line.grand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    border-top: 1.5px dashed var(--border);
    margin-top: 8px;
    padding-top: 12px;
}

/* ========== SUCCESS ========== */
.success-page {
    text-align: center;
    padding: 80px 24px;
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.8rem;
    color: var(--dark);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 30px rgba(255,193,7,0.4);
}

.success-page h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.success-page p {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.order-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin: 12px 0 24px;
    letter-spacing: 1px;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 14px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
    z-index: 90;
    border-radius: 24px 24px 0 0;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 12px;
    transition: color 0.2s;
}

.bottom-nav a.active { color: var(--dark); }
.bottom-nav a.active svg { color: var(--primary); }
.bottom-nav svg { width: 24px; height: 24px; }

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--dark);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 400;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.4); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes hintIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card:nth-child(1) { animation-delay: 0.04s; }
.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.12s; }
.product-card:nth-child(4) { animation-delay: 0.16s; }
.product-card:nth-child(5) { animation-delay: 0.20s; }
.product-card:nth-child(6) { animation-delay: 0.24s; }
.product-card:nth-child(7) { animation-delay: 0.28s; }
.product-card:nth-child(8) { animation-delay: 0.32s; }

.alert-error {
    background: #FFEBEE;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}


/* Bottom nav cart badge */
.nav-icon-wrap {
    position: relative;
    display: inline-flex;
}

.nav-cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--primary, #FFC107);
    color: var(--dark, #1A1A1A);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
