﻿/* product-page.custom.css */

/* ============================================================
   Container width
   ============================================================ */
.template.product .product-page__container {
    max-width: 1280px;
}

/* ============================================================
   Breadcrumbs — 1 строка, скролл
   ============================================================ */
.breadcrumbs--scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

    .breadcrumbs--scroll::-webkit-scrollbar {
        height: 6px;
    }

    .breadcrumbs--scroll::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.12);
        border-radius: 999px;
    }

    .breadcrumbs--scroll .breadcrumbs__separator {
        opacity: .6;
    }

/* ============================================================
   Titlebar (✅ титл меньше)
   ============================================================ */
.product-titlebar {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.product-titlebar__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.18;
    font-weight: 900;
}

@media (max-width: 991px) {
    .product-titlebar__title {
        font-size: 20px;
    }
}

@media (max-width: 575px) {
    .product-titlebar__title {
        font-size: 18px;
    }
}

.product-titlebar__nav {
    gap: 10px;
}

.product-nav__btn {
    width: 44px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.94);
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
    text-decoration: none !important;
    font-size: 22px;
    font-weight: 900;
    color: #1f2a1f;
    background-clip: padding-box;
    transform: translateZ(0);
}

/* ============================================================
   Media layout
   ============================================================ */
.product-media {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.product-media__main {
    flex: 1 1 auto;
    min-width: 0;
}

.product-media__thumbs {
    flex: 0 0 96px;
    width: 96px;
}

@media (max-width: 767px) {
    .product-media {
        flex-direction: column;
    }

    .product-media__thumbs {
        width: 100%;
        flex: 0 0 auto;
    }
}

/* ============================================================
   Slider sizing
   ============================================================ */
.product-slider__grid {
    position: relative;
    width: 100%;
    height: 560px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,0.03);
}

@media (max-width: 991px) {
    .product-slider__grid {
        height: 440px;
    }
}

@media (max-width: 767px) {
    .product-slider__grid {
        height: 380px;
    }
}

.product-slider__grid .swiper-wrapper,
.product-slider__grid .swiper-slide,
.product-slider__grid .product-slider__item {
    height: 100% !important;
}

.product-slider__item {
    display: block;
    cursor: zoom-in;
    position: relative;
}

    .product-slider__item img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-slider__item::after {
        content: "Нажмите для увеличения";
        position: absolute;
        left: 12px;
        bottom: 12px;
        padding: 8px 10px;
        border-radius: 12px;
        background: rgba(255,255,255,0.88);
        border: 1px solid rgba(0,0,0,0.10);
        box-shadow: 0 10px 22px rgba(0,0,0,0.10);
        font-size: 12px;
        font-weight: 900;
        color: #1f2a1f;
        opacity: 0;
        transform: translateY(4px);
        transition: opacity .15s ease, transform .15s ease;
        pointer-events: none;
        z-index: 4;
    }

@media (min-width:768px) {
    .product-slider__grid:hover .product-slider__item::after {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width:767px) {
    .product-slider__item::after {
        opacity: 1;
        transform: none;
    }
}

.product-slider__noimg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f7f7f;
}

.product-slider__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    font-weight: 900;
    font-size: 13px;
    padding: 7px 10px;
    border-radius: 10px;
    color: #1f2a1f;
    background: rgba(137,180,60,0.18);
    border: 1px solid rgba(137,180,60,0.35);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    background-clip: padding-box;
    transform: translateZ(0);
}

.product-slider__fav {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 7;
}

.product-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
    cursor: pointer;
}

.product-slider__arrow-prev {
    left: 12px;
}

.product-slider__arrow-next {
    right: 12px;
}

.product-slider__arrow.is-hidden {
    display: none !important;
}

.product-slider__pagination {
    margin-top: 10px;
    text-align: center;
}

    .product-slider__pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        opacity: 1;
        background: rgba(137,180,60,0.70);
        border: 2px solid rgba(255,255,255,0.95);
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        margin: 0 5px !important;
    }

    .product-slider__pagination .swiper-pagination-bullet-active {
        background: rgba(137,180,60,0.95);
        border-color: rgba(255,255,255,1);
        box-shadow: 0 3px 10px rgba(0,0,0,0.22);
    }

.product-slider__hint {
    margin-top: 6px;
    font-size: 13px;
    color: #7f7f7f;
    text-align: center;
}

    .product-slider__hint b {
        color: #1f2a1f;
    }

