/* Cosmo Pharm V15.3 consolidated visual repair */

/* ---------- Global controls ---------- */
body.cp-global-shell #ast-scroll-top,
body.cp-global-shell .ast-scroll-to-top-right#ast-scroll-top{
    background:#d8bd7a !important;
    background-color:#d8bd7a !important;
    color:#173d2d !important;
    border:1px solid rgba(23,61,45,.16) !important;
    border-radius:0 !important;
    box-shadow:0 6px 18px rgba(23,61,45,.10) !important;
}
body.cp-global-shell #ast-scroll-top *,
body.cp-global-shell #ast-scroll-top svg,
body.cp-global-shell #ast-scroll-top path{
    color:#173d2d !important;
    fill:#173d2d !important;
    stroke:#173d2d !important;
}

/* ---------- Language selector ---------- */
body.cp-global-shell .cp-footer-language{
    position:relative !important;
    min-width:220px !important;
    min-height:48px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
}
body.cp-global-shell .cp-footer-language .cp-language-current-label{
    position:absolute !important;
    z-index:9999 !important;
    left:62px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    color:#173d2d !important;
    font-family:Arial,sans-serif !important;
    font-size:15px !important;
    font-weight:500 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    pointer-events:none !important;
}

/* ---------- Price hierarchy, homepage and shop, all viewports ---------- */
body.home .cp-home .cp-featured .cp-price,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:max-content !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:8px 0 13px !important;
    padding:8px 11px !important;
    background:#173d2d !important;
    background-color:#173d2d !important;
    border:1px solid rgba(183,154,88,.38) !important;
    border-radius:0 !important;
    color:#d8bd7a !important;
    font-family:Arial,sans-serif !important;
    font-size:14px !important;
    font-weight:700 !important;
    line-height:1.05 !important;
}
body.home .cp-home .cp-featured .cp-price *,
body.home .cp-home .cp-featured .cp-price .woocommerce-Price-amount,
body.home .cp-home .cp-featured .cp-price bdi,
body.home .cp-home .cp-featured .cp-price .woocommerce-Price-currencySymbol,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price *,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price .woocommerce-Price-amount,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price bdi,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price .woocommerce-Price-currencySymbol{
    color:#d8bd7a !important;
    font-weight:700 !important;
}

/* ---------- Promise carousel, desktop only ---------- */
body.home .cp-v153-promise-carousel{
    position:relative !important;
    display:block !important;
    min-width:0 !important;
    padding:34px 32px 28px !important;
    overflow:hidden !important;
    background:#f7f5ef !important;
    border:1px solid #ece6d8 !important;
}
body.home .cp-v153-promise-carousel .cp-promise-product-viewport{
    overflow:hidden !important;
}
body.home .cp-v153-promise-carousel .cp-promise-product-track{
    display:flex !important;
    align-items:flex-start !important;
    transform:translate3d(0,0,0);
    transition:transform .68s cubic-bezier(.22,.61,.36,1) !important;
    will-change:transform;
}
body.home .cp-v153-promise-carousel .cp-promise-product-slide{
    flex:0 0 33.333333% !important;
    width:33.333333% !important;
    min-width:0 !important;
    padding:0 9px !important;
    text-align:center !important;
    text-decoration:none !important;
}
body.home .cp-v153-promise-carousel .cp-promise-product-image{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    aspect-ratio:1 / 1.12 !important;
    overflow:hidden !important;
}
body.home .cp-v153-promise-carousel .cp-promise-product-image img{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
}
body.home .cp-v153-promise-carousel .cp-promise-product-name{
    display:-webkit-box !important;
    min-height:2.55em !important;
    margin-top:10px !important;
    overflow:hidden !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    color:#173d2d !important;
    font-family:Georgia,"Times New Roman",serif !important;
    font-size:14px !important;
    line-height:1.25 !important;
}
body.home .cp-v153-promise-carousel .cp-promise-carousel-controls button{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:40px !important;
    height:40px !important;
    padding:0 !important;
    margin:0 !important;
    background:#fff !important;
    background-color:#fff !important;
    border:1px solid rgba(23,61,45,.22) !important;
    border-radius:0 !important;
    color:#173d2d !important;
    font-size:25px !important;
    line-height:1 !important;
    box-shadow:none !important;
}
body.home .cp-v153-promise-carousel .cp-promise-carousel-controls button:hover{
    background:#173d2d !important;
    background-color:#173d2d !important;
    color:#d8bd7a !important;
}

