/* Стили для страницы товара (Single Product Page) согласно макету Figma (node 6703:8083) */

body.single-product {
    margin: 0;
    min-height: 100vh;
    color: #ffffff;
    background-color: #0b0d11;
}

html:has(body.single-product) {
    background-color: #0b0d11;
}

/* Градиент на #page + fixed: без шва при разной высоте вьюпорта и длинном контенте (как cart/checkout). */
body.single-product #page.site {
    background-color: #0b0d11;
    background-image: linear-gradient(180deg, #0b0d11 0%, #1c1d1e 55.77%, #292929 100%);
    background-attachment: fixed;
}

body.single-product .site-header {
    background-color: transparent;
    border-bottom-color: rgba(42, 42, 42, 0.85);
    margin-bottom: 0;
}

.regagro-shop-single-product-page {
    padding-bottom: 0;
}

.regagro-shop-single-product-section {
    padding-top: 0;
    padding-bottom: 60px;
}

.regagro-shop-single-product-section>.site-inner {
    padding-top: 12px;
}

/* Хлебные крошки */
body.single-product .woocommerce-breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #ffffff;
}

body.single-product .woocommerce-breadcrumb a {
    color: #ffffff;
    opacity: 0.5;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

body.single-product .woocommerce-breadcrumb a:hover {
    opacity: 1;
}

body.single-product .woocommerce-breadcrumb .breadcrumb-delimiter,
body.single-product .woocommerce-breadcrumb .breadcrumb-separator {
    color: #ffffff;
    opacity: 0.5;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-breadcrumb {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        max-width: 100%;
        white-space: nowrap;
    }

    body.single-product .woocommerce-breadcrumb::-webkit-scrollbar {
        display: none;
    }

    body.single-product .woocommerce-breadcrumb a,
    body.single-product .woocommerce-breadcrumb .breadcrumb-separator {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* Основной контейнер товара — 2 колонки */
.regagro-shop-single-product {
    display: grid;
    grid-template-columns: 585px 1fr;
    grid-template-areas:
        "title title"
        "media summary"
        "buy buy";
    gap: 24px 100px;
    align-items: start;
}

.regagro-shop-single-product>* {
    min-width: 0;
}

@media (max-width: 1200px) {
    .regagro-shop-single-product {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "gallery"
            "description"
            "summary"
            "buy";
        gap: 24px;
    }

    .regagro-shop-single-product-column--media {
        display: contents;
    }

    .regagro-shop-single-product .woocommerce-product-gallery {
        grid-area: gallery;
        width: 100% !important;
        max-width: 100%;
    }

    .regagro-shop-single-product .regagro-shop-product-detailed-description {
        grid-area: description;
    }
}

/* Левая колонка: изображение + подробное описание (desktop) */
.regagro-shop-single-product-column--media {
    grid-area: media;
    min-width: 0;
}

@media (min-width: 1201px) {
    .regagro-shop-single-product-column--media {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
}

/* Галерея изображений */
.regagro-shop-single-product .woocommerce-product-gallery {
    position: relative;
    width: 100% !important;
    max-width: 100%;
    float: none !important;
    margin: 0 !important;
}

@media (min-width: 1201px) {
    .regagro-shop-single-product .woocommerce-product-gallery {
        width: 585px !important;
    }
}

.regagro-shop-single-product .woocommerce-product-gallery__wrapper {
    border: 1px solid #434343;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(180, 180, 180, 0.09);
}

.regagro-shop-single-product .woocommerce-product-gallery img {
    display: block;
    width: 100%;
    height: auto;
}

/* Информация о товаре (Summary) — правая колонка */
.regagro-shop-single-product .summary {
    grid-area: summary;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.regagro-shop-single-product .product_title {
    grid-area: title;
    font-family: 'Montserrat', sans-serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: #ffffff;
    letter-spacing: -0.02em;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.regagro-shop-single-product .regagro-shop-single-product-short-description {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
    color: #ffffff;
    opacity: 0.5;
    letter-spacing: -0.02em;
}

/* Блок описания и характеристик */
.regagro-shop-product-description-block {
    margin-bottom: 40px;
    order: -1 !important;
}

.regagro-shop-product-description-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    margin: 0 0 25px 0;
    text-transform: uppercase;
}

/* Характеристики в summary */
.regagro-shop-product-custom-description {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 30px;
}

.regagro-shop-product-custom-description p {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.regagro-shop-product-custom-description p strong,
.regagro-shop-product-custom-description p b {
    font-weight: 400;
    color: #ffffff;
    opacity: 0.5;
    flex-shrink: 0;
}

.regagro-shop-product-meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.regagro-shop-product-meta-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    line-height: 1.3;
}

.regagro-shop-product-meta-label {
    color: #ffffff;
    opacity: 0.5;
    min-width: 160px;
}

.regagro-shop-product-meta-value {
    color: #ffffff;
}

/* Package contents section */
.regagro-shop-package-contents {
    margin-top: 30px;
    padding-top: 30px;
}

.regagro-shop-package-contents__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.regagro-shop-package-contents__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #18785b;
}

.regagro-shop-package-contents__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.5;
}

.regagro-shop-package-contents__list {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    line-height: 1.4;
    color: #ffffff;
}

/* Цена, корзина и express checkout — отдельная строка grid */
.regagro-shop-price-cart-group {
    grid-area: buy;
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 16px 40px;
    align-items: center;
    margin-top: 40px;
    width: 100%;
    min-width: 0;
}

.regagro-shop-price-cart-group .price {
    grid-column: 2;
    grid-row: 1;
}

.regagro-shop-price-cart-group form.cart {
    grid-column: 3;
    grid-row: 1;
}

/* Express checkout (Stripe / WooPayments): без переопределений — стили плагина. */

.regagro-shop-price-cart-group wc-order-attribution-inputs {
    display: none;
}

.regagro-shop-single-product .regagro-shop-price-cart-group .price,
.regagro-shop-single-product .regagro-shop-price-cart-group .price .woocommerce-Price-amount,
.regagro-shop-single-product .regagro-shop-price-cart-group .price .woocommerce-Price-amount bdi {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 40px !important;
    font-weight: 400 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    margin: 0 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    flex-shrink: 0;
}

.regagro-shop-single-product .regagro-shop-price-cart-group .price ins {
    text-decoration: none !important;
}

.regagro-shop-single-product .regagro-shop-price-cart-group .cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin: 0 !important;
    flex-wrap: nowrap;
}

@media (max-width: 1024px) {
    .regagro-shop-price-cart-group {
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        gap: 16px 24px;
        justify-content: start;
    }

    .regagro-shop-price-cart-group .price {
        grid-column: 1;
        grid-row: 1;
    }

    .regagro-shop-price-cart-group form.cart {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
    }
}

@media (max-width: 767px) {
    .regagro-shop-price-cart-group {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 16px;
    }

    .regagro-shop-price-cart-group .price {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        text-align: center;
    }

    .regagro-shop-price-cart-group form.cart {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    .regagro-shop-single-product .regagro-shop-price-cart-group .price,
    .regagro-shop-single-product .regagro-shop-price-cart-group .price .woocommerce-Price-amount,
    .regagro-shop-single-product .regagro-shop-price-cart-group .price .woocommerce-Price-amount bdi {
        font-size: 32px !important;
    }

    .regagro-shop-single-product .regagro-shop-price-cart-group .cart {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0;
        width: 100%;
    }

    .regagro-shop-single-product .single_add_to_cart_button {
        width: 100%;
        flex: none;
        justify-content: center;
    }

    .regagro-shop-single-product .quantity {
        align-self: center;
    }
}

/* Смена порядка: кнопка первая, потом счетчик */
.regagro-shop-single-product .single_add_to_cart_button {
    order: 1 !important;
}

.regagro-shop-single-product .quantity {
    order: 2 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    height: 50px;
    padding: 0 5px;
    overflow: hidden;
}

.regagro-shop-single-product .quantity .qty {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

.regagro-shop-single-product .quantity .qty::-webkit-outer-spin-button,
.regagro-shop-single-product .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.regagro-shop-single-product .quantity button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
    padding: 0;
}

.regagro-shop-single-product .quantity button svg {
    display: block;
    width: 12px;
    height: 12px;
}

.regagro-shop-single-product .quantity button.minus svg {
    height: 2px;
}

.regagro-shop-single-product .quantity button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #18785b;
}

.regagro-shop-single-product .quantity button.minus {
    order: -1;
}

.regagro-shop-single-product .quantity button.plus {
    order: 1;
}

.regagro-shop-single-product .single_add_to_cart_button {
    background: #18785b !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 100px !important;
    padding: 13px 30px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    cursor: pointer;
    transition: background 0.2s ease !important;
    display: inline-flex !important;
    align-items: center;
    gap: 15px;
    height: 50px;
}

.regagro-shop-single-product .single_add_to_cart_button:hover {
    background: #14634b !important;
}

.regagro-shop-single-product .single_add_to_cart_button::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../../images/basket-icon.svg') no-repeat center;
    background-size: contain;
}

@media (max-width: 767px) {
    .regagro-shop-single-product .regagro-shop-price-cart-group form.cart .quantity {
        margin-top: 30px !important;
    }
}

/* Подробное описание — левая колонка под изображением */
.regagro-shop-single-product-column--media .regagro-shop-product-detailed-description {
    max-width: none;
}

.regagro-shop-product-detailed-description {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    max-width: 856px;
}

.regagro-shop-product-detailed-description h2,
.regagro-shop-product-detailed-description h3,
.regagro-shop-product-detailed-description h4,
.regagro-shop-product-detailed-description strong.section-title {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #18785b;
    margin: 40px 0 20px 0;
    text-transform: none;
}

.regagro-shop-product-detailed-description h2:first-child,
.regagro-shop-product-detailed-description h3:first-child,
.regagro-shop-product-detailed-description h4:first-child,
.regagro-shop-product-detailed-description strong.section-title:first-child {
    margin-top: 0;
}

.regagro-shop-product-detailed-description p {
    margin-bottom: 20px;
}

.regagro-shop-product-detailed-description ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.regagro-shop-product-detailed-description ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.regagro-shop-product-detailed-description ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffffff;
}