/* SADAF SUT SMONS - Фирменный стиль */

:root {
    /* Primary - молочно-синяя гамма */
    --color-primary: #4A90C5;
    --color-primary-dark: #2D5F8C;
    --color-primary-light: #E8F4FB;

    /* Backgrounds - теплые молочные тона */
    --color-bg-main: #FDFCFA;
    --color-bg-surface: #FFFFFF;
    --color-bg-accent: #FFF9F0;

    /* Accent - золотистые оттенки */
    --color-accent: #E8A837;
    --color-accent-light: #FFF4E0;

    /* Text */
    --color-text-primary: #2C3E50;
    --color-text-secondary: #7F8C9A;
    --color-text-muted: #B0B8C1;

    /* Success / Fresh */
    --color-success: #47B881;
    --color-success-light: #E8F7F0;

    /* Legacy compatibility */
    --color-white: #ffffff;
    --color-navy: #2d465e;
    --color-blue: #4A90C5;
    --color-dark-blue: #2D5F8C;
    --color-light-gray: #f8f9fa;
    --color-gray: #7F8C9A;
    
    /* Шрифты */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-nav: 'Poppins', sans-serif;
    
    /* Размеры */
    --top-bar-height: 60px;
    --bottom-nav-height: 60px;
    
    /* iOS Safe Area */
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
    --safe-area-inset-right: env(safe-area-inset-right);
    
    /* Telegram theme colors */
    --tg-theme-bg-color: var(--color-white);
    --tg-theme-text-color: var(--color-navy);
    --tg-theme-hint-color: var(--color-gray);
    --tg-theme-link-color: var(--color-blue);
    --tg-theme-button-color: var(--color-blue);
    --tg-theme-button-text-color: var(--color-white);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-navy);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Skeleton Screen - показывается сразу при загрузке */
.skeleton-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    padding: 20px;
}

.skeleton-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.skeleton-logo {
    margin-bottom: 30px;
}

.skeleton-brand-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.skeleton-brand-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

.skeleton-text {
    margin-bottom: 30px;
}

.skeleton-text p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text-secondary);
    margin: 8px 0;
    line-height: 1.5;
}

.skeleton-spinner {
    display: flex;
    justify-content: center;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-area-inset-top);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: var(--color-white);
    border-bottom: 1px solid rgba(45, 70, 94, 0.1);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy);
    letter-spacing: 0.3px;
}

.brand-subtitle {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--color-blue);
    font-weight: 400;
}

.top-actions .btn {
    border-radius: 12px;
    font-size: 1.2rem;
    padding: 0.4rem 0.7rem;
}

/* Content Area */
.content-area {
    flex: 1;
    margin-top: var(--top-bar-height);
    margin-bottom: calc(var(--bottom-nav-height) + var(--safe-area-inset-bottom));
    padding: 1rem 0;
    overflow-y: auto;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-inset-bottom));
    background: var(--color-white);
    border-top: 1px solid rgba(45, 70, 94, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-area-inset-bottom);
    padding-left: var(--safe-area-inset-left);
    padding-right: var(--safe-area-inset-right);
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    font-family: var(--font-nav);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item i {
    font-size: 1.4rem;
    color: var(--color-gray);
    transition: all 0.3s ease;
}

.nav-label {
    font-size: 0.7rem;
    color: var(--color-gray);
    margin-top: 0.2rem;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.25rem;
    box-sizing: border-box;
}

.nav-item.active i,
.nav-item:hover i {
    color: var(--color-blue);
}

.nav-item.active .nav-label,
.nav-item:hover .nav-label {
    color: var(--color-blue);
    font-weight: 600;
}

.nav-item .badge {
    position: absolute;
    top: 5px;
    right: 20%;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden; /* Нужно для скругления углов */
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card-img-top {
    height: 220px; /* Увеличена высота для отображения всех надписей на зелёной плашке */
    object-fit: cover;
    /* Важно: показываем верх изображения (заголовки на зелёной плашке не обрезаются) */
    object-position: top;
    width: 100%;
    border-radius: 16px 16px 0 0; /* Скругление только сверху */
}

/* Buttons */
.btn-primary {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
    border-radius: 12px;
    font-family: var(--font-nav);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-dark-blue);
    border-color: var(--color-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 155, 204, 0.4);
}

