/* =========================================================
   AUTOVOLT PRODUCT CARD UI
   TRUE CARD CORNERS
   ========================================================= */


/* ---------------------------------------------------------
   Positioning context = whole upper product block,
   NOT the inner photo container.
   --------------------------------------------------------- */

.products-list .product-item-container .left-block,
.so-extraslider .product-item-container .left-block {
    position: relative !important;
}


/* =========================================================
   PROMO — TRUE TOP LEFT
   ========================================================= */

/*
 * Listing promo wrapper.
 * Almost flush with the actual card corner.
 */

.products-list .product-item-container .box-label {
    position: absolute !important;

    top: 2px !important;
    left: 2px !important;
    right: auto !important;

    margin: 0 !important;
    transform: none !important;

    z-index: 35;
}


/*
 * Common promo badge
 */

.products-list .av-promo-badge,
.so-extraslider .av-promo-badge {
    display: inline-flex !important;
    align-items: center;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 5px 9px !important;

    white-space: nowrap;

    line-height: 1.2 !important;

    z-index: 35;
}


/*
 * Extra Slider has no .box-label around promo,
 * so position the badge directly.
 */

.so-extraslider .av-promo-badge {
    position: absolute !important;

    top: 2px !important;
    left: 2px !important;
    right: auto !important;

    z-index: 35;
}


/* =========================================================
   LEFT QUICK-GALLERY
   ========================================================= */

/*
 * Promo now owns the real top-left corner.
 * Start vertical thumbnails BELOW the promo badge.
 */




/* =========================================================
   WISHLIST + COMPARE — TRUE TOP RIGHT
   ========================================================= */

.av-card-tools {
    position: absolute !important;

    z-index: 40;

    top: 2px !important;
    right: 2px !important;
    left: auto !important;

    display: inline-flex;
    flex-direction: row;
    align-items: stretch;

    margin: 0 !important;
    padding: 0;

    gap: 0;

    overflow: hidden;

    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 7px;

    background: rgba(255, 255, 255, .96);

    box-shadow: 0 2px 7px rgba(0, 0, 0, .07);

    pointer-events: auto;
}


.av-card-tool {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: #4d4d4d;

    box-shadow: none;

    cursor: pointer;
    outline: none;

    transition:
        background-color .15s ease,
        color .15s ease;
}


.av-card-tool + .av-card-tool {
    border-left: 1px solid rgba(0, 0, 0, .10);
}


.av-card-tool i {
    margin: 0;

    font-size: 15px;
    line-height: 1;

    pointer-events: none;
}


.av-card-tool--compare i {
    font-size: 14px;
}


.av-card-tool:hover,
.av-card-tool:focus {
    background: rgba(0, 0, 0, .045);
    color: #111;
}


.av-card-tool:active {
    background: rgba(0, 0, 0, .08);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .products-list .product-item-container .box-label {
        top: 2px !important;
        left: 2px !important;
    }

    .so-extraslider .av-promo-badge {
        top: 2px !important;
        left: 2px !important;
    }

    .products-list .av-promo-badge,
    .so-extraslider .av-promo-badge {
        padding: 5px 8px !important;
    }

    

    .av-card-tools {
        top: 2px !important;
        right: 2px !important;

        border-radius: 6px;
    }

    .av-card-tool {
        width: 32px;
        height: 32px;
    }

    .av-card-tool i {
        font-size: 14px;
    }

    .av-card-tool--compare i {
        font-size: 13px;
    }
}


/* =========================================================
   AV LISTING OVERLAYS V8
   ONLY main category listing.
   Extra Slider is intentionally untouched.
   ========================================================= */


/* Whole product card is now positioning context */
.av-main-listing .product-item-container {
    position: relative !important;
}


/* ---------------------------------------------------------
   LEFT: "Акция -7%"
   True upper-left corner of entire card
   --------------------------------------------------------- */

.av-main-listing .av-listing-promo-wrap {
    position: absolute !important;

    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: none !important;

    z-index: 60 !important;
}


