/* Стили WooCommerce для дочерней темы Reboot. */

:root {
    --reboot-woo-button-bg: #455ca2;
    --reboot-woo-button-color: #fff;
    --reboot-woo-cart-totals-bg: rgba(0, 0, 0, .04);
    --reboot-woo-cart-totals-border: rgba(0, 0, 0, .05);
    --reboot-woo-coupon-border: rgba(0, 0, 0, .2);
    --reboot-woo-input-border: #ced4da;
    --reboot-woo-error-color: #111;
    --reboot-woo-error-bg: #fbeeed;
    --reboot-woo-info-color: #455ca2;
    --reboot-woo-info-bg: rgba(69, 92, 162, .08);
    --reboot-woo-success-color: #285b3d;
    --reboot-woo-success-bg: #edf7f0;
    --reboot-woo-tabs-border: #eee;
}

ul.products {
    display: flex;
    flex-wrap: wrap;
    float: left;
    width: 100%;
    clear: both;
    box-sizing: border-box;
    padding: 0;
    margin-left: 0;
}

:is(.woocommerce, .woocommerce-page) :is(.woocommerce-result-count, .woocommerce-ordering) {
    margin-bottom: 1.5rem;
}

:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-result-count {
    float: left;
}

:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-ordering {
    float: right;
}

:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products {
    clear: both;
}

/* WooCommerce может выводить архив магазина с классом .woocommerce-page,
 * даже если страница магазина назначена отдельно в настройках. */
.woocommerce-page ul.products li.product {
    box-sizing: border-box;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li {
    margin: 0;
}

.woocommerce nav.woocommerce-pagination .page-numbers li > .page-numbers {
    position: relative;
    display: inline-block;
    margin: 0 .3em;
    padding: .7em 1em;
    text-decoration: none;
    z-index: 1;
    transition: all .3s;
}

.woocommerce nav.woocommerce-pagination a.page-numbers::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--reboot-woo-button-bg);
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform .3s;
    z-index: -1;
}

.woocommerce nav.woocommerce-pagination a.page-numbers:hover,
.woocommerce nav.woocommerce-pagination a.page-numbers:focus-visible {
    color: var(--reboot-woo-button-color);
}

.woocommerce nav.woocommerce-pagination a.page-numbers:hover::before,
.woocommerce nav.woocommerce-pagination a.page-numbers:focus-visible::before {
    transform: scaleY(1);
}

.woocommerce nav.woocommerce-pagination .page-numbers.current {
    box-shadow: inset 0 0 0 1px var(--reboot-woo-input-border);
    color: #666;
}

.woocommerce nav.woocommerce-pagination .page-numbers.dots {
    opacity: .7;
}

ul.products li.product {
    display: flex;
    flex-direction: column;
}

ul.products li.product > .button {
    margin-top: auto;
    order: 2;
}

ul.products li.product > .added_to_cart {
    order: 1;
    margin-bottom: .5rem;
}

.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.woocommerce-cart .woocommerce .woocommerce-notices-wrapper {
    width: 100%;
}

.woocommerce-cart .woocommerce .cart {
    display: table;
    margin-top: 0 !important;
}

.woocommerce-cart .cart .product-thumbnail img {
    max-width: 80px;
    height: auto;
}

.woocommerce-cart .product-quantity input.qty {
    width: 80px;
}

.woocommerce-cart .cart .product-remove {
    padding: 0;
}

.woocommerce-cart .cart .product-remove a.remove {
    font-size: 24px;
    text-decoration: none;
}

.woocommerce-cart .woocommerce table,
.woocommerce-cart .woocommerce table th,
.woocommerce-cart .woocommerce table td {
    border: 0;
}

.woocommerce-cart .woocommerce table th {
    background: transparent;
}

.woocommerce-cart .cart td.actions {
    padding-top: 1rem;
    text-align: right;
}

.woocommerce-cart .cart td.actions .coupon {
    float: left;
    text-align: left;
    margin: 0 1rem 1rem 0;
}

/* Корзина: таблица занимает 70%, блок итогов — оставшееся место. */
.woocommerce-cart .woocommerce-cart-form {
    flex: 0 0 calc(70% - .7rem);
    max-width: calc(70% - .7rem);
}

.woocommerce-cart .cart-collaterals {
    align-self: flex-start;
    flex: 1 1 calc(30% - .3rem);
    max-width: calc(30% - .3rem);
    border: 1px solid var(--reboot-woo-cart-totals-border);
    background: var(--reboot-woo-cart-totals-bg);
    padding: 1rem;
}

