.amest-slider-home-container .owl-carousel .item {
    width: 100%;
}

.amest-slider-home-container .owl-carousel .item picture {
    display: block;
    width: 100%;
}

.amest-slider-home-container .owl-carousel .item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Ensure nav can be positioned relative to the slider container */
.amest-slider-home-container {
    position: relative;
}
.amest-slider-home-container .owl-carousel {
    position: relative;
}

@media (max-width: 990px) {
    .amest-slider-home-container .owl-carousel .item {
        height: auto;
    }
}

/* Custom Owl Carousel Navigation */
.amest-slider-home-container .owl-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 20;
    pointer-events: none; /* let only buttons receive clicks */
    margin: 0; /* override owl default */
}

.amest-slider-home-container .owl-nav button {
    pointer-events: auto;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    background-color: rgba(0, 0, 0, 0.5) !important; /* explicit for transition */
    border: none;
    border-radius: 4px !important; /* slight rounded corners */
    margin: 0;
    width: 50px !important;
    height: 50px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* hidden by default, shown on container hover */
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease-out, opacity 0.28s ease-out, background-color 0.3s ease-in-out;
}

.amest-slider-home-container .owl-nav button:hover {
    background: rgba(0, 0, 0, 0.7)!important;
    background-color: rgba(0, 0, 0, 0.7) !important; /* smooth hover opacity */
}

.amest-slider-home-container .owl-nav button:focus {
    outline: 0px solid rgba(255, 255, 255, 0.8);
    outline-offset: 0px;
}

.amest-slider-home-container .owl-nav button.owl-prev {
    left: 10px !important;
    transform: translate(-12px, -50%) !important; /* slide in from left */
}
.amest-slider-home-container .owl-nav button.owl-next {
    right: 10px !important;
    transform: translate(12px, -50%) !important; /* slide in from right */
}

/* reveal on hover over the slider container */
.amest-slider-home-container:hover .owl-nav button {
    opacity: 1;
    pointer-events: auto;
}
.amest-slider-home-container:hover .owl-nav button.owl-prev {
    transform: translate(0, -50%) !important;
}
.amest-slider-home-container:hover .owl-nav button.owl-next {
    transform: translate(0, -50%) !important;
}

/* Always hide buttons when container is not hovered */
.amest-slider-home-container:not(:hover) .owl-nav button {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide default text inside buttons */
.amest-slider-home-container .owl-nav button span { display: none !important; }

/* White caret icons via inline SVG */
.amest-slider-home-container .owl-nav button::before {
    content: '';
    display: block;
    width: 90%; /* caret scales with button size */
    height: 90%;
    box-sizing: content-box;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translateX(0); /* base alignment */
}

.amest-slider-home-container .owl-nav button.owl-prev::before {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}

.amest-slider-home-container .owl-nav button.owl-next::before {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    transform: translateX(8%); /* slight nudge right for optical centering */
}

.amest-slider-home-container .owl-theme .owl-dots, .owl-theme .owl-nav {
    margin-top: -48px;
}

/* Smaller controls on mobile */
@media (max-width: 768px) {
    .amest-slider-home-container .owl-nav button {
        width: 40px !important;
        height: 40px !important;
    }
    /* caret remains 40% of button, no change needed */
}

/* Hide navigation on small screens */
@media (max-width: 580px) {
    .amest-slider-home-container .owl-nav { display: none !important; }
    .amest-slider-home-container:hover .owl-nav button { opacity: 0 !important; pointer-events: none !important; }
}