/* ============================================================
   Thumbs
   ============================================================ */
.thumbs--smart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 560px;
    overflow-y: auto;
    overflow-x: hidden !important;
    padding-right: 4px;
}

    .thumbs--smart::-webkit-scrollbar {
        width: 6px;
    }

    .thumbs--smart::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.12);
        border-radius: 999px;
    }

@media (min-width:768px) {
    .thumbs--smart {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .thumbs--smart::-webkit-scrollbar {
            width: 0 !important;
            height: 0 !important;
        }
}

.thumbs__item {
    width: 96px;
    height: 96px;
    padding: 0;
    border: 2px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    background-clip: padding-box;
    transform: translateZ(0);
}

    .thumbs__item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .thumbs__item:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    }

.thumbs__item_active {
    border-color: rgba(137,180,60,0.95);
    box-shadow: 0 18px 34px rgba(137,180,60,0.28);
    transform: scale(1.02);
    position: relative;
}

    .thumbs__item_active::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 12px;
        box-shadow: inset 0 0 0 2px rgba(255,255,255,0.88);
        pointer-events: none;
    }

@media (max-width:767px) {
    .thumbs--smart {
        flex-direction: row;
        max-height: none;
        overflow-y: visible;
        overflow-x: auto !important;
        padding-right: 0;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

        .thumbs--smart::-webkit-scrollbar {
            height: 6px;
            width: auto;
        }

    .thumbs__item {
        flex: 0 0 84px;
        width: 84px;
        height: 84px;
        border-radius: 12px;
    }
}

/* ============================================================
   Price pill (unit)
   ============================================================ */
.template.product .product__price.cost {
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

    .template.product .product__price.cost .cost__item:first-child {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        font-weight: 900;
        font-size: 26px;
        line-height: 1.1;
        font-variant-numeric: tabular-nums;
        color: #1f2a1f;
        background: rgba(137,180,60,0.12);
        border: 1px solid rgba(137,180,60,0.30);
        padding: 6px 12px;
        border-radius: 14px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.08);
        background-clip: padding-box;
        transform: translateZ(0);
    }

@media (max-width:767px) {
    .template.product .product__price.cost .cost__item:first-child {
        font-size: 22px;
        padding: 5px 10px;
        border-radius: 12px;
    }
}

.sticker-item-full.special {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 900;
    color: #1f2a1f;
    background: rgba(255,99,132,0.10);
    border: 1px solid rgba(255,99,132,0.22);
    padding: 8px 12px;
    border-radius: 14px;
    background-clip: padding-box;
    transform: translateZ(0);
}

/* ============================================================
   Buy card + qty + buttons
   ============================================================ */
.product-buy-card {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    box-shadow: 0 10px 24px rgba(0,0,0,0.04);
}

.product-buy-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

    .product-buy-card__row:first-child {
        margin-top: 0;
    }

.product-buy-card__qty {
    align-items: center;
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.qty__btn {
    width: 46px;
    height: 44px;
    border: 0;
    background: rgba(137,180,60,0.08);
    color: #1f2a1f;
    font-weight: 900;
    cursor: pointer;
    font-size: 18px;
}

.qty__input {
    width: 62px;
    height: 44px;
    border: 0;
    text-align: center;
    font-weight: 900;
    outline: none;
    font-size: 16px;
}

.qty-total {
    margin-left: auto;
    font-size: 16px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.qty-total__muted {
    color: #7f7f7f;
    margin-right: 6px;
}

.qty-total__sum {
    font-weight: 900;
    color: #1f2a1f;
}

/* ✅ кнопки: перенос вниз если не влазит + центрирование */
.product__options {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

    .product__options > * {
        flex: 0 1 auto;
    }

.product-buy-card .product__btn::before,
.product-buy-card .product__btn::after {
    content: none !important;
    display: none !important;
}

.product-buy-card .product__btn,
.product-buy-card .product__btn:focus,
.product-buy-card .product__btn:hover,
.product-buy-card .product__btn:active {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 26px !important;
    min-height: 48px;
    white-space: nowrap;
    border: 0 !important;
    background: #f0c44f !important;
    color: #1f2a1f !important;
    font-weight: 900 !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12) !important;
    transform: translateZ(0);
}

    .product-buy-card .product__btn .btn__text {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

/* ✅ Быстрая покупка: чуть ниже по высоте */
.product-buy-card .quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 14px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    color: #1f2a1f;
    font-weight: 900;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1;
    cursor: pointer;
}

@media (min-width:768px) {
    .product-buy-card .product__btn {
        min-width: 190px;
        width: auto !important;
    }

    .product-buy-card .quick-btn {
        min-width: 190px;
    }
}

@media (max-width:767px) {
    .product-buy-card .product__btn,
    .product-buy-card .quick-btn {
        width: 100% !important;
    }

    .order-mini--center {
        margin-top: 4px;
    }
}

/* mini order */
.order-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.order-mini--center {
    width: 100%;
    justify-content: center;
}

.order-mini__label {
    font-size: 13px;
    color: #7f7f7f;
    font-weight: 800;
    margin-right: 2px;
    white-space: nowrap;
}

.share-mini__btn {
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.88);
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 900;
    color: #1f2a1f;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-clip: padding-box;
    transform: translateZ(0);
    line-height: 1;
}

.order-mini .share-mini__btn[href*="t.me"] {
    background: #2AABEE !important;
    border-color: rgba(42,171,238,0.35) !important;
    color: #fff !important;
}

.order-mini .share-mini__btn[href*="wa.me"],
.order-mini .share-mini__btn[href*="whatsapp"] {
    background: #25D366 !important;
    border-color: rgba(37,211,102,0.35) !important;
    color: #fff !important;
}

/* ============================================================
   ✅ Categories card
   ============================================================ */
.product-categories-card {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    background: rgba(255,255,255,0.60);
    box-shadow: 0 10px 24px rgba(0,0,0,0.04);
}

.product-categories-card__title {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 900;
    color: #1f2a1f;
}

.product-categories-card__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
   Состав — ✅ 10px и не так жирно
   ============================================================ */
.comp-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.comp-compact__item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 12px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 10px;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
}

/* ============================================================
   Tabs
   ============================================================ */
.product-tabs {
    margin-top: 26px;
}

.product-tabs__nav {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 2px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

    .product-tabs__nav::-webkit-scrollbar {
        height: 6px;
    }

    .product-tabs__nav::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.12);
        border-radius: 999px;
    }