.av-main-listing .av-promo-badge {
    position: static !important;

    display: inline-flex !important;
    align-items: center !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 5px 9px !important;

    white-space: nowrap !important;

    line-height: 1.2 !important;
}


/* ---------------------------------------------------------
   RIGHT: wishlist + compare
   True upper-right corner of entire card
   --------------------------------------------------------- */

.av-main-listing .av-card-tools {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;

    margin: 0 !important;

    z-index: 65 !important;
}


/* ---------------------------------------------------------
   Kill any legacy standalone "Акция" badge in MAIN LISTING.
   Our unified badge has .av-promo-badge and is preserved.
   --------------------------------------------------------- */

.av-main-listing
.label-product.label-sale:not(.av-promo-badge) {
    display: none !important;
}


/* Mobile */
@media (max-width: 767px) {

    .av-main-listing .av-listing-promo-wrap {
        top: 0 !important;
        left: 0 !important;
    }

    .av-main-listing .av-card-tools {
        top: 0 !important;
        right: 0 !important;
    }
}

/* /AV LISTING OVERLAYS V8 */


/* AV_LISTING_THUMB_OFFSET_V11 */

/*
 * Только основной listing.
 * Не двигаем сам gallery-контейнер и не вмешиваемся
 * в штатный transform темы.
 *
 * Отступ первой миниатюры сдвигает вниз всю колонку.
 */
.av-main-listing
.product-card__gallery.product-card__left
> .item-img:first-child {
    margin-top: 7px !important;
}

/* /AV_LISTING_THUMB_OFFSET_V11 */

/* AV_LISTING_REMOVE_OLD_SALE_BADGE_V13 */

/*
 * Старый бейдж "Акция" из custom.css.
 * Убираем только в основном каталожном listing.
 * Наша новая плашка "АКЦИЯ -XX%" остаётся.
 */
body.product-category
.av-main-listing
.product-grid
.product-item-container:has(.price-new)
.product-image-container::before {
    content: none !important;
    display: none !important;
}

/* /AV_LISTING_REMOVE_OLD_SALE_BADGE_V13 */


/* AV_LISTING_PROMO_DESIGN_V14 */

/*
 * Современная promo-плашка только для основного listing.
 * Полностью независима от старых label-product / label-sale Monota.
 */

.av-main-listing
.av-listing-promo-wrap
.av-promo-badge {
    position: static !important;

    display: inline-flex !important;
    align-items: center !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 29px !important;

    margin: 0 !important;
    padding: 6px 10px !important;

    background: rgba(255, 246, 240, .98) !important;
    color: #c5531d !important;

    border: 1px solid rgba(197, 83, 29, .20) !important;
    border-radius: 8px !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, .05) !important;

    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    text-transform: none !important;
    letter-spacing: 0 !important;

    white-space: nowrap !important;

    z-index: 35 !important;
}


/* Никаких старых декоративных хвостов */
.av-main-listing
.av-listing-promo-wrap
.av-promo-badge::before,
.av-main-listing
.av-listing-promo-wrap
.av-promo-badge::after {
    content: none !important;
    display: none !important;
}


/* Чуть компактнее на телефоне */
@media (max-width: 767px) {

    .av-main-listing
    .av-listing-promo-wrap
    .av-promo-badge {
        min-height: 27px !important;
        padding: 5px 8px !important;
        font-size: 11px !important;
        border-radius: 7px !important;
    }
}

/* /AV_LISTING_PROMO_DESIGN_V14 */

/* AV_CARD_TOOLS_RESTYLE_V15 */

/* Единая высота promo + tools */
.av-main-listing .av-listing-promo-wrap .av-promo-badge {
    height: 30px !important;
    min-height: 30px !important;
    box-sizing: border-box !important;
}


/* Панель избранное / сравнение */
.av-main-listing .av-card-tools {
    height: 30px !important;

    box-sizing: border-box !important;

    background: rgba(255, 250, 247, .98) !important;

    border-color: rgba(197, 83, 29, .16) !important;
    border-radius: 8px !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, .045) !important;
}


