/* ===================================================================
   Owl Carousel structural fixes + nav/dots positioning that match
   the original metrotex.ru theme (.carousel-nav.carousel-nav-inside
   and .carousel-dots.carousel-main-dots).
   =================================================================== */

/* Owl needs block layout, not the legacy flex one */
.carousel-main-list.owl-carousel {
    display: block;
}
.carousel-main-list .owl-stage-outer { overflow: hidden; }

.carousel-main-list .owl-item {
    line-height: normal;
    text-align: center;
    font-size: inherit;
}

.carousel-main-list .carousel-item {
    width: 100%;
    line-height: normal;
    font-size: inherit;
}

.carousel-main-list .carousel-slide-media {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Owl resets some properties on its generated buttons; restore the
   original site appearance: white circle with a coloured arrow icon. */
.carousel-main .carousel-nav-inside .carousel-nav-prev,
.carousel-main .carousel-nav-inside .carousel-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    /* width: 48px;
    height: 48px;
    border-radius: 100%;
    background-color: #fff !important;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0.95;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); */
}

.carousel-main .carousel-nav-inside .carousel-nav-prev:hover,
.carousel-main .carousel-nav-inside .carousel-nav-next:hover {
    opacity: 1;
}

/* Dots positioning (overlay over slider, bottom-right per original) */
.carousel-main .carousel-main-dots {
    position: absolute;
    right: 43px;
    bottom: 40px;
    z-index: 5;
    text-align: center;
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.carousel-main .carousel-main-dots .carousel-dots-item {
    display: inline-block;
    vertical-align: middle;
    padding: 5px;
    cursor: pointer;
    opacity: 0.5;
    background: transparent;
    border: 0;
}

.carousel-main .carousel-main-dots .carousel-dots-item.carousel-dots-selected {
    opacity: 1;
}

.carousel-main .carousel-main-dots .carousel-dots-item-inner {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Hide the index number Owl puts inside each dot */
.carousel-main .carousel-main-dots .carousel-dots-item > span:not(.carousel-dots-item-inner) {
    display: none;
}

/* ---------- Product carousels ---------- */
.product-view-carousel-list.owl-carousel { display: block; position: relative; overflow: visible; }
.product-view-carousel-list .owl-stage-outer {
    margin-left: -1px;
    padding-top: 10px;
}
.product-view-carousel-list .owl-stage { padding-left: 1px; }
.products-specials-block { position: relative; overflow: visible; }
.products-specials-container { overflow: visible; }
.products-specials-header { position: relative; }
.product-view-carousel-list .products-view-block { width: auto; min-height: auto; }

/* Equal-height slides: stretch every owl-item to the height of the tallest */
.product-view-carousel-list .owl-stage { display: flex; }
.product-view-carousel-list .owl-item { display: flex; flex: 1 0 auto; }
.product-view-carousel-list .owl-item > .products-view-block { width: 100%; display: flex; }
.product-view-carousel-list .products-view-item { width: 100%; height: 100%; }
.product-view-carousel-list .owl-slide,
.carousel-main-list .owl-slide { width: 100%; }

/* Стрелки — за пределами карусели, по бокам */
.product-view-carousel-list .carousel-nav-prev,
.product-view-carousel-list .carousel-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    z-index: 5;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.product-view-carousel-list .carousel-nav-prev { left: -22px; }
.product-view-carousel-list .carousel-nav-next { right: -22px; }
.product-view-carousel-list .carousel-nav-prev:hover,
.product-view-carousel-list .carousel-nav-next:hover {
    background: #1a5fb4 !important;
    color: #fff !important;
    border-color: #1a5fb4 !important;
}
.product-view-carousel-list .carousel-nav-prev:hover svg path,
.product-view-carousel-list .carousel-nav-next:hover svg path { fill: #fff; }
.product-view-carousel-list .carousel-nav-prev.disabled,
.product-view-carousel-list .carousel-nav-next.disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ---------- Sticky header (when .sticky-element--initialized is pinned) ---------- */
.sticky-element--initialized.is-stuck {
    background-color: #063b6f;
    z-index: 100;
}