/* Mobile button optimizations */
.btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .btn-primary {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .btn-primary {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .btn-sm {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
}

.btn-outline-primary {
    color: var(--color-blue);
    border-color: var(--color-blue);
    border-radius: 12px;
}

.btn-outline-primary:hover {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
    color: var(--color-white);
}

/* Product Card */
.product-card {
    margin-bottom: 1rem;
}

.product-card .card-body {
    padding: 0.875rem;
    padding-bottom: 1.5rem; /* Значительно увеличенный нижний отступ для видимости всего блока */
    display: flex;
    flex-direction: column;
    min-height: 0; /* Позволяет flex-элементам сжиматься */
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.1rem; /* Такой же размер как у цены */
    font-weight: 600;
    color: var(--color-navy);
    /* Ещё компактнее: ближе к цене и меньше межстрочный интервал */
    margin-bottom: 0.08rem;
    line-height: 1.2;
    flex-shrink: 0; /* Название не сжимается */
}

.product-description {
    flex-grow: 0 !important; /* Убираем растягивание пустого описания */
    margin-bottom: 0 !important;
    min-height: 0;
}

.product-price {
    font-family: var(--font-nav);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-blue);
    flex-shrink: 0; /* Цена не сжимается */
    white-space: nowrap; /* Предотвращает перенос и наложение цифр */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Блок с ценой, кнопкой и статусом - не обрезается */
.product-card .card-body > .mt-2 {
    margin-top: auto !important; /* Автоматический отступ - выравнивает кнопки внизу карточки */
    flex-shrink: 0; /* Блок не сжимается */
    padding-bottom: 0; /* Убираем лишний отступ */
}

/* Используем пустое описание для растягивания пространства */
.product-description {
    flex-grow: 1 !important; /* Растягиваем пустое описание для выравнивания кнопок */
    margin-bottom: 0 !important;
    min-height: 0;
    font-size: 0.8rem;
    color: var(--color-gray);
}

/* Mobile product card optimizations */
@media (max-width: 576px) {
    .product-card .card-body {
        padding: 0.75rem;
        padding-bottom: 1.4rem; /* Значительно увеличенный нижний отступ для видимости всего блока */
    }

    .product-title {
        font-size: 0.9rem; /* Уменьшен для компактности */
        margin-bottom: 0.08rem; /* Компактный отступ */
        line-height: 1.2;
    }

    .product-price {
        font-size: 0.7rem !important; /* Уменьшен размер для предотвращения наложения */
        max-width: 65% !important; /* Ограничиваем ширину цены */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1 !important; /* Позволяет сжиматься при необходимости */
        line-height: 1.2 !important; /* Компактная высота строки */
    }
    
    .product-card .card-body .d-flex.mb-2 {
        gap: 0.5rem !important; /* Увеличен gap между ценой и единицей */
        width: 100% !important;
        flex-wrap: wrap !important; /* Разрешаем перенос на новую строку */
    }
    
    .product-card .card-body .d-flex.mb-2 > div {
        flex: 1;
        min-width: 0;
    }
    
    .product-card .card-body .d-flex.mb-2 small {
        font-size: 0.6rem !important; /* Уменьшен размер единицы измерения */
        flex-shrink: 0 !important; /* Единица измерения не сжимается */
    }

.product-description {
    flex-grow: 1 !important; /* Растягиваем для выравнивания кнопок */
    margin-bottom: 0 !important;
    display: block; /* Показываем для flex-grow */
    height: 0; /* Скрываем визуально */
}

    .card-img-top {
        height: 180px; /* Увеличена высота для мобильных - все надписи видны */
    }
}

@media (max-width: 380px) {
    .product-card .card-body {
        padding: 0.6rem;
        padding-bottom: 1.3rem; /* Значительно увеличенный нижний отступ для видимости всего блока */
    }

    .product-title {
        font-size: 0.85rem; /* Уменьшен для очень маленьких экранов */
        margin-bottom: 0.08rem; /* Компактный отступ */
        line-height: 1.2;
    }

    .product-price {
        font-size: 0.65rem !important; /* Минимальный размер для очень маленьких экранов */
        max-width: 60% !important; /* Ограничиваем ширину цены */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1 !important; /* Позволяет сжиматься при необходимости */
        line-height: 1.2 !important; /* Компактная высота строки */
    }
    
    .product-card .card-body .d-flex.mb-2 {
        gap: 0.5rem !important; /* Увеличен gap между ценой и единицей */
    }
    
    .product-card .card-body .d-flex.mb-2 small {
        font-size: 0.55rem !important; /* Уменьшен размер единицы измерения */
        max-width: 30% !important; /* Ограничена ширина единицы */
    }

    .product-description {
        flex-grow: 1 !important; /* Растягиваем для выравнивания кнопок */
        margin-bottom: 0 !important;
        display: block; /* Показываем для flex-grow */
        height: 0; /* Скрываем визуально */
    }

    .card-img-top {
        height: 160px; /* Увеличена высота для очень маленьких экранов - все надписи видны */
    }
}

/* Category Badge */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: var(--color-light-gray);
    color: var(--color-navy);
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-badge img {
    flex-shrink: 0;
    vertical-align: middle;
}

.category-badge:hover,
.category-badge.active {
    background: var(--color-blue);
    color: var(--color-white);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: url('/static/images/main-promo.jpg');
    background-size: cover;
    background-position: center 85%;
    color: var(--color-white);
    padding: 2rem 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15); /* Легкая маска для читаемости текста */
    pointer-events: none;
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Скрываем верхнюю часть изображения с логотипом Milk */
.hero-section::before {
    content: '';
    display: none; /* Полностью скрываем псевдоэлемент для отображения фонового изображения */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: transparent;
    z-index: 0;
}

.hero-section .text-center {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem; /* Увеличен с 1.6rem */
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Добавлена тень для лучшей читаемости */
}

.hero-subtitle {
    font-size: 1.25rem; /* Увеличен с 1rem */
    opacity: 0.95;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Добавлена тень для лучшей читаемости */
}

/* Badges */
.badge {
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Utilities */
.text-navy {
    color: var(--color-navy);
}

.text-blue {
    color: var(--color-blue);
}

.bg-navy {
    background-color: var(--color-navy);
}

.bg-blue {
    background-color: var(--color-blue);
}

/* Responsive */
@media (max-width: 576px) {
    .brand-title {
        font-size: 0.9rem;
    }

    .brand-subtitle {
        font-size: 0.6rem;
    }

    .hero-section {
        min-height: 180px;
        padding: 1.25rem 0.875rem;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.75rem; /* Увеличен с 1.25rem */
    }

    .hero-subtitle {
        font-size: 1rem; /* Увеличен с 0.875rem */
        margin-bottom: 1rem !important;
    }

    .hero-section .btn-lg {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }

    .nav-label {
        font-size: 0.65rem;
        text-align: center;
        white-space: nowrap;
        width: 100%;
        display: block;
    }

    .content-area {
        padding: 0.875rem 0;
    }

    .promotions-section {
        margin-bottom: 1.25rem;
    }

    .categories-section {
        margin-bottom: 1.25rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 400px) {
    .hero-section {
        min-height: 160px;
        padding: 1rem 0.75rem;
    }

    .hero-title {
        font-size: 1.5rem; /* Увеличен с 1.1rem */
    }

    .hero-subtitle {
        font-size: 0.95rem; /* Увеличен с 0.8rem */
    }

    .hero-section .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Modal */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(45, 70, 94, 0.1);
}

.list-group-item {
    border: 1px solid rgba(45, 70, 94, 0.1);
    border-radius: 12px !important;
    margin-bottom: 0.5rem;
    font-family: var(--font-nav);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: var(--color-blue);
    color: var(--color-white);
    transform: translateX(5px);
}

/* Checkout Styles */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 1rem;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--color-light-gray);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-light-gray);
    color: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--color-blue);
    color: var(--color-white);
    box-shadow: 0 0 0 4px rgba(85, 155, 204, 0.2);
}