/* ---------- Mobile hard repair ---------- */
@media (max-width:767px){
    /* Promise must be text only on mobile. */
    body.home .cp-v153-promise-carousel,
    body.home .cp-promise-product-carousel{
        display:none !important;
    }
    body.home .cp-promise-editorial-grid{
        display:block !important;
        grid-template-columns:1fr !important;
        gap:0 !important;
    }
    body.home .cp-promise-editorial-copy{
        width:100% !important;
        max-width:none !important;
    }

    /* Homepage selected products: compact editorial rows, never giant full-width bottles. */
    body.home .cp-home .cp-featured{
        padding-top:52px !important;
        padding-bottom:52px !important;
    }
    body.home .cp-home .cp-featured .cp-product-grid{
        display:block !important;
        width:100% !important;
        margin:0 !important;
        padding:0 !important;
    }
    body.home .cp-home .cp-featured .cp-product-card{
        display:grid !important;
        grid-template-columns:126px minmax(0,1fr) !important;
        gap:18px !important;
        align-items:center !important;
        width:100% !important;
        min-width:0 !important;
        margin:0 !important;
        padding:20px 0 !important;
        border-bottom:1px solid #e4e8e5 !important;
    }
    body.home .cp-home .cp-featured .cp-product-card:first-child{
        padding-top:0 !important;
    }
    body.home .cp-home .cp-featured .cp-product-card:last-child{
        padding-bottom:0 !important;
        border-bottom:0 !important;
    }
    body.home .cp-home .cp-featured .cp-product-visual{
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        width:126px !important;
        height:164px !important;
        min-height:0 !important;
        margin:0 !important;
        padding:10px !important;
        overflow:hidden !important;
        background:#f7f8f7 !important;
    }
    body.home .cp-home .cp-featured .cp-product-visual img,
    body.home .cp-home .cp-featured .cp-product-visual .cp-product-image{
        display:block !important;
        width:auto !important;
        height:auto !important;
        max-width:100% !important;
        max-height:144px !important;
        margin:0 auto !important;
        padding:0 !important;
        object-fit:contain !important;
    }
    body.home .cp-home .cp-featured .cp-product-copy{
        display:block !important;
        min-width:0 !important;
        width:100% !important;
        padding:0 !important;
        margin:0 !important;
    }
    body.home .cp-home .cp-featured .cp-product-copy h3,
    body.home .cp-home .cp-featured .cp-product-copy h3 a{
        display:-webkit-box !important;
        max-width:100% !important;
        min-height:0 !important;
        margin:0 0 8px !important;
        overflow:hidden !important;
        -webkit-box-orient:vertical !important;
        -webkit-line-clamp:3 !important;
        color:#173d2d !important;
        font-family:Georgia,"Times New Roman",serif !important;
        font-size:17px !important;
        line-height:1.16 !important;
        letter-spacing:-.015em !important;
        text-decoration:none !important;
        overflow-wrap:anywhere !important;
    }
    body.home .cp-home .cp-featured .cp-price{
        margin:7px 0 10px !important;
        padding:7px 9px !important;
        font-size:13px !important;
    }
    body.home .cp-home .cp-featured .cp-product-copy .cp-text-link{
        display:inline-flex !important;
        margin:0 !important;
        color:#2d5d45 !important;
        font-size:11px !important;
        font-weight:800 !important;
        line-height:1.25 !important;
        letter-spacing:.035em !important;
        text-transform:uppercase !important;
    }

    /* Shop cards: readable and bounded on mobile. */
    body.cp-shop-v14 ul.products{
        grid-template-columns:1fr !important;
        gap:0 !important;
    }
    body.cp-shop-v14 ul.products li.product.cp-v14-product-card{
        display:grid !important;
        grid-template-columns:126px minmax(0,1fr) !important;
        grid-template-areas:
            "media title"
            "media price"
            "media cta" !important;
        column-gap:18px !important;
        row-gap:0 !important;
        align-items:start !important;
        width:100% !important;
        min-width:0 !important;
        margin:0 !important;
        padding:20px 0 !important;
        border-bottom:1px solid #e4e8e5 !important;
    }
    body.cp-shop-v14 .cp-v14-card-main{
        display:contents !important;
    }
    body.cp-shop-v14 .cp-v14-card-media{
        grid-area:media !important;
        width:126px !important;
        height:164px !important;
        min-height:0 !important;
        margin:0 !important;
        padding:10px !important;
        overflow:hidden !important;
        background:#f7f8f7 !important;
    }
    body.cp-shop-v14 .cp-v14-card-media img.cp-v14-card-image{
        display:block !important;
        width:auto !important;
        height:auto !important;
        max-width:100% !important;
        max-height:144px !important;
        margin:0 auto !important;
        padding:0 !important;
        object-fit:contain !important;
    }
    body.cp-shop-v14 .cp-v14-card-title{
        grid-area:title !important;
        display:-webkit-box !important;
        min-width:0 !important;
        min-height:0 !important;
        max-width:100% !important;
        margin:0 0 8px !important;
        overflow:hidden !important;
        -webkit-box-orient:vertical !important;
        -webkit-line-clamp:3 !important;
        color:#173d2d !important;
        font-size:17px !important;
        line-height:1.16 !important;
        overflow-wrap:anywhere !important;
    }
    body.cp-shop-v14 ul.products li.product .cp-v14-card-price{
        grid-area:price !important;
        margin:4px 0 10px !important;
        padding:7px 9px !important;
        font-size:13px !important;
    }
    body.cp-shop-v14 li.cp-v14-product-card .cp-v14-product-cta{
        grid-area:cta !important;
        align-self:start !important;
        justify-self:start !important;
        margin:0 !important;
        padding:0 !important;
        color:#2d5d45 !important;
        background:transparent !important;
        border:0 !important;
        font-size:11px !important;
        font-weight:800 !important;
        line-height:1.25 !important;
        letter-spacing:.035em !important;
    }

    /* Footer selector and up button stay out of the way. */
    body.cp-global-shell .cp-footer-language{
        width:230px !important;
        min-width:230px !important;
        max-width:calc(100vw - 44px) !important;
        margin:4px auto !important;
    }
    body.cp-global-shell #ast-scroll-top{
        right:16px !important;
        bottom:18px !important;
        width:44px !important;
        height:44px !important;
    }
}

