/* Final homepage product carousel geometry.
 * All three homepage product carousels use the same exact slot geometry.
 * Desktop: 4 products visible. Each move = exactly 1 product slot.
 */
body.home #section-71715,
body.home #section-nyheder,
body.home #section-16457 {
    overflow: hidden !important;
    position: relative !important;
}

body.home #section-71715 .swiper-wrapper,
body.home #section-nyheder .swiper-wrapper,
body.home #section-16457 .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
}

body.home #section-71715 .swiper-slide,
body.home #section-nyheder .swiper-slide,
body.home #section-16457 .swiper-slide {
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

body.home #section-71715 .dampamok-home-carousel-navigation,
body.home #section-nyheder .dampamok-home-carousel-navigation,
body.home #section-16457 .dampamok-home-carousel-navigation {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    z-index: 100 !important;
}

body.home #section-71715 .dampamok-home-carousel-prev,
body.home #section-71715 .dampamok-home-carousel-next,
body.home #section-nyheder .dampamok-home-carousel-prev,
body.home #section-nyheder .dampamok-home-carousel-next,
body.home #section-16457 .dampamok-home-carousel-prev,
body.home #section-16457 .dampamok-home-carousel-next {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 101 !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    body.home #section-71715 .dampamok-home-carousel-navigation,
    body.home #section-nyheder .dampamok-home-carousel-navigation,
    body.home #section-16457 .dampamok-home-carousel-navigation {
        padding: 0 2px !important;
    }

    body.home #section-71715 .dampamok-home-carousel-prev,
    body.home #section-71715 .dampamok-home-carousel-next,
    body.home #section-nyheder .dampamok-home-carousel-prev,
    body.home #section-nyheder .dampamok-home-carousel-next,
    body.home #section-16457 .dampamok-home-carousel-prev,
    body.home #section-16457 .dampamok-home-carousel-next {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
    }
}

/* Keep the original arrow controls for SALE and NYHEDER visible.
 * The Favorites carousel has its own dedicated controls below.
 */
body.home #most_poupolar_sec .pls-slider-navigation,
body.home #nyheder_section .pls-slider-navigation {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
    z-index: 40 !important;
}
body.home #most_poupolar_sec .pls-slider-prev,
body.home #most_poupolar_sec .pls-slider-next,
body.home #nyheder_section .pls-slider-prev,
body.home #nyheder_section .pls-slider-next {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 41 !important;
}

body.home #section-71715 .dampamok-home-carousel-prev,
body.home #section-71715 .dampamok-home-carousel-next,
body.home #section-nyheder .dampamok-home-carousel-prev,
body.home #section-nyheder .dampamok-home-carousel-next,
body.home #section-16457 .dampamok-home-carousel-prev,
body.home #section-16457 .dampamok-home-carousel-next {
    background: rgba(8, 24, 68, 0.92) !important;
    color: #fff !important;
    border: 1.5px solid rgba(29, 78, 216, 0.65) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(29, 78, 216, 0.35) !important;
}

/* Keep every homepage product-slider viewport at the actual width of its
 * section. Earlier overrides made the lower two sliders 70px wider than their
 * visible container, which necessarily exposed clipped cards at the edges.
 */
body.home #most_poupolar_sec .elementor-widget-pls-products-grid-slider,
body.home #nyheder_section .elementor-widget-pls-products-grid-slider,
body.home .elementor-element-37a7a0cf .elementor-widget-pls-products-grid-slider {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

body.home #most_poupolar_sec .pls-products-grid-slider,
body.home #nyheder_section .pls-products-grid-slider,
body.home .elementor-element-37a7a0cf .pls-products-grid-slider,
body.home #most_poupolar_sec .woocommerce,
body.home #nyheder_section .woocommerce,
body.home .elementor-element-37a7a0cf .woocommerce,
body.home #section-71715,
body.home #section-nyheder,
body.home #section-16457 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}


/* FINAL KUNDERNES FAVORITTER DESKTOP FIX: native track + dedicated controls. */
body.home #section-16457.dampamok-favorites-carousel {
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
    touch-action: pan-y !important;
}

body.home #section-16457.dampamok-favorites-carousel > .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: max-content !important;
    transform-style: preserve-3d !important;
    will-change: transform !important;
}

body.home #section-16457.dampamok-favorites-carousel > .swiper-wrapper > .swiper-slide {
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

body.home #section-16457 .dampamok-favorites-navigation {
    position: absolute !important;
    inset: 0 !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    display: block !important;
}

