/* product-page.css */

body {
    background-color: #f8f9fa;
}

.back-to-catalog-btn {
    color: #68A1D6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.back-to-catalog-btn:hover {
    color: #4a7aa7;
}

.product-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;



}

/* Левая колонка: Галерея изображений */
.product-image-gallery .main-product-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 16px;

}

/* Правая колонка: Детали */
.product-details-actions {
    display: flex;
    flex-direction: column;
}

.product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.category-pill {
    background-color: #e9f3fb;
    color: #4a7aa7;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.product-title {
    font-size: 54px;
    font-weight: 700;
    color: #68A1D6;
    margin: 0;
    line-height: 1.2;
}

.product-form-caption {
    font-size: 24px;
    color: #68A1D6;
    margin: 5px 0 20px 0;
}

.product-description {
    font-size: 20px;
    line-height: 1.6;
    color: #68A1D6;
    margin-bottom: 25px;
}

.product-composition {
    margin-bottom: 25px;
}

.product-composition h4 {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 10px;
}

.product-composition ul {
    list-style: none;
    padding-left: 0;
}

.product-composition li {
    font-size: 15px;
    color: #495057;
    padding: 4px 0;
}

.product-price-block {
    margin-bottom: 25px;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.price-label {
    font-size: 18px;
    color: #68A1D6;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #4680B6;
}

.product-options {
    margin-bottom: 30px;
}

.product-options label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #68A1D6;
    font-size: 24px;
}