@media (max-width:390px){
    body.home .cp-home .cp-featured .cp-product-card,
    body.cp-shop-v14 ul.products li.product.cp-v14-product-card{
        grid-template-columns:112px minmax(0,1fr) !important;
        gap:14px !important;
    }
    body.home .cp-home .cp-featured .cp-product-visual,
    body.cp-shop-v14 .cp-v14-card-media{
        width:112px !important;
        height:150px !important;
    }
    body.home .cp-home .cp-featured .cp-product-visual img,
    body.cp-shop-v14 .cp-v14-card-media img.cp-v14-card-image{
        max-height:132px !important;
    }
    body.home .cp-home .cp-featured .cp-product-copy h3,
    body.home .cp-home .cp-featured .cp-product-copy h3 a,
    body.cp-shop-v14 .cp-v14-card-title{
        font-size:16px !important;
    }
}

/* V17 language repair: Weglot owns the label. Never draw a second label over it. */
body.cp-global-shell .cp-language-current-label,
body.cp-global-shell [data-cp-language-label]{
    display:none !important;
}
body.cp-global-shell .cp-footer-language .wgcurrent a span,
body.cp-global-shell .cp-footer-language .weglot_choice span,
body.cp-global-shell .cp-footer-language .country-selector a span{
    display:inline !important;
    visibility:visible !important;
    opacity:1 !important;
    color:#173d2d !important;
}

/* =========================================================
   V18 global polish
   ========================================================= */