.step.completed .step-number {
    background: var(--color-dark-blue);
    color: var(--color-white);
}

.step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.75rem;
    color: var(--color-gray);
    font-family: var(--font-nav);
}

.step.active .step-label {
    color: var(--color-blue);
    font-weight: 600;
}

.payment-option {
    padding: 1rem;
    border: 2px solid var(--color-light-gray);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: var(--color-blue);
    background: rgba(85, 155, 204, 0.05);
}

.payment-option:has(input:checked) {
    border-color: var(--color-blue);
    background: rgba(85, 155, 204, 0.1);
}

.success-animation i {
    animation: scaleIn 0.5s ease;
}

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

/* ============================================
   PREMIUM UI IMPROVEMENTS
   ============================================ */

/* Section Styles */
.section {
    padding: 1.5rem 0;
    position: relative;
}

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

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.view-all-btn {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.view-all-btn:hover {
    color: var(--color-primary-dark);
    transform: translateX(3px);
}

/* Premium Promo Card - Green Theme */
.promo-card {
    background: linear-gradient(135deg, #E8F7F0 0%, #D4F1E3 100%);
    border-radius: 16px;
    padding: 1.5rem 1.5rem; /* Увеличен padding для большего текста */
    min-height: 120px; /* Увеличена минимальная высота */
    box-shadow: 0 4px 16px rgba(71, 184, 129, 0.15);
    border: 2px solid var(--color-success);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.promo-card .d-flex {
    position: relative;
    z-index: 1; /* Контент поверх конфети */
}

.promo-card:hover {
    box-shadow: 0 6px 24px rgba(71, 184, 129, 0.25);
    transform: translateY(-2px);
}

.promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

/* Конфети на фоне банера акций */
.promo-confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.6;
    z-index: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 20, 147, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 191, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(50, 205, 50, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(255, 165, 0, 0.3) 0%, transparent 50%);
    background-size: 40px 40px, 30px 30px, 35px 35px, 45px 45px, 25px 25px;
    background-position: 10% 20%, 85% 60%, 50% 40%, 25% 75%, 75% 15%;
    background-repeat: no-repeat;
}

.promo-confetti::before,
.promo-confetti::after {
    content: '🎉';
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
}

.promo-confetti::before {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.promo-confetti::after {
    top: 35%;
    right: 15%;
    animation-delay: 1.5s;
    font-size: 1rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

.promo-star {
    font-size: 2rem;
    flex-shrink: 0;
}

.promo-icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.promo-btn {
    background: var(--color-success);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
    cursor: pointer;
}

.promo-btn:hover {
    background: #3A9E6C;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(71, 184, 129, 0.3);
}

/* Promo card responsive */
@media (max-width: 576px) {
    .promo-card {
        padding: 0.875rem 1rem;
    }

    .promo-card .d-flex {
        gap: 0.75rem !important;
        align-items: center !important;
    }

    .promo-star {
        font-size: 1.75rem;
    }

    .promo-card h5 {
        font-size: 0.95rem !important;
        line-height: 1.3;
        margin-bottom: 0.25rem !important;
    }

    .promo-card .text-muted {
        font-size: 0.7rem !important;
    }

    .promo-icon {
        font-size: 1.75rem;
    }
}

@media (max-width: 400px) {
    .promo-card {
        padding: 0.75rem;
    }

    .promo-card h5 {
        font-size: 0.85rem !important;
    }

    .promo-icon {
        font-size: 1.75rem;
    }

    .promo-btn {
        padding: 0.45rem 1rem;
        font-size: 0.75rem;
    }
}

/* Featured Section (Popular Products) */
.featured-section {
    background: transparent;
    border-radius: 20px;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

/* Premium Search */
.search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid transparent;
    border-radius: 20px;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-size: 0.938rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(74, 144, 197, 0.15);
}

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

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Sticky Categories */
.categories-sticky {
    position: sticky;
    top: 60px;
    background: var(--color-bg-main);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    z-index: 50;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.categories-scroll {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
}

.category-badge {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Content area padding */
.content-area {
    padding: 1.5rem 1rem;
}

/* Improved card hover */
.card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Category icons larger */
.category-icon {
    font-size: 3rem !important;
}

/* Improved spacing */
.home-page .categories-section,
.home-page .promotions-section {
    margin-bottom: 2rem;
}

/* ============================================
   MOBILE-FIRST IMPROVEMENTS
   ============================================ */

/* Add to cart button text control */
.btn-add-to-cart .btn-text-full {
    display: inline;
}

.btn-add-to-cart .btn-text-short {
    display: none;
}

@media (max-width: 576px) {
    .btn-add-to-cart .btn-text-full {
        display: none;
    }

    .btn-add-to-cart .btn-text-short {
        display: inline;
    }
}

/* Quantity input optimizations */
.qty-input-wrapper {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.qty-input-wrapper input {
    width: 60px;
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .qty-input-wrapper {
        gap: 0.3rem;
    }

    .qty-input-wrapper input {
        width: 50px;
        padding: 0.35rem 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .qty-input-wrapper input {
        width: 45px;
        padding: 0.3rem 0.35rem;
        font-size: 0.75rem;
    }
}

/* Ensure text doesn't overflow in small screens */
.text-muted.small {
    font-size: 0.75rem;
}

@media (max-width: 576px) {
    .text-muted.small {
        font-size: 0.7rem;
    }
}

/* Выравнивание карточек в сетке - кнопки на одном уровне */
.row.g-3 {
    align-items: stretch; /* Карточки растягиваются на всю высоту ряда */
}

/* Fix Bootstrap grid gaps on mobile */
@media (max-width: 576px) {
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

@media (max-width: 380px) {
    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }
}


