/* ============================================================
   product_card_v3.css
   Стили для карточки товара v3
   Префикс классов: pc-v3__
   Адаптивность: только Bootstrap-классы (col-*, d-*, sticky-*)
   ============================================================ */

/* ---- Общий контейнер страницы ---- */
.pc-v3__page-wrapper {
    position: relative;
}

/* ---- Колонка информации ---- */
.pc-v3__info-column {
    padding: 0 1rem 1.5rem 1.5rem;
}

/* ---- Кнопки: sticky снизу, учитывая высоту бургер-меню на мобильном ---- */
/* Мобильный (<768px): бургер-меню занимает 72px снизу — отступаем от него */
.pc-v3__desktop-buttons {
    position: sticky;
    bottom: 72px;
    background: #fff;
    z-index: 10;
}

/* Десктоп (≥768px): бургер-меню скрыт (d-md-none), прилипаем к самому низу */
@media (min-width: 768px) {
    .pc-v3__desktop-buttons {
        bottom: 0;
    }
}

/* ---- Галерея изображений ---- */
.pc-v3__gallery-wrapper {
    padding: 0 0.5rem 0.5rem;
}

.pc-v3__gallery-wrapper .carousel__slide img {
    width: 100%;
    object-fit: contain;
    max-height: 420px;
}

/* Empty state галереи — нет изображений товара (дизайн Figma) */
.pc-v3__gallery-empty {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #F4F4F4;
    border-radius: 24px;
}