body.home #section-16457 .dampamok-favorites-prev,
body.home #section-16457 .dampamok-favorites-next {
    position: absolute !important;
    top: 42% !important;
    transform: translateY(-50%) !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(8, 24, 68, .94) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 4px 18px rgba(0,0,0,.42) !important;
    pointer-events: auto !important;
    z-index: 100000 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body.home #section-16457 .dampamok-favorites-prev { left: 12px !important; }
body.home #section-16457 .dampamok-favorites-next { right: 12px !important; }

body.home #section-16457 .dampamok-favorites-prev svg,
body.home #section-16457 .dampamok-favorites-next svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    pointer-events: none !important;
}

@media (max-width: 767px) {
    body.home #section-16457 .dampamok-favorites-prev,
    body.home #section-16457 .dampamok-favorites-next {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        top: 40% !important;
    }
    body.home #section-16457 .dampamok-favorites-prev { left: 6px !important; }
    body.home #section-16457 .dampamok-favorites-next { right: 6px !important; }
}

/* FINAL 4-UP FAVORITES GEOMETRY: the slider itself is the exact viewport.
 * This removes the theme's .row negative margins so no fifth/partial card can
 * enter the visible area on desktop.
 */
body.home #section-16457.dampamok-favorites-carousel {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
body.home #section-16457.dampamok-favorites-carousel > .swiper-wrapper {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
@media (min-width: 1024px) {
    body.home #section-16457.dampamok-favorites-carousel > .swiper-wrapper > .swiper-slide {
        width: calc((100% - 60px) / 4) !important;
        min-width: calc((100% - 60px) / 4) !important;
        max-width: calc((100% - 60px) / 4) !important;
        flex: 0 0 calc((100% - 60px) / 4) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Isolated Favorites viewport: only this box clips the track. */
body.home #section-16457.dampamok-favorites-carousel > .dampamok-favorites-viewport {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
}
body.home #section-16457.dampamok-favorites-carousel > .dampamok-favorites-viewport > .swiper-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    column-gap: 20px !important;
    row-gap: 0 !important;
    gap: 20px !important;
}
@media (min-width: 768px) and (max-width: 1023px) {
    body.home #section-16457.dampamok-favorites-carousel > .dampamok-favorites-viewport > .swiper-wrapper {
        column-gap: 16px !important;
        gap: 16px !important;
    }
}
@media (max-width: 767px) {
    body.home #section-16457.dampamok-favorites-carousel > .dampamok-favorites-viewport > .swiper-wrapper {
        column-gap: 12px !important;
        gap: 12px !important;
    }
}

@media (min-width: 1024px) {
    body.home #section-16457.dampamok-favorites-carousel > .dampamok-favorites-viewport > .swiper-wrapper > .swiper-slide {
        width: calc((100% - 60px) / 4) !important;
        min-width: calc((100% - 60px) / 4) !important;
        max-width: calc((100% - 60px) / 4) !important;
        flex: 0 0 calc((100% - 60px) / 4) !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

/* MOBILE NYHEDER ARROWS: match the blue navigation used by the other
 * homepage carousels. This targets only NYHEDER and only mobile widths. */
@media (max-width: 767px) {
    body.home #nyheder_section .pls-slider-prev,
    body.home #nyheder_section .pls-slider-next,
    body.home #section-nyheder .pls-slider-prev,
    body.home #section-nyheder .pls-slider-next {
        background: rgba(8, 24, 68, 0.94) !important;
        color: #ffffff !important;
        border: 1.5px solid rgba(29, 78, 216, 0.65) !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.42), 0 0 14px rgba(29, 78, 216, 0.30) !important;
    }

    body.home #nyheder_section .pls-slider-prev:hover,
    body.home #nyheder_section .pls-slider-next:hover,
    body.home #section-nyheder .pls-slider-prev:hover,
    body.home #section-nyheder .pls-slider-next:hover {
        background: #0b2e7a !important;
        border-color: rgba(59, 130, 246, 0.90) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 18px rgba(29, 78, 216, 0.42) !important;
    }
}

/* FINAL FIX: NYHEDER + KUNDERNES FAVORITTER ADD-TO-CART BUTTON BOX
 * The mobile-specific rule in styles.css puts 20px left/right padding on the
 * .pls-cart-button wrapper. The child <a> is width:100%, so its percentage is
 * resolved against the wrapper's smaller content box and the blue link cannot
 * fill the full wrapper. SALE does not have that wrapper padding. Remove only
 * that padding for these two homepage carousels so the existing child button
 * fills the complete allocated button box, matching SALE without changing the
 * button's dimensions, typography, colors, or carousel behavior.
 */
@media (max-width: 767px) {
    body.home #section-nyheder .pls-cart-button,
    body.home #section-16457 .pls-cart-button {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