.product-tabs__tab {
    appearance: none;
    border: 1px solid rgba(137,180,60,0.18);
    background: rgba(137,180,60,0.06);
    color: #243024;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
    background-clip: padding-box;
    transform: translateZ(0);
}

    .product-tabs__tab.is-active {
        background: rgb(146 179 79);
        border-color: rgba(137,180,60,0.26);
        box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    }

.product-tabs__panes {
    padding-top: 18px;
}

.product-tabs__pane {
    display: none;
}

    .product-tabs__pane.is-active {
        display: block;
    }

.product-tab-section {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    background: rgba(255,255,255,0.6);
    box-shadow: 0 10px 24px rgba(0,0,0,0.04);
}

    .product-tab-section:first-child {
        margin-top: 0;
    }

.product-tab-section__title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 900;
    color: #1f2a1f;
}

.product-tab-section__text {
    margin: 0;
    font-size: 15px;
    color: #000;
    line-height: 1.45;
}

@media (max-width:767px) {
    .product-tabs__tab {
        padding: 9px 12px;
        border-radius: 7px;
    }

    .product-tab-section {
        padding: 14px;
        border-radius: 14px;
    }
}

/* ============================================================
   ✅ Рекомендации: стрелки строго у слайдера
   ============================================================ */
#tab-recommend .related__grid {
    position: relative;
    padding: 0 44px;
}

#tab-recommend .top__arrow-prev,
#tab-recommend .top__arrow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

#tab-recommend .top__arrow-prev {
    left: 0;
}

#tab-recommend .top__arrow-next {
    right: 0;
}

@media (max-width:767px) {
    #tab-recommend .related__grid {
        padding: 0;
    }
}

/* ============================================================
   ✅ Rating line: "Читать отзывы" рядом со звёздами
   ============================================================ */
.product-rating-line .rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .product-rating-line .rating a {
        display: inline-flex;
        align-items: center;
        line-height: 1;
        padding-top: 2px;
    }

/* safety */
.product__price .cost__item, .getsale p, .getsale a {
    background-clip: padding-box;
    transform: translateZ(0);
}