.woocommerce-cart .cart-collaterals .cart_totals > h2 {
    font-size: 1.25rem;
}

/* Кнопки WooCommerce используют оформление стандартной кнопки Reboot. */
.woocommerce-cart .button,
.woocommerce-cart .checkout-button,
.woocommerce-cart button[name="update_cart"],
.woocommerce ul.products li.product .button,
.woocommerce-checkout .woocommerce button.button,
.woocommerce-account .woocommerce .button,
.single-product .summary .single_add_to_cart_button {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 0;
    padding: .375rem .75rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    color: var(--reboot-woo-button-color) !important;
    background-color: var(--reboot-woo-button-bg);
    transition: all .3s;
}

.woocommerce-cart .button:hover,
.woocommerce-cart .button:focus,
.woocommerce-cart .checkout-button:hover,
.woocommerce-cart .checkout-button:focus,
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .button:focus,
.woocommerce-checkout .woocommerce button.button:hover,
.woocommerce-checkout .woocommerce button.button:focus,
.woocommerce-account .woocommerce .button:hover,
.woocommerce-account .woocommerce .button:focus,
.single-product .summary .single_add_to_cart_button:hover,
.single-product .summary .single_add_to_cart_button:focus {
    color: var(--reboot-woo-button-color);
    text-decoration: none;
    opacity: .85;
}

.woocommerce-cart .woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

.woocommerce-cart .woocommerce-shipping-methods li {
    display: inline-flex;
    gap: .5rem;
}

.woocommerce-cart .woocommerce-shipping-methods li label {
    margin: 0;
}

/* Оформление заказа: данные покупателя слева, заказ справа. */
.woocommerce-checkout form.checkout {
    display: flow-root;
}

.woocommerce-checkout form.checkout #customer_details {
    float: left;
    width: 50%;
}

.woocommerce-checkout form.checkout #order_review_heading,
.woocommerce-checkout form.checkout #order_review {
    float: right;
    width: calc(50% - 1.5rem);
}

.woocommerce-checkout form.checkout label {
    display: block;
}

.woocommerce-checkout form.checkout .input-text,
.woocommerce-checkout form.checkout select {
    width: 100%;
    max-width: 100%;
}

.woocommerce-checkout .select2-container--default .select2-selection--single {
    border: 1px solid var(--reboot-woo-input-border);
    border-radius: 0;
    height: auto;
    margin: 0;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: .375em 2em .375em .75em;
    line-height: 1.5;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
}

.woocommerce-checkout .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce-checkout .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--reboot-woo-button-bg);
}

.woocommerce-checkout form.checkout .woocommerce-checkout-payment label {
    display: inline;
}

.woocommerce-checkout .woocommerce-form-coupon {
    border: 1px dashed var(--reboot-woo-coupon-border);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.woocommerce-checkout .wc_payment_methods {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

.woocommerce-checkout #order_review .shop_table,
.woocommerce-checkout #order_review .shop_table th,
.woocommerce-checkout #order_review .shop_table td {
    border: 0;
}

.woocommerce-checkout #order_review .shop_table th {
    background: transparent;
}

@media screen and (max-width: 767px) {
    .woocommerce-checkout form.checkout #customer_details,
    .woocommerce-checkout form.checkout #order_review_heading,
    .woocommerce-checkout form.checkout #order_review {
        float: none;
        width: 100%;
    }
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
}

@media screen and (max-width: 767px) {
    .woocommerce-cart .woocommerce {
        display: block;
    }

    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals {
        max-width: none;
        width: 100%;
    }
}

.entry-content .woocommerce-checkout p,
.entry-content .woocommerce-shipping-calculator p {
    margin-bottom: .5rem;
}

#order_review_heading {
    margin: 0;
}

.woocommerce-checkout .woocommerce-error,
.woocommerce-account .woocommerce-error {
    list-style: none;
    padding: .5rem 1rem;
    width: 100%;
    color: var(--reboot-woo-error-color);
    background: var(--reboot-woo-error-bg);
}

.woocommerce-checkout .woocommerce-error a,
.woocommerce-account .woocommerce-error a {
    color: inherit;
}

.woocommerce-checkout .woocommerce-error li:not(:last-child),
.woocommerce-account .woocommerce-error li:not(:last-child) {
    margin-bottom: .5rem;
}