/* One price language across the site: red text, no decorative price box. */
body.home .cp-home .cp-featured .cp-price,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price,
body.cp-single-product-v16 .cp-v16-related-price{
    display:block !important;
    width:auto !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:8px 0 12px !important;
    padding:0 !important;
    background:transparent !important;
    background-color:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    color:#ef3128 !important;
    font-family:Arial,sans-serif !important;
    font-size:15px !important;
    font-weight:800 !important;
    line-height:1.2 !important;
    box-shadow:none !important;
}
body.home .cp-home .cp-featured .cp-price *,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price *,
body.cp-single-product-v16 .cp-v16-related-price *,
body.home .cp-home .cp-featured .cp-price .woocommerce-Price-amount,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price .woocommerce-Price-amount,
body.cp-single-product-v16 .cp-v16-related-price .woocommerce-Price-amount,
body.home .cp-home .cp-featured .cp-price bdi,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price bdi,
body.cp-single-product-v16 .cp-v16-related-price bdi,
body.home .cp-home .cp-featured .cp-price .woocommerce-Price-currencySymbol,
body.cp-shop-v14 ul.products li.product .cp-v14-card-price .woocommerce-Price-currencySymbol,
body.cp-single-product-v16 .cp-v16-related-price .woocommerce-Price-currencySymbol{
    color:#ef3128 !important;
    background:transparent !important;
    font-weight:800 !important;
}

/* Weglot: hide only its native text and draw exactly one stable current-language label. */
body.cp-global-shell .cp-footer-language{
    position:relative !important;
    width:220px !important;
    min-width:220px !important;
    min-height:48px !important;
}
body.cp-global-shell .cp-footer-language .cp-v18-native-language-text{
    font-size:0 !important;
    line-height:0 !important;
    color:transparent !important;
    text-shadow:none !important;
}
body.cp-global-shell .cp-footer-language .cp-v18-language-label{
    position:absolute !important;
    z-index:20 !important;
    left:64px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:auto !important;
    max-width:115px !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    color:#173d2d !important;
    font-family:Arial,sans-serif !important;
    font-size:15px !important;
    font-weight:500 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
    pointer-events:none !important;
}
body.cp-global-shell .cp-footer-language .weglot-container,
body.cp-global-shell .cp-footer-language .wg-default,
body.cp-global-shell .cp-footer-language .country-selector,
body.cp-global-shell .cp-footer-language .cp-language-integrated,
body.cp-global-shell .cp-footer-language .wgcurrent,
body.cp-global-shell .cp-footer-language .wgcurrent > a,
body.cp-global-shell .cp-footer-language .weglot_choice,
body.cp-global-shell .cp-footer-language .country-selector > a{
    width:220px !important;
    min-width:220px !important;
    max-width:220px !important;
}

@media(max-width:767px){
    body.home .cp-home .cp-featured .cp-price,
    body.cp-shop-v14 ul.products li.product .cp-v14-card-price,
    body.cp-single-product-v16 .cp-v16-related-price{
        margin:7px 0 10px !important;
        padding:0 !important;
        font-size:14px !important;
    }
    body.cp-global-shell .cp-footer-language{
        width:220px !important;
        min-width:220px !important;
        max-width:220px !important;
        margin:4px auto !important;
    }
}


/* =========================================================
   V19 deterministic language selector label
   ========================================================= */
body.cp-global-shell .cp-footer-language{
    position:relative !important;
    width:220px !important;
    min-width:220px !important;
    max-width:220px !important;
    min-height:48px !important;
}
body.cp-global-shell .cp-footer-language .cp-v18-language-label,
body.cp-global-shell .cp-footer-language .cp-language-current-label,
body.cp-global-shell .cp-footer-language [data-cp-language-label]{
    display:none !important;
}
body.cp-global-shell .cp-footer-language .cp-v19-language-label{
    position:absolute !important;
    z-index:40 !important;
    left:64px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    max-width:112px !important;
    overflow:hidden !important;
    color:#173d2d !important;
    font-family:Arial,sans-serif !important;
    font-size:15px !important;
    font-weight:500 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
    pointer-events:none !important;
}
/* Hide only the native current-language word. Flag/background and arrow remain visible. */
body.cp-global-shell .cp-footer-language .cp-v19-language-current{
    font-size:0 !important;
    color:transparent !important;
    text-shadow:none !important;
}
body.cp-global-shell .cp-footer-language .cp-v19-language-current > span:not(.wg-flag),
body.cp-global-shell .cp-footer-language .cp-v19-language-current > strong,
body.cp-global-shell .cp-footer-language .cp-v19-language-current > em{
    font-size:0 !important;
    color:transparent !important;
}
body.cp-global-shell .cp-footer-language .cp-v19-language-current .wg-flag{
    display:inline-block !important;
    visibility:visible !important;
    opacity:1 !important;
}
@media(max-width:767px){
    body.cp-global-shell .cp-footer-language{
        margin:4px auto !important;
    }
}

