/* =========================================================
   ESET options (виджет выбора устройства/года)
   ========================================================= */

/* Контейнер опций */
.eset-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: start;
    margin-top: 8px;
}

/* Отдельная опция (устройство / год) */
.eset-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Подпись над инпутом */
.eset-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: #2a3556;
}

.eset-label__title {
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}

.eset-label__note {
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: .01em;
    color: #6d7ba5;
}

/* Цена */
.eset-price {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 12px 0 6px;
    transition: opacity .2s ease;
}
.eset-price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.eset-price-status {
    margin: 0;
    min-height: 18px;
    font-size: 13px;
    line-height: 1.35;
    color: #6d7ba5;
}
.eset-price-status.is-loading {
    color: #4257db;
    font-weight: 600;
}
.eset-price-status.is-error {
    color: #c0392b;
    font-weight: 600;
}
.eset-price.is-loading {
    opacity: .6;
    pointer-events: none;
}

/* =========================================================
   Quantity с кнопками +/-
   ========================================================= */

.eset-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

/* Общий размер элементов управления */
.eset-stepper__input,
.eset-stepper .eset-minus,
.eset-stepper .eset-plus {
    height: 40px;
}

/* Кнопки +/- */
.eset-stepper .eset-minus,
.eset-stepper .eset-plus {
    min-width: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    line-height: 38px;
    text-align: center;
    user-select: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.eset-stepper .eset-minus {
    border-radius: 8px 0 0 8px;
}
.eset-stepper .eset-plus {
    border-radius: 0 8px 8px 0;
}
.eset-stepper .eset-minus:hover,
.eset-stepper .eset-plus:hover {
    background: #f6f6f6;
}
.eset-stepper .eset-minus:active,
.eset-stepper .eset-plus:active {
    background: #eee;
}

/* Поле ввода количества/периода */
.eset-stepper__input {
    width: 78px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    outline: none;
    font-weight: 600;
    background: #fff; /* для readonly */
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Скрываем стрелки у number в Chrome/Safari/Edge */
.eset-stepper__input::-webkit-outer-spin-button,
.eset-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Фокусные состояния */
.eset-stepper .eset-minus:focus,
.eset-stepper .eset-plus:focus,
.eset-stepper__input:focus {
    outline: 2px solid rgba(0, 116, 210, .15);
    outline-offset: 1px;
}

/* =========================================================
   Кнопка "В корзину"
   ========================================================= */

.eset-add-to-cart {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.single_add_to_cart_button[disabled] {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================================
   Мини-корзина (off-canvas/widget): читаемость цен
   ========================================================= */

/* Не переносить сумму на новую строку */
.woocommerce-mini-cart .eset-price-nowrap,
.woocommerce-mini-cart .quantity.eset-mini {
    white-space: nowrap;
}

/* Делаем стоимость более заметной */
.woocommerce-mini-cart .quantity.eset-mini,
.woocommerce-mini-cart .mini_cart_item .quantity {
    display: inline-block;
    font-weight: 600;
    line-height: 1.2;
}
.woocommerce-mini-cart .quantity.eset-mini .woocommerce-Price-amount,
.woocommerce-mini-cart .mini_cart_item .quantity .woocommerce-Price-amount {
    font-weight: 700;
}

/* Немного уплотняем блок строки товара в мини-корзине */
.woocommerce-mini-cart .mini_cart_item {
    margin-bottom: 10px;
}

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 480px) {
    .eset-price {
        font-size: 1.25rem;
    }
    .eset-stepper__input {
        width: 68px;
    }
}

/* ===== Мини-корзина: читаемые цены ===== */
.widget_shopping_cart .mini_cart_item .quantity {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #444;
}
.widget_shopping_cart .mini_cart_item .quantity .qty-num,
.widget_shopping_cart .mini_cart_item .quantity .qty-unit .woocommerce-Price-amount,
.widget_shopping_cart .mini_cart_item .quantity .qty-total .woocommerce-Price-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums; /* ровные столбики цифр */
    letter-spacing: .02em;
    white-space: nowrap; /* чтобы UZS не отрывался от числа */
}

/* Подытог в мини-корзине — тоже покрупнее и без переносов */
.widget_shopping_cart .total,
.widget_shopping_cart .woocommerce-Price-amount {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.eset-note{
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

/* =========================================================
   Product page polish
   ========================================================= */

.single-product div.product form.cart .eset-options {
    grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
    gap: 20px 24px;
    margin: 18px 0 10px;
}

.single-product div.product form.cart .eset-option {
    align-items: flex-start;
    gap: 12px;
}

.single-product div.product form.cart .eset-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: #2a3556;
}

.single-product div.product form.cart .eset-label__title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.2;
}

.single-product div.product form.cart .eset-label__note {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: .01em;
    color: #6d7ba5;
}

.single-product div.product form.cart .eset-stepper {
    display: inline-grid;
    grid-template-columns: 52px 86px 52px;
    align-items: center;
    border: 1px solid #d8dfef;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
    box-shadow: 0 16px 34px rgba(34, 55, 130, 0.12);
}

.single-product div.product form.cart .eset-stepper .eset-step {
    appearance: none;
    -webkit-appearance: none;
    min-width: 52px !important;
    width: 52px;
    height: 52px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #4257db 0%, #2f3fb8 100%);
    color: #fff !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
    box-shadow: none !important;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, background-color .15s ease;
}

.single-product div.product form.cart .eset-stepper .eset-step:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.single-product div.product form.cart .eset-stepper .eset-step:active {
    transform: translateY(0);
    filter: brightness(.98);
}

.single-product div.product form.cart .eset-stepper .eset-step:focus-visible {
    outline: 3px solid rgba(66, 87, 219, 0.2);
    outline-offset: -3px;
}

.single-product div.product form.cart .eset-stepper__input {
    width: 86px !important;
    min-width: 86px;
    height: 52px;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 0 !important;
    border-left: 1px solid #dfe4f2 !important;
    border-right: 1px solid #dfe4f2 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #24314f;
    font-size: 22px;
    font-weight: 700;
    line-height: 52px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.single-product div.product form.cart .eset-hint {
    margin: 12px 0 0;
    padding: 12px 16px;
    border: 1px solid #e1e6f4;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcff 0%, #f3f6ff 100%);
    color: #42507a;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
}

.single-product div.product form.cart .eset-hint__title {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6d7ba5;
}

.single-product div.product form.cart .eset-hint__value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #2a3556;
    white-space: nowrap;
}

.single-product div.product form.cart .eset-add-to-cart {
    margin-top: 18px;
}

@media (max-width: 640px) {
    .single-product div.product form.cart .eset-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .single-product div.product form.cart .eset-stepper {
        grid-template-columns: 48px 78px 48px;
    }

    .single-product div.product form.cart .eset-stepper .eset-step {
        min-width: 48px !important;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .single-product div.product form.cart .eset-stepper__input {
        width: 78px !important;
        min-width: 78px;
        height: 48px;
        line-height: 48px;
        font-size: 20px;
    }

    .single-product div.product form.cart .eset-hint {
        width: 100%;
    }

    .single-product div.product form.cart .eset-hint__value {
        white-space: normal;
    }
}
