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

/* 🎨 COLOR CONTROLLER - Light Mode (Default) - Designed for 390px width mobile */
:root {
    --primary-color: #ececec;        /* 🎯 MAIN BRAND COLOR - buttons, headers, accents */
    --primary-dark: #D4460A;         /* 🎯 DARKER PRIMARY - hover states, borders */
    --background: #F8F7F7;           /* 🎯 MAIN BACKGROUND - page background (Light Mode) */
    --surface: #FFFFFF;              /* 🎯 SURFACE BACKGROUND - cards, modals */
    --text-primary: #212529;         /* 🎯 PRIMARY TEXT - main text color */
    --text-secondary: #6C757D;      /* 🎯 SECONDARY TEXT - descriptions, labels */
    --border: #DEE2E6;               /* 🎯 BORDER COLOR - borders, dividers */
    --success: #28A745;             /* 🎯 SUCCESS COLOR - success messages */
    --danger: #f80c24;              /* 🎯 DANGER COLOR - error messages, delete buttons */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);

    /* 📱 MOBILE-FIRST BASE WIDTH - Designed for 390px */
    --base-width: 390px;
}

/* 🌙 DARK MODE DISABLED - Always using light mode */

/* 📱 MOBILE-FIRST BASE - 390px width as primary design target */
html {
    font-size: 16px;
    background-color: var(--background);
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 20px;
    margin: 0 auto;
    width: 100%;
    max-width: 100vw;
    min-width: 320px;
    /* Disable zoom and double-tap */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent Telegram webapp minimize on scroll */
    overscroll-behavior: none;
}

/* 📱 MOBILE-FIRST: Base design optimized for 390px width */
@media (min-width: 390px) {
    body {
        max-width: 390px;
        margin: 0 auto;
    }
}

.container {
    width: 100%;
    max-width: 390px; /* Mobile-first: base design width */
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: var(--background);
}

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 390px; /* Mobile-first: match container width */
    margin: 0 auto;
    box-sizing: border-box;
}