/* =========================================================
   V20 final alignment and language hardening
   ========================================================= */

/* Weglot footer: use one real text node, never an overlay label. */
body.cp-global-shell .cp-footer-language .cp-v19-language-label,
body.cp-global-shell .cp-footer-language .cp-v18-language-label,
body.cp-global-shell .cp-footer-language .cp-language-current-label,
body.cp-global-shell .cp-footer-language [data-cp-language-label]{
    display:none !important;
}
body.cp-global-shell .cp-footer-language,
body.cp-global-shell .cp-footer-language .weglot-container,
body.cp-global-shell .cp-footer-language .wg-default,
body.cp-global-shell .cp-footer-language .country-selector,
body.cp-global-shell .cp-footer-language .cp-language-integrated,
body.cp-global-shell .cp-footer-language .wgcurrent,
body.cp-global-shell .cp-footer-language .wgcurrent > a,
body.cp-global-shell .cp-footer-language .weglot_choice,
body.cp-global-shell .cp-footer-language .country-selector > a{
    width:220px !important;
    min-width:220px !important;
    max-width:220px !important;
}
body.cp-global-shell .cp-footer-language .cp-v20-language-current,
body.cp-global-shell .cp-footer-language .cp-v20-language-current *,
body.cp-global-shell .cp-footer-language .cp-v20-language-text{
    font-family:Arial,sans-serif !important;
    font-size:15px !important;
    font-weight:500 !important;
    line-height:1 !important;
    color:#173d2d !important;
    text-shadow:none !important;
}
body.cp-global-shell .cp-footer-language .cp-v20-language-current{
    font-size:15px !important;
    color:#173d2d !important;
}

/* Homepage featured products: desktop price and CTA align across the row. */
@media(min-width:768px){
    body.home .cp-featured .cp-product-grid{
        align-items:stretch !important;
    }
    body.home .cp-featured .cp-product-card{
        display:flex !important;
        flex-direction:column !important;
        height:100% !important;
    }
    body.home .cp-featured .cp-product-copy{
        display:grid !important;
        grid-template-rows:58px 24px 24px !important;
        align-content:start !important;
        min-height:118px !important;
        height:118px !important;
    }
    body.home .cp-featured .cp-product-copy h3{
        display:block !important;
        height:58px !important;
        min-height:58px !important;
        margin:0 !important;
        overflow:hidden !important;
    }
    body.home .cp-featured .cp-product-copy h3 a{
        display:-webkit-box !important;
        height:58px !important;
        overflow:hidden !important;
        -webkit-box-orient:vertical !important;
        -webkit-line-clamp:2 !important;
    }
    body.home .cp-featured .cp-product-copy .cp-price{
        align-self:start !important;
        margin:1px 0 0 !important;
    }
    body.home .cp-featured .cp-product-copy .cp-text-link{
        align-self:end !important;
        margin:0 !important;
    }

    /* Shop cards keep title, price and CTA on consistent baselines as well. */
    body.cp-shop-v14 ul.products li.product.cp-v14-product-card{
        height:100% !important;
    }
    body.cp-shop-v14 .cp-v14-card-title{
        height:74px !important;
        min-height:74px !important;
        max-height:74px !important;
        margin-bottom:10px !important;
    }
    body.cp-shop-v14 .cp-v14-card-price{
        min-height:24px !important;
        height:24px !important;
        margin:0 0 12px !important;
    }
}