.pc-v3__gallery-empty-icon {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pc-v3__gallery-empty-icon img {
    width: 84px;
    height: 66px;
}

/* ---- Основной carousel (заменяет #viewProductFancyCarousel из viewProductFancyCarousel.css) ---- */
.pc-v3__carousel-main {
    margin: 0 auto 1rem auto;
    --carousel-button-color: #170724;
    --carousel-button-bg: #fff;
    --carousel-button-shadow: 0 2px 1px -1px rgb(0 0 0 / 20%),
        0 1px 1px 0 rgb(0 0 0 / 14%), 0 1px 3px 0 rgb(0 0 0 / 12%);
    --carousel-button-svg-width: 20px;
    --carousel-button-svg-height: 20px;
    --carousel-button-svg-stroke-width: 2.5;
}

.pc-v3__carousel-main img {
    width: auto;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.pc-v3__carousel-main .carousel__slide {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.pc-v3__carousel-main .carousel__button.is-prev {
    left: -1.5rem;
    opacity: 0.3;
}

.pc-v3__carousel-main .carousel__button.is-next {
    right: -1.5rem;
    opacity: 0.3;
}

.pc-v3__carousel-main .carousel__button:focus {
    outline: none;
    box-shadow: 0 0 0 4px #6d584f30;
}

/* ---- Миниатюры carousel (заменяет #viewProductFancyCarouselThumbCarousel из viewProductFancyCarousel.css) ---- */
.pc-v3__carousel-thumb .carousel__slide {
    overflow: hidden;
    opacity: 0.5;
    padding: 0;
    margin: 0.25rem;
    width: 96px;
    height: 64px;
}

.pc-v3__carousel-thumb .carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.pc-v3__carousel-thumb .carousel__slide.is-nav-selected {
    opacity: 1;
}

/* ---- Заголовок товара ---- */
.pc-v3__product-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color-primary, #222);
    margin-bottom: 0.25rem;
}

.pc-v3__brand {
    font-size: 0.875rem;
    color: var(--label-color-secondary, #888);
    margin-bottom: 0.5rem;
}

/* ---- Блок рейтинга ---- */
.pc-v3__rating-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-color-brown, #c47f1a);
}

.pc-v3__rating-row .rating__stars__block_v1 {
    color: var(--text-color-brown, #c47f1a);
}

.pc-v3__rating-value {
    font-weight: 600;
    color: var(--text-color-primary, #222);
}

.pc-v3__ratings-count {
    color: var(--label-color-secondary, #888);
}

/* ---- Блок цены ---- */
.pc-v3__price-block {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.pc-v3__price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color-brown, #9F6831);
}

.pc-v3__price-old {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--label-color-secondary, #aaa);
}

.pc-v3__oos-block {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1rem;
}

.pc-v3__oos-title {
    color: #9A999E;
    font-size: 24px;
    font-family: Onest, sans-serif;
    font-weight: 600;
    line-height: 35.2px;
}

.pc-v3__oos-hint {
    color: #9A999E;
    font-size: 16px;
    font-family: Onest, sans-serif;
    font-weight: 400;
    line-height: 22.4px;
}

.pc-v3__oos-category-link {
    color: #9F6831;
    font-size: 16px;
    font-family: Onest, sans-serif;
    font-weight: 400;
    line-height: 22.4px;
    text-decoration: underline;
}

.pc-v3__oos-category-link:hover {
    color: #7a4e21;
}

/* ---- Bundle баннер ---- */
.pc-v3__bundle-banner {
    background: #FFF5E9;
    border-radius: 35px;
    padding: 8px;
    display: inline-flex;
    align-items: flex-start;
    gap: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.pc-v3__bundle-banner:hover {
    color: inherit;
    text-decoration: none;
    background: #f7e8d4;
}

.pc-v3__bundle-banner-img {
    flex-shrink: 0;
}

.pc-v3__bundle-banner-body {
    flex: 1 1 0;
    padding: 12px 12px 12px 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.pc-v3__bundle-banner-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    align-self: stretch;
}

.pc-v3__bundle-banner-title {
    align-self: stretch;
    color: black;
    font-size: 16px;
    font-family: Onest, sans-serif;
    font-weight: 600;
    line-height: 20px;
}

.pc-v3__bundle-banner-subtitle {
    align-self: stretch;
    color: #9A999E;
    font-size: 14px;
    font-family: Onest, sans-serif;
    font-weight: 400;
    line-height: 19.6px;
}

.pc-v3__bundle-banner-prices {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    align-self: stretch;
}

.pc-v3__bundle-banner-price-new {
    color: #9F6831;
    font-size: 20px;
    font-family: Onest, sans-serif;
    font-weight: 600;
    line-height: 22px;
}

.pc-v3__bundle-banner-price-old {
    color: rgba(0, 0, 0, 0.25);
    font-size: 16px;
    font-family: Onest, sans-serif;
    font-weight: 600;
    text-decoration: line-through;
    line-height: 20px;
}

/* ---- Таб-пиллюли "О товаре" (Состав / Описание) ---- */

.pc-v3__tab-pane {
    position: relative;
}

.pc-v3__tabs-nav {
    flex-wrap: nowrap;
    outline: 2px solid var(--background-color-secondary);
    border-radius: var(--button-radius);
}

.pc-v3__tabs-nav-item {
    width: 100%;
}

.pc-v3__tabs-nav-link {
    /* Сброс браузерных стилей кнопки */
    border: none;
    outline: none;
    cursor: pointer;
    /* Визуальные стили */
    color: var(--text-color-primary);
    background-color: white;
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    border-radius: var(--button-radius);
    width: 100%;
    height: 100%;
    padding: 7px 25px;
    font-size: 1rem;
    white-space: nowrap;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.pc-v3__tabs-nav-link:focus,
.pc-v3__tabs-nav-link:focus-visible {
    outline: none;
    box-shadow: none;
}

.pc-v3__tabs-nav-link.active {
    color: var(--text-color-primary);
    background-color: var(--background-color-secondary);
}

.pc-v3__show-more-toggle {
    font-weight: 500;
    color: var(--text-color-brown);
    cursor: pointer;
    /*position: absolute;*/
    /*right: 0;*/
}

/* ---- Аккордеон ---- */
.pc-v3__accordion .accordion-item {
    border: none;
    border-top: 1px solid var(--background-color-secondary, #e9ecef);
}

.pc-v3__accordion .accordion-item:last-child {
    border-bottom: 1px solid var(--background-color-secondary, #e9ecef);
}

.pc-v3__accordion .accordion-button {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color-primary, #222);
    background-color: transparent;
    padding: 1rem 0;
    box-shadow: none;
}

.pc-v3__accordion .accordion-button:not(.collapsed) {
    color: var(--text-color-primary, #222);
    background-color: transparent;
    box-shadow: none;
}

.pc-v3__accordion .accordion-button::after {
    /* используем Bootstrap-иконки вместо дефолтной стрелки */
    background-image: none;
    content: "—";
    font-size: 1rem;
    font-weight: 400;
    color: var(--label-color-secondary, #888);
    transform: none;
}

.pc-v3__accordion .accordion-button.collapsed::after {
    content: "+";
    transform: none;
}

.pc-v3__accordion .accordion-body {
    padding: 0 0 1rem 0;
}

/* ---- Секция отзывов ---- */
.pc-v3__reviews-section {
    /*border-top: 1px solid var(--background-color-secondary, #e9ecef);*/
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.pc-v3__reviews-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Строка: крупная оценка слева + звёзды/подпись справа (как в v2) */
.pc-v3__reviews-avg-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.pc-v3__reviews-avg-score {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-color-primary, #222);
    margin-right: 0.25rem;
}

.pc-v3__reviews-stars-line {
    font-size: 0.9rem;
    color: var(--text-color-brown, #9F6831);
}

.pc-v3__reviews-stars-line .rating__stars__block_v1 {
    color: var(--text-color-brown, #9F6831);
}

.pc-v3__reviews-avg-label {
    font-size: 0.75rem;
    color: var(--label-color-secondary, #888);
    margin-top: 0.15rem;
}

/* Бары рейтинга — полная ширина, под блоком оценки */
.pc-v3__reviews-bars {
    width: 100%;
}

.pc-v3__reviews-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.pc-v3__reviews-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 10px;
    text-align: right;
    color: var(--text-color-primary, #222);
}

.pc-v3__reviews-bar-star {
    font-size: 0.75rem;
    /*color: var(--text-color-brown, #9F6831);*/
    color: var(--label-color-primary, black);
    line-height: 1;
}

.pc-v3__reviews-bar-track {
    flex: 1;
    height: 2px;
    background: var(--background-color-secondary, #dee2e6);
    border-radius: 2px;
}

.pc-v3__reviews-bar-fill {
    height: 100%;
    background: var(--text-color-primary, #333);
    border-radius: 2px;
}

.pc-v3__reviews-bar-count {
    font-size: 0.8rem;
    color: var(--label-color-secondary, #aaa);
    min-width: 20px;
    text-align: right;
}

/* ---- Один отзыв ---- */
.pc-v3__review-item {
    border-top: 1px solid var(--background-color-secondary, #e9ecef);
    padding: 1rem 0;
}

.pc-v3__review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.pc-v3__review-author {
    font-size: 0.9rem;
    font-weight: 600;
}

.pc-v3__review-verified {
    font-size: 0.75rem;
    color: var(--label-color-secondary, #888);
}

.pc-v3__review-date {
    font-size: 0.75rem;
    color: var(--label-color-secondary, #888);
}

.pc-v3__review-stars {
    font-size: 0.8rem;
    color: var(--text-color-brown, #c47f1a);
    /*color: var(--label-color-primary, black);*/
    margin-bottom: 0.4rem;
}

.pc-v3__review-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    color: var(--text-color-primary, #222);
}

.pc-v3__review-text {
    font-size: 0.85rem;
    color: var(--label-color-secondary, #666);
    line-height: 1.5;
}

/* ---- Нижние кнопки ---- */
.pc-v3__bottom-buttons {
    height: 100%;
    padding: 0.75rem 0 0.5rem 0;
}

/* Мобильная фиксированная панель кнопок */
.pc-v3__bottom-buttons-sticky {
    /*height: 100%;*/
    /*position: fixed;*/
    /*bottom: 0;*/
    /*left: 0;*/
    /*right: 0;*/
    /*z-index: 1030;*/
    background: #fff;
    /*padding: 0.75rem 1rem;*/
    /*box-shadow: 0 -2px 8px rgba(0,0,0,0.10);*/
}

/* Заглушка-пространство под фиксированной панелью на мобильном */
.pc-v3__bottom-buttons-spacer {
    height: 80px;
}

/* ---- Блок "Может быть интересно" — горизонтальный скролл (по макету Figma) ---- */

/* Обёртка с fade-масками по краям */
.pc-v3__related-scroll-wrap {
    position: relative;
}

.pc-v3__related-scroll-wrap::before,
.pc-v3__related-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 56px;
    z-index: 1;
    pointer-events: none;
}

.pc-v3__related-scroll-wrap::before {
    left: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 100%);
}

.pc-v3__related-scroll-wrap::after {
    right: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #fff 100%);
    opacity: 0.9;
}

/* Горизонтальная лента со скроллом */
.pc-v3__related-scroll {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pc-v3__related-scroll::-webkit-scrollbar {
    display: none;
}

/* Одна карточка */
.pc-v3__related-card {
    flex-shrink: 0;
    width: 224px;
    padding: 8px 12px 8px 8px;
    background: var(--background-color-secondary, #F4F4F4);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pc-v3__related-card-img-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.pc-v3__related-card-img-wrap img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.pc-v3__related-card-name {
    flex: 1 1 0;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 19.6px;
    color: var(--label-color-primary, black);
    word-wrap: break-word;
}