/* Сами кнопки */
.av-main-listing .av-card-tool {
    width: 31px !important;
    height: 28px !important;

    color: #a96747 !important;

    background: transparent !important;

    transition:
        color .18s ease,
        background .18s ease !important;
}


/* Разделитель между кнопками — мягче */
.av-main-listing .av-card-tool + .av-card-tool {
    border-left: 1px solid rgba(197, 83, 29, .12) !important;
}


/* Иконки */
.av-main-listing .av-card-tool i {
    font-size: 14px !important;
    color: inherit !important;
}


/* Hover */
.av-main-listing .av-card-tool:hover {
    color: #c5531d !important;
    background: rgba(197, 83, 29, .07) !important;
}


/* Mobile */
@media (max-width: 767px) {

    .av-main-listing .av-listing-promo-wrap .av-promo-badge,
    .av-main-listing .av-card-tools {
        height: 28px !important;
        min-height: 28px !important;
    }

    .av-main-listing .av-card-tool {
        width: 29px !important;
        height: 26px !important;
    }
}

/* /AV_CARD_TOOLS_RESTYLE_V15 */

/* AV_CARD_COLOR_SYSTEM_V16 */

/* =========================================================
   PROMO — warm accent compatible with #1f83cf
   ========================================================= */

.av-main-listing
.av-listing-promo-wrap
.av-promo-badge {
    background: #fff7ed !important;
    color: #b85c16 !important;

    border-color: rgba(184, 92, 22, .20) !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, .04) !important;
}


/* =========================================================
   WISHLIST + COMPARE — quiet cool controls
   ========================================================= */

.av-main-listing .av-card-tools {
    background: rgba(255, 255, 255, .97) !important;

    border-color: rgba(31, 131, 207, .16) !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, .04) !important;
}


.av-main-listing .av-card-tool {
    color: #6f8294 !important;
}


/* Divider */
.av-main-listing .av-card-tool + .av-card-tool {
    border-left-color: rgba(31, 131, 207, .12) !important;
}


/* Hover — site's main blue */
.av-main-listing .av-card-tool:hover {
    color: #1f83cf !important;
    background: rgba(31, 131, 207, .07) !important;
}


/* /AV_CARD_COLOR_SYSTEM_V16 */

/* AV_PROMO_BLUE_SYSTEM_V17 */

/*
 * Promo badge in site's #1f83cf color family.
 * Controls remain neutral, so promo and tools have different roles.
 */
.av-main-listing
.av-listing-promo-wrap
.av-promo-badge {
    background: #eef7fd !important;
    color: #176fa8 !important;

    border-color: rgba(31, 131, 207, .22) !important;

    box-shadow: 0 2px 7px rgba(31, 131, 207, .07) !important;
}

/* /AV_PROMO_BLUE_SYSTEM_V17 */


/* AV_EXTRA_SLIDER_FINAL_UI_V18 */

/* =========================================================
   EXTRA SLIDER — positioning context
   ========================================================= */

.so-extraslider
.product-item-container
.left-block {
    position: relative !important;
}


/* =========================================================
   PROMO
   Same visual system as main listing
   ========================================================= */

.so-extraslider .av-promo-badge {
    position: absolute !important;

    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;

    display: inline-flex !important;
    align-items: center !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    height: 30px !important;
    min-height: 30px !important;

    margin: 0 !important;
    padding: 6px 10px !important;

    box-sizing: border-box !important;

    background: #eef7fd !important;
    color: #176fa8 !important;

    border: 1px solid rgba(31, 131, 207, .22) !important;
    border-radius: 8px !important;

    box-shadow: 0 2px 7px rgba(31, 131, 207, .07) !important;

    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    text-transform: none !important;
    letter-spacing: 0 !important;

    white-space: nowrap !important;

    transform: none !important;

    z-index: 60 !important;
}


/* No old Monota decorative pseudo-elements */
.so-extraslider .av-promo-badge::before,
.so-extraslider .av-promo-badge::after {
    content: none !important;
    display: none !important;
}