/* Личный кабинет. */
.woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul:not([class]) {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: inset 0 -1px var(--reboot-woo-tabs-border);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul:not([class]) > li {
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul:not([class]) > li::before {
    content: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: inline-block;
    padding: .6em .2em;
    color: inherit;
    text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    color: var(--reboot-woo-button-bg);
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    box-shadow: inset 0 -2px var(--reboot-woo-button-bg);
}

.woocommerce-account .woocommerce-MyAccount-content {
    max-width: 800px;
    overflow-x: auto;
    margin-bottom: 2rem;
}

.woocommerce-account #customer_login,
.woocommerce-account .woocommerce-Addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.woocommerce-account #customer_login > .u-column1,
.woocommerce-account #customer_login > .u-column2,
.woocommerce-account .woocommerce-Addresses > .woocommerce-Address {
    flex: 1 1 280px;
    width: auto;
    max-width: 100%;
    padding: 0;
}

.woocommerce-account .woocommerce-Addresses {
    margin-top: 2.5rem;
}

.woocommerce-account .woocommerce form .form-row {
    margin-bottom: 1rem;
}

.woocommerce-account .woocommerce form .form-row > label:not(.woocommerce-form__label-for-checkbox) {
    display: block;
}

.woocommerce-account .woocommerce form .input-text,
.woocommerce-account .woocommerce form select {
    width: 100%;
    max-width: 100%;
}

.woocommerce-account .woocommerce form .password-input {
    display: block;
    position: relative;
}

.woocommerce-account .woocommerce form .password-input input.input-text {
    padding-right: 2.75em;
}

.woocommerce-account .woocommerce form .show-password-input {
    position: absolute;
    top: 50%;
    right: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transform: translateY(-50%);
}

.woocommerce-account .woocommerce form .show-password-input::before {
    content: '';
    width: 20px;
    height: 20px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.woocommerce-account .woocommerce form .show-password-input::after {
    content: none;
}

.woocommerce-account .woocommerce form .show-password-input.display-password::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: currentColor;
    transform: rotate(-45deg);
}

.woocommerce-account .woocommerce form fieldset {
    margin: 2rem 0;
}

.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register,
.woocommerce-account .woocommerce-ResetPassword {
    max-width: 460px;
    margin-bottom: 2rem;
}

.woocommerce-account .woocommerce-form-login__rememberme {
    display: block;
    margin-bottom: 1rem;
}

.woocommerce-account .woocommerce-form-login__submit,
.woocommerce-account .woocommerce-form-register .woocommerce-Button,
.woocommerce-account .woocommerce-ResetPassword .woocommerce-Button {
    display: block;
    width: 100%;
}

.woocommerce-account .woocommerce-LostPassword {
    padding-top: .625rem;
    text-align: center;
}

.woocommerce-account .woocommerce table.shop_table {
    width: 100%;
}

.woocommerce-account .woocommerce table.shop_table th,
.woocommerce-account .woocommerce table.shop_table td {
    padding: .75rem;
}

.woocommerce-account .woocommerce table.shop_table th {
    background: transparent;
}

.woocommerce-account .woocommerce-orders-table,
.woocommerce-account .woocommerce-table--order-downloads {
    border-collapse: collapse;
    font-size: .9em;
}

.woocommerce-account .woocommerce-orders-table tr,
.woocommerce-account .woocommerce-table--order-downloads tr {
    border-bottom: 1px solid var(--reboot-woo-input-border);
}

.woocommerce-account .woocommerce-MyAccount-downloads-file {
    white-space: nowrap;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button:not(:last-child) {
    margin-right: .5rem;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
    margin-bottom: .5rem;
}

.woocommerce-account .select2-container--default .select2-selection--single {
    height: auto;
    margin: 0;
    border: 1px solid var(--reboot-woo-input-border);
    border-radius: 0;
}

.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: .375em 2em .375em .75em;
    line-height: 1.5;
}

.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
}

.woocommerce-account .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce-account .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--reboot-woo-button-bg);
}