.days-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.day-option-btn {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    background-color: #fff;
    color: #68A1D6;
    border: 1px solid #68A1D6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}



.day-option-btn.selected {
    background-color: #68A1D6;
    color: #fff;
    border-color: #68A1D6;
    box-shadow: 0 4px 10px rgba(104, 161, 214, 0.3);
    transform: translateY(-2px);
}

.product-action-buttons {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.add-to-cart-btn, .individual-order-btn {
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 100px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.add-to-cart-btn {
    background-color: #68A1D6;
    color: #fff;
    border: none;
}

.add-to-cart-btn:hover {
    background-color: #5a8dbb;
    box-shadow: 0 4px 15px rgba(104, 161, 214, 0.4);
    transform: translateY(-2px);
}
.add-to-cart-btn:disabled {
    background-color: #a9cce3;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


.individual-order-btn {
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
    border: 1px solid #dee2e6;
}

.individual-order-btn:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

/* ===== НАЧАЛО: СТИЛИ ДЛЯ БЛОКА ДОПОЛНИТЕЛЬНОЙ ИНФОРМАЦИИ (НОВОЕ) ===== */
.product-additional-info {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.additional-info-title {
    font-size: 28px;
    color: #4680B6;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

/* Центрируем и ограничиваем ширину описания и аккордеона */
.product-additional-info .product-description,
.product-additional-info .product-info-accordion {

    margin-left: auto;
    margin-right: auto;
}
/* ===== КОНЕЦ: СТИЛИ ДЛЯ БЛОКА ДОПОЛНИТЕЛЬНОЙ ИНФОРМАЦИИ ===== */


/* Похожие товары */
.similar-products-section {

    padding-top: 40px;
    border-top: 1px solid #e9ecef;
    margin-top: 60px; /* Добавлен отступ сверху */
}
.similar-products-section h2 {
    text-align: center;
    font-size: 28px;
    color: #4680B6;
    margin-bottom: 30px;
}
.similar-products-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(20% - 16px);
    gap: 20px;
    overflow-x: auto;
    padding: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.similar-products-carousel::-webkit-scrollbar { display: none; }
.similar-product-item {
    text-decoration: none; color: inherit; display: block;  
    transition: transform 0.2s, box-shadow 0.2s;
}
.similar-product-item:hover { transform: translateY(-5px);}
.similar-product-item:hover::after {
    width: 0;
    height: 0;
}
.similar-product-item img { width: 100%; height: auto; object-fit: contain; margin-bottom: 10px; }
.similar-product-name { font-weight: 600; text-align: center; font-size: 20px; color: #68A1D6; }
.similar-product-form { display: block; text-align: center; font-size: 14px; color: #68A1D6; margin-top: 5px; }



/* ===== НАЧАЛО: СТИЛИ ДЛЯ БЛОКА СОСТАВА (скопировано из cart.css) ===== */

.form-title {
    font-weight: 700;
}

/* Контейнер для заголовка "Состав:" и "таблеток" с ингредиентами */
.cart-item-composition-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px; /* Отступ между элементами */
    margin-bottom: 25px; /* Отступ снизу, как у старого блока .product-composition */
}

/* Стиль для заголовка "Состав:" */
.composition-label {
    font-size: 18px; /* Размер как у заголовка h4 в старом дизайне */
    color: #68A1D6;  /* Цвет как у заголовка h4 в старом дизайне */
}

/* Стиль для "таблетки" с ингредиентом */
.composition-pill {
    color: #68A1D6;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #68A1D6;
    background-color: #fff;
}

/* ===== КОНЕЦ: СТИЛИ ДЛЯ БЛОКА СОСТАВА ===== */

/* Адаптивность */
@media (max-width: 992px) {
    .product-layout { grid-template-columns: 1fr; }
    .product-image-gallery { max-width: 400px; margin: 0 auto; }
    .similar-products-carousel { grid-auto-columns: calc(33.333% - 14px); }
}

@media (max-width: 767px) {
    .product-layout { padding: 20px; }
    .product-action-buttons { grid-template-columns: 1fr; }
    .similar-products-carousel { grid-auto-columns: calc(50% - 10px); }
}


@media (max-width: 480px) {
    .product-title {
        font-size: 40px;
    }
    .product-form-caption {
        font-size: 20px;
    }
}

.individual-order-btn:hover::after {
    width: 0;
}

/* ======================================================= */
/* == НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ПРОДУКТА (ИЮНЬ 2025)     == */
/* ======================================================= */

/* --- Стили для значка "Популярно" --- */
.title-with-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px; /* Отступ между заголовком и значком */
    margin: 0;
}

.popular-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #FFFBEB; /* Светло-желтый фон */
    color: #B45309; /* Темно-янтарный цвет текста */
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #FEEBC8; /* Светлая рамка в тон */
    flex-shrink: 0; /* Чтобы значок не сжимался */
}

.popular-badge svg {
    color: #F59E0B; /* Ярко-желтый для иконки */
}

/* --- Стили для аккордеона --- */
.product-info-accordion {
    margin-top: 25px;
    margin-bottom: 25px;
    border-top: 1px solid #e9ecef;
}

.accordion-item {
    border-bottom: 1px solid #e9ecef;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px 0;
    font-size: 28px;
    font-weight: 600;
    color: #68A1D6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.accordion-header:hover {
    color: #3a6a9a;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding-bottom 0.35s ease-out;
    padding-bottom: 0; /* Убираем отступ в свернутом состоянии */
}

.accordion-header.active + .accordion-body {
    padding-bottom: 20px; /* Добавляем отступ в развернутом состоянии */
}

.info-list {
    padding: 0 0 0 20px;
    list-style-type: disc;
    color: #495057;
}

.info-list li {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #68A1D6;
}
.info-list li:last-child {
    margin-bottom: 0;
}

/* --- Иконка "+"/"-" в аккордеоне --- */
.accordion-icon {
    position: relative;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease-out;
    flex-shrink: 0;
    margin-left: 15px;
}
.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background-color: #68A1D6;
    transition: transform 0.3s ease-out;
}
.accordion-icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
}
.accordion-icon::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    margin-left: -1px;
}

.accordion-header.active .accordion-icon {
    transform: rotate(135deg);
}
.accordion-header.active .accordion-icon::after {
    transform: rotate(90deg);
}

/* ======================================================= */
/* == СТИЛИ ДЛЯ ПРИЛИПАЮЩЕЙ ПАНЕЛИ ДЕЙСТВИЙ (ИЮНЬ 2025) == */
/* ======================================================= */

.sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 950;
    transform: translateY(100%); /* Изначально скрыта под экраном */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid #e9ecef;
}

.sticky-action-bar.show {
    transform: translateY(0); /* Появление на экране */
}

.sticky-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.sticky-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1; /* Занимает доступное пространство */
    min-width: 0; /* Для корректного переноса текста */
}

.sticky-product-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.sticky-product-text {
    display: flex;
    flex-direction: column;
}

.sticky-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-product-price {
    font-size: 14px;
    color: #4680B6;
}

.sticky-action-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0; /* Кнопки не сжимаются */
}

/* Адаптивность для мобильных */
@media (max-width: 767px) {
    .sticky-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .sticky-product-info {
        justify-content: center; /* Центрируем информацию о товаре */
    }

    .sticky-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .sticky-product-image {
        display: none; /* Скрываем картинку на очень маленьких экранах */
    }
    .sticky-product-name {
        font-size: 14px;
    }
    .sticky-action-buttons .add-to-cart-btn,
    .sticky-action-buttons .individual-order-btn {
        padding: 12px;
        font-size: 14px;
    }
}