/* Каталог */
.catalog {
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.grid-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
}

.grid-row .card {
    flex: 1 1 calc(33.333% - 27px);
    min-width: 280px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 1024px) {
    .grid-row .card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .grid-row .card {
        flex: 1 1 100%;
    }
    
    .price-tag {
        bottom: 40px;
        font-size: 18px;
        padding: 4px 10px;
    }
    
    .kkal-tag {
        bottom: 10px;
        font-size: 16px;
        padding: 3px 8px;
    }
    
    .kkal-tag-right {
        bottom: 40px;
        right: 50px;
        font-size: 16px;
        padding: 4px 8px;
    }
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.click-icon {
    position: absolute;
    bottom: 12px;
    left: 50%;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.card:hover .click-icon {
    transform: translateX(-50%) scale(1.1);
    background: rgba(0, 0, 0, 0.9);
}

.click-icon svg {
    width: 35px;
    height: 35px;
    fill: #fff;
}

.price-tag {
    position: absolute;
    bottom: 50px;
    left: 16px;
    background: rgba(138, 43, 226, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    font-weight: 700;
    font-size: 20px;
    padding: 6px 12px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.card:hover .price-tag {
    transform: scale(1.1);
    background: rgba(138, 43, 226, 0.9);
}

.kkal-tag {
    position: absolute;
    bottom: 12px;
    left: 16px;
    background: rgba(138, 43, 226, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    font-weight: 700;
    font-size: 18px;
    padding: 4px 10px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.card:hover .kkal-tag {
    transform: scale(1.1);
    background: rgba(138, 43, 226, 0.9);
}

.card-content {
    padding: 0;
}

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
    opacity: 0;
    padding: 0 15px;
}

.card.open .card-details,
.grid-row.open .card .card-details {
    max-height: 400px;
    opacity: 1;
    padding: 8px 15px 20px;
    margin-top: 16px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 12px;
    margin: 6px 6px 0 0;
}

/* Контролы добавления в корзину */
.cart-controls {
    position: absolute;
    bottom: 45px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.add-to-cart-btn {
    background: #8a2be2;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
    background: #6b1fa0;
}

.add-to-cart-btn svg {
    width: 20px;
    height: 20px;
}

.add-to-cart-btn svg path,
.add-to-cart-btn svg circle {
    stroke: white;
    fill: none;
}

.add-to-cart-btn svg circle {
    fill: white;
}

.item-counter {
    background: #8a2be2;
    color: white;
    border-radius: 30px;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
}

.counter-btn {
    background: none;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.counter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.counter-value {
    min-width: 24px;
    text-align: center;
    font-size: 16px;
}

/* Индикаторы загрузки */
.loading-indicator {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #666;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #8a2be2;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщения */
.error-message {
    text-align: center;
    padding: 30px;
    background: #ffeeee;
    border-radius: 10px;
    margin: 20px;
    color: #d32f2f;
}

.empty-catalog {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #666;
    background: #fff;
    border-radius: 20px;
}

/* Промо-блок */
.promo-card {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 40px auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.promo-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.promo-image img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 30px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.promo-card.promo-open .promo-details {
    max-height: 2000px;
    padding: 30px;
}

.promo-details img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

.promo-details h1, .promo-details h2, .promo-details h3 {
    margin-top: 0;
}

.promo-details p {
    line-height: 1.6;
}

@media (max-width: 768px) {
    .promo-details {
        padding: 0 15px;
    }
    .promo-card.promo-open .promo-details {
        padding: 20px;
    }
}
/* Стили для промо-блока */
.promo-card {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 40px auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.promo-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.promo-image img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 30px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.promo-card.promo-open .promo-details {
    max-height: 2000px;
    padding: 30px;
}

.promo-details img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

/* Класс для центрированных изображений */
.promo-details img.image-centered {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Контейнер для видео */
.promo-details .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px auto;
    border-radius: 10px;
}

.promo-details .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.promo-details h1, .promo-details h2, .promo-details h3 {
    margin-top: 0;
}

.promo-details p {
    line-height: 1.6;
}

@media (max-width: 768px) {
    .promo-details {
        padding: 0 15px;
    }
    .promo-card.promo-open .promo-details {
        padding: 20px;
    }
}
/* Стили для видео в промо-блоке */
.promo-details video {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
    background: #000;
}

.promo-details .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px auto;
    border-radius: 10px;
    background: #000;
}

.promo-details .video-container iframe,
.promo-details .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}