/* Страница полученного заказа. */
.woocommerce-order-received .woocommerce ul.woocommerce-order-overview {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.woocommerce-order-received .woocommerce ul.woocommerce-order-overview > li {
    list-style: none;
    padding: 0;
    margin: 0 0 .5rem;
}

.woocommerce-order-received .woocommerce ul.woocommerce-order-overview > li::before {
    content: none;
}

.woocommerce-order-received .woocommerce table,
.woocommerce-order-received .woocommerce table th,
.woocommerce-order-received .woocommerce table td {
    border: 0;
}

.woocommerce-order-received .woocommerce table th {
    background: transparent;
}

.woocommerce-order-received .woocommerce-customer-details .woocommerce-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.woocommerce-order-received .woocommerce-customer-details .woocommerce-column {
    flex: 1 1 250px;
    width: auto;
    max-width: 100%;
    padding: 0;
}

.woocommerce-info,
.woocommerce-noreviews,
p.no-comments {
    width: 100%;
    padding: .75rem 1rem;
    color: var(--reboot-woo-info-color);
    background: var(--reboot-woo-info-bg);
}

.woocommerce-message {
    width: 100%;
    padding: .75rem 1rem;
    color: var(--reboot-woo-success-color);
    background: var(--reboot-woo-success-bg);
}

.woocommerce-checkout .woocommerce-shipping-methods {
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.woocommerce-checkout .woocommerce-shipping-methods li {
    display: inline-flex;
    gap: .5rem;
    align-items: baseline;
}

.woocommerce-checkout .woocommerce-shipping-methods li label {
    margin: 0;
}

.wc_payment_method label img {
    max-height: 2rem;
}

.payment_box {
    margin-top: .5rem;
    padding: .75rem 1rem;
    color: var(--reboot-woo-info-color);
    background: var(--reboot-woo-info-bg);
}

.payment_box p {
    margin: 0;
}

#ship-to-different-address {
    margin-top: 2rem;
}

/* Страница товара. */
.woocommerce .woocommerce-breadcrumb {
    margin-bottom: 10px;
    font-size: .7em;
    color: #666;
    opacity: .8;
    transition: opacity .3s;
}

.woocommerce .woocommerce-breadcrumb:hover {
    opacity: 1;
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--reboot-woo-button-bg);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.single-product div.product > .woocommerce-product-gallery {
    float: left;
    width: calc(42% - .75rem);
    margin: 0 1.5rem 2rem 0;
}

.single-product div.product > .summary {
    float: right;
    width: calc(58% - .75rem);
    margin-bottom: 2rem;
}

.single-product div.product .woocommerce-product-gallery {
    display: flex;
    align-items: flex-start;
}

.single-product div.product .woocommerce-product-gallery .flex-viewport {
    order: 2;
    flex: 1;
    min-width: 0;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
    display: block;
    order: 1;
    flex: 0 0 50px;
    width: 50px;
    margin: 0 15px 0 0;
}

.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-2 .flex-control-thumbs li,
.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-3 .flex-control-thumbs li,
.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li,
.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-5 .flex-control-thumbs li {
    float: none;
    width: 100%;
    margin: 0 0 15px;
}

.single-product .summary .price {
    font-size: 1.3em;
}

.single-product .summary form.cart,
.single-product .summary .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.single-product .summary .quantity input.qty {
    width: 6em;
}

.single-product .summary .variations,
.single-product .summary .single_variation_wrap,
.single-product .summary .group_table {
    width: 100%;
}

.single-product .summary .variations select {
    max-width: 100%;
}

.single-product .summary .woocommerce-variation-price {
    margin-bottom: 1em;
}

.single-product .summary .product_meta {
    margin-top: 3em;
}

.single-product div.product > .woocommerce-tabs,
.single-product div.product > .related,
.single-product div.product > .up-sells {
    clear: both;
}

.single-product .related ul.products {
    width: 100%;
}

.single-product .woocommerce-tabs {
    margin: 0 auto 3rem;
}

.single-product .woocommerce-tabs ul.wc-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    box-shadow: inset 0 -1px var(--reboot-woo-tabs-border);
}

.single-product .woocommerce-tabs ul.wc-tabs li {
    display: inline-block;
    margin: 0 .7em;
}

.single-product .woocommerce-tabs ul.wc-tabs a {
    display: inline-block;
    padding: .6em .2em;
    color: inherit;
    text-decoration: none;
}

.single-product .woocommerce-tabs ul.wc-tabs li.active a {
    color: var(--reboot-woo-button-bg);
    box-shadow: inset 0 -2px var(--reboot-woo-button-bg);
}

.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
    max-width: 800px;
    margin: 0 auto;
    padding: 3em 0;
}

@media screen and (max-width: 767px) {
    :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-result-count,
    :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-ordering {
        float: none;
        width: 100%;
        margin-bottom: 1rem;
        text-align: left;
    }

    :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-ordering select {
        max-width: 100%;
    }

    .single-product div.product > .woocommerce-product-gallery,
    .single-product div.product > .summary {
        float: none;
        width: 100%;
        margin-right: 0;
    }

    .single-product .summary .single_add_to_cart_button {
        width: 100%;
    }
}

.woocommerce-MyAccount-navigation ul:not([class]):before {
    content: unset;
}

@media screen and (max-width: 767px) {
    .woocommerce-account .woocommerce-MyAccount-navigation ul:not([class]) {
        gap: 0 .8rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation li {
        flex: 0 0 auto;
    }
}