/* 📱 MOBILE FULL-SCREEN MODE - Handle safe area for notch/status bar */
.fullscreen-mode .header {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

.fullscreen-mode .container {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

.fullscreen-mode {
    margin: 0 !important;
    padding: 0 !important;
}

/* 📱 RESPONSIVE IMPROVEMENTS - Mobile-first: optimized for 390px base */
@media (max-width: 389px) {
    /* Smaller phones - scale down from 390px base */
    .header {
        padding: 16px 12px;
    }

    .fullscreen-mode .header {
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: 16px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

/* 📱 BASE DESIGN: 390px width (primary target) */
@media (min-width: 390px) {
    .header {
        padding: 20px 16px;
    }
}

.logo-hitbox {
    display: inline-block;
    padding: 20px 40px;
    margin: -20px -40px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.3s cubic-bezier(0.78, 0, 0.71, 0.99);
}

.logo-hitbox:active {
    transform: scale(1.07);
    transition: transform 0.2s cubic-bezier(0, 0.67, 0.57, 1.01);
}

.header-logo {
    width: 140px;
    height: auto;
    display: block;
    pointer-events: none;
}

@media (max-width: 389px) {
    .header-logo {
        width: 120px;
    }
}

/* ═══════════════════════════════════════════════════════════
   🔍 SEARCH OVERLAY - Full screen search with animations
   ═══════════════════════════════════════════════════════════ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow-y: auto;
}

.search-overlay.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease forwards;
}

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

.search-container {
    position: sticky;
    top: 0;
    background: var(--background);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border);
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
}

.search-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.search-icon {
    font-size: 20px;
    opacity: 0.6;
}

.typing-indicator {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.typing-indicator.active {
    opacity: 1;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Remove default search input styling on WebKit (Safari/Chrome) */
.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-clear-btn:active {
    color: var(--text-primary);
}

.search-cancel-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.search-cancel-btn:active {
    opacity: 0.6;
}

.search-results-info {
    padding: 12px 16px;
    background: var(--background);
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.search-products-grid {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}


/* Mobile optimizations for Android */
@media (max-width: 480px) {
    .search-container {
        padding: 10px;
        gap: 8px;
    }

    .search-bar {
        padding: 8px 10px;
    }

    .search-input {
        font-size: 16px; /* Prevents zoom on iOS/Android */
    }

    .search-cancel-btn {
        font-size: 15px;
        padding: 6px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════
   🏪 VENDORS BAR - Horizontal scrolling vendor categories
   ═══════════════════════════════════════════════════════════ */

.vendors-bar {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    background: var(--background);
    padding: 16px 12px;
    display: flex;
    gap: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    will-change: transform;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vendors-bar::-webkit-scrollbar {
    display: none;
}

.vendor-item {
    flex: 0 0 auto;
    width: 280px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.vendor-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.vendor-item:active::before {
    opacity: 1;
}

.vendor-item:active {
    transform: scale(0.98);
}

.vendor-item.active {
    border: 1px solid rgb(255, 255, 255);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);

}

/* Beautiful gradient variations for each vendor */
.vendor-item:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.vendor-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.vendor-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.vendor-item:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.vendor-item:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.vendor-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.vendor-info {
    flex: 1;
    color: white;
}

.vendor-name {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.vendor-description {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .vendors-bar {
        padding: 12px 8px;
        gap: 10px;
    }

    .vendor-item {
        width: 230px;
        height: 70px;
        padding: 14px 16px;
        gap: 12px;
        border-radius: 9px;
    }

    .vendor-icon {
        font-size: 36px;
    }

    .vendor-name {
        font-size: 16px;
    }

    .vendor-description {
        font-size: 12px;
    }
}




.header-text p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   📱 LANDING PAGE - Groups and Category Cards
   ═══════════════════════════════════════════════════════════ */

.landing-view {
    padding: 16px;
}

.group-section {
    margin-bottom: 32px;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.group-icon {
    font-size: 32px;
}

.group-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card:active {
    transform: scale(0.95);
}

.category-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

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

.category-card-name {
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
}

/* Responsive: 2 columns on smaller screens */
@media (max-width: 480px) {
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════
   📄 CATEGORY PAGE VIEW
   ═══════════════════════════════════════════════════════════ */

.category-view {
    display: flex;
    flex-direction: column;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
}

.back-button:active {
    opacity: 0.6;
}

.back-button span {
    font-size: 20px;
}

/* Category Tabs - Top (wrapping, disappears on scroll) */
.category-tabs-top {
    display: flex;
    flex-wrap: wrap;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 12px 12px 12px;
    gap: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
}

/* Category Tabs - Sticky (scrollable, appears on scroll) */
.category-tabs-sticky {
    display: flex;
    overflow-x: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 12px 12px 12px;
    position: -webkit-sticky;
    position: sticky;
    top: 120px; /* Mobile header height */
    z-index: 95;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    gap: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.category-tabs-sticky.visible {
    opacity: 1;
    pointer-events: auto;
}

.category-tabs-sticky::-webkit-scrollbar {
    display: none;
}

.tab-button {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    scroll-snap-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}


.tab-button.active {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(246, 86, 6, 0.3);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    transition: opacity 0.2s ease;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.sub-category-headline {
    grid-column: 1 / -1;
    padding: 16px 0 8px 0;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.product-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.product-card.in-cart {
    border: 2px solid var(--primary-color);
}

.product-image {
    width: 100%;
    height: 120px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

.price-container {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
}

.product-weight {
    font-size: 12px;
    color: rgba(108, 117, 125, 0.5);
    font-weight: normal;
}

.add-btn {
    background: var(--primary-color);
    color: var(--add-to-cart-text-color);
    border: none;
    border-radius: 7px;
    width: 50px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    margin: 0;
    text-align: center;
}


/* 🎯 FIXED: Quantity Controls - Ensure proper display */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;    /* 🎯 RIGHT ALIGN - minus button on the right */
}

.quantity-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

/* 🎯 MINUS BUTTON - 20% bigger and bold text */
.quantity-btn-minus {
    width: 34px;                 /* 🎯 20% bigger than 28px */
    height: 34px;                /* 🎯 20% bigger than 28px */
    font-size: 16px;             /* 🎯 20% bigger font */
    font-weight: 900;            /* 🎯 Extra bold text */
    background: var(--primary-color);
    color: white;
}

.quantity-display {
    font-size: 14px;
    font-weight: 900;            /* 🎯 EXTRA BOLD TEXT - matching minus button */
    min-width: 20px;
    text-align: center;
}

/* Skeleton Loading */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 16px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.skeleton-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: pulse 2s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(222, 226, 230, 0.5) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.skeleton-info {
    padding: 12px;
}

.skeleton-title {
    height: 16px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(222, 226, 230, 0.5) 50%, var(--border) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: shimmer 2s infinite;
}

.skeleton-description {
    height: 12px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(222, 226, 230, 0.5) 50%, var(--border) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    width: 80%;
    animation: shimmer 2s infinite;
}

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

.skeleton-price {
    height: 18px;
    width: 60px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(222, 226, 230, 0.5) 50%, var(--border) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 2s infinite;
}

.skeleton-button {
    height: 32px;
    width: 40px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(222, 226, 230, 0.5) 50%, var(--border) 75%);
    background-size: 200% 100%;
    border-radius: 16px;
    animation: shimmer 2s infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}


/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    padding: 0;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--background);
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

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

.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    max-height: 50vh;
    overflow-y: auto;
}

.cart-items {
    padding: 16px 20px;
}

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

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

.item-info {
    flex: 1;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-price {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-summary {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
}

.modal-footer {
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
}

.btn-clear {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-header {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Product unavailable */
.product-card.unavailable {
    opacity: 0.5;
    pointer-events: none;
}

.product-card.unavailable::after {
    content: 'Недоступно';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-card {
    position: relative;
}


/* ═══════════════════════════════════════════════════════════
   🎁 PROMO CAROUSEL - Beautiful & Modern
   ═══════════════════════════════════════════════════════════ */

.promo-wrapper {
  width: 100%;
  padding: 16px;
  margin-bottom: 8px;
}

.promo-carousel-container {
  position: relative;
  overflow: hidden;
}

.promo-slides-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.promo-slides-track.dragging {
  transition: none;
}

.promo-slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: 0 4px;
}

/* Promo Card - Clean & Modern */
.promo-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  overflow: visible;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

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

/* Beautiful gradients */
.promo-slide:nth-child(1) .promo-card { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}
.promo-slide:nth-child(2) .promo-card { 
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 8px 24px rgba(240, 147, 251, 0.3);
}
.promo-slide:nth-child(3) .promo-card { 
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 8px 24px rgba(79, 172, 254, 0.3);
}

/* Header */
.promo-card-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.promo-emoji {
  font-size: 40px;
}

.promo-info h3 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.promo-info p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

/* Expanded Body */
.promo-card-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-card.expanded .promo-card-body {
  max-height: 300px;
  opacity: 1;
  padding: 0 20px 20px 20px;
}

/* Products Grid - Simple 2 cards */
.promo-products-grid {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.promo-product {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.promo-product:active {
  transform: scale(0.95);
}

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

.promo-product h4 {
  margin: 12px 12px 4px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.promo-product p {
  margin: 0 12px 12px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
}

.promo-add {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.promo-add:active {
  transform: scale(0.9);
}

/* Dots - Minimal & Clean */
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary-color);
}



/* Add padding to main content to account for bottom nav */
.container {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