/* =========================================================
   WISHLIST + COMPARE
   ========================================================= */

.so-extraslider .av-card-tools {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;

    display: inline-flex !important;
    flex-direction: row !important;
    align-items: stretch !important;

    height: 30px !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    gap: 0 !important;

    overflow: hidden !important;

    background: rgba(255, 255, 255, .97) !important;

    border: 1px solid rgba(31, 131, 207, .16) !important;
    border-radius: 8px !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, .04) !important;

    z-index: 65 !important;
}


.so-extraslider .av-card-tool {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 31px !important;
    height: 28px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;

    color: #6f8294 !important;

    box-shadow: none !important;

    cursor: pointer !important;

    transition:
        color .18s ease,
        background .18s ease !important;
}


.so-extraslider .av-card-tool + .av-card-tool {
    border-left: 1px solid rgba(31, 131, 207, .12) !important;
}


.so-extraslider .av-card-tool i {
    color: inherit !important;
    font-size: 14px !important;
}


.so-extraslider .av-card-tool--compare i {
    font-size: 13px !important;
}


.so-extraslider .av-card-tool:hover {
    color: #1f83cf !important;
    background: rgba(31, 131, 207, .07) !important;
}


/* =========================================================
   REMOVE OLD DUPLICATE "Акция"
   from custom.css product-image-container::before
   ========================================================= */

body.product-category
.so-extraslider
.product-grid
.product-item-container:has(.price-new)
.product-image-container::before {
    content: none !important;
    display: none !important;
}


/* If an old real label survives in another Extra Slider layout */
.so-extraslider
.label-product.label-sale:not(.av-promo-badge) {
    display: none !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .so-extraslider .av-promo-badge,
    .so-extraslider .av-card-tools {
        height: 28px !important;
        min-height: 28px !important;
    }

    .so-extraslider .av-promo-badge {
        padding: 5px 8px !important;
        font-size: 11px !important;
        border-radius: 7px !important;
    }

    .so-extraslider .av-card-tools {
        border-radius: 7px !important;
    }

    .so-extraslider .av-card-tool {
        width: 29px !important;
        height: 26px !important;
    }
}

/* /AV_EXTRA_SLIDER_FINAL_UI_V18 */


/* AV_EXTRA_SLIDER_GEOMETRY_V20 */

/* =========================================================
   1. CARD HOVER

   В старом custom.css Extra Slider получает translateY(-2px).
   Owl режет верх выступающей карточки, поэтому визуально
   пропадает верхняя граница.

   Здесь намеренно высокая specificity.
   ========================================================= */

html body
.so-extraslider.es-init-fix
.product-layout.product-grid
.product-item-container.item--static,

html body
.so-extraslider.es-init-fix
.product-layout.product-grid
.product-item-container.item--static:hover,

html body
.so-extraslider
.product-layout.product-grid
.product-item-container.item--static,

html body
.so-extraslider
.product-layout.product-grid
.product-item-container.item--static:hover {
    transform: none !important;

    transition:
        border-color .18s ease,
        box-shadow .18s ease !important;
}


/* Hover остаётся визуальным, но без физического движения */
html body
.so-extraslider.es-init-fix
.product-layout.product-grid
.product-item-container.item--static:hover,

html body
.so-extraslider
.product-layout.product-grid
.product-item-container.item--static:hover {
    border-color: #b8d7eb !important;

    box-shadow:
        0 8px 24px rgba(31, 83, 120, .08) !important;
}


/* =========================================================
   2. ACTION BUTTONS

   right-block уже имеет одинаковую высоту.

   margin-top:auto занимает свободное место НАД кнопками.
   Поэтому независимо от наличия:
     Устройство
     С установкой XX XXX ₽

   кнопки всегда прижаты к одному нижнему уровню.

   Критически важно:
   auto должен работать и NORMAL, и HOVER.
   ========================================================= */

html body
.so-extraslider.es-init-fix
.product-layout.product-grid
.product-item-container.item--static
.product-actions-custom,

html body
.so-extraslider.es-init-fix
.product-layout.product-grid
.product-item-container.item--static:hover
.product-actions-custom,

html body
.so-extraslider
.product-layout.product-grid
.product-item-container.item--static
.product-actions-custom,

html body
.so-extraslider
.product-layout.product-grid
.product-item-container.item--static:hover
.product-actions-custom {
    position: static !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    margin-top: auto !important;
    margin-bottom: 0 !important;

    transform: none !important;

    opacity: 1 !important;
    visibility: visible !important;

    transition: none !important;
}


/* /AV_EXTRA_SLIDER_GEOMETRY_V20 */


/* AV_TOAST_DESIGN_V21 */

.av-toast-container {
    position: fixed !important;
    top: 22px !important;
    right: 22px !important;

    width: min(440px, calc(100vw - 44px)) !important;

    z-index: 99999 !important;

    pointer-events: none !important;
}


.av-toast {
    position: relative !important;

    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 30px !important;
    gap: 12px !important;
    align-items: center !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 14px 12px 14px 14px !important;

    box-sizing: border-box !important;

    background: rgba(255, 255, 255, .985) !important;

    border: 1px solid rgba(31, 131, 207, .22) !important;
    border-radius: 12px !important;

    box-shadow:
        0 14px 38px rgba(30, 58, 79, .14),
        0 2px 8px rgba(31, 131, 207, .06) !important;

    color: #344250 !important;

    opacity: 0 !important;

    transform: translateY(-8px) scale(.985) !important;

    transition:
        opacity .2s ease,
        transform .2s ease !important;

    pointer-events: auto !important;
}


.av-toast.is-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}


.av-toast.is-hiding {
    opacity: 0 !important;
    transform: translateY(-5px) scale(.99) !important;
}


.av-toast__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 38px !important;
    height: 38px !important;

    border-radius: 10px !important;

    background: #eef7fd !important;
    color: #1f83cf !important;
}


.av-toast__icon i {
    font-size: 16px !important;
    line-height: 1 !important;
    color: inherit !important;
}


.av-toast__text {
    min-width: 0 !important;

    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;

    color: #40505f !important;
}


.av-toast__text a {
    color: #176fa8 !important;
    font-weight: 650 !important;
    text-decoration: none !important;

    border-bottom: 1px solid rgba(31, 131, 207, .25) !important;
}


.av-toast__text a:hover {
    color: #1f83cf !important;
    border-bottom-color: #1f83cf !important;
}


.av-toast__close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 30px !important;
    height: 30px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 8px !important;

    background: transparent !important;

    color: #8a99a7 !important;

    cursor: pointer !important;

    transition:
        color .15s ease,
        background .15s ease !important;
}


.av-toast__close:hover {
    color: #1f83cf !important;
    background: rgba(31, 131, 207, .07) !important;
}


.av-toast__close i {
    font-size: 13px !important;
    color: inherit !important;
}


@media (max-width: 767px) {

    .av-toast-container {
        top: 12px !important;
        right: 12px !important;
        left: 12px !important;

        width: auto !important;
    }

    .av-toast {
        grid-template-columns: 34px minmax(0, 1fr) 28px !important;
        gap: 10px !important;

        padding: 12px 10px 12px 12px !important;

        border-radius: 10px !important;
    }

    .av-toast__icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 9px !important;
    }

    .av-toast__text {
        font-size: 12px !important;
    }

    .av-toast__close {
        width: 28px !important;
        height: 28px !important;
    }
}

/* /AV_TOAST_DESIGN_V21 */


/* AV_TOAST_V22_EXT */

.av-toast__note {
    margin-top: 7px !important;
    padding-top: 7px !important;

    border-top: 1px solid #e6edf2 !important;

    color: #71808e !important;

    font-size: 11.5px !important;
    line-height: 1.4 !important;
}

.av-toast--info .av-toast__icon {
    background: #f1f7fb !important;
    color: #5682a1 !important;
}

/* /AV_TOAST_V22_EXT */
