/*
 * Cosmo Pharm V14
 * Shop + category archives + reusable product cards
 */

body.cp-shop-v14{
    --cp14-green:#173d2d;
    --cp14-green-mid:#2d5d45;
    --cp14-gold:#b79a58;
    --cp14-text:#20352a;
    --cp14-muted:#727a75;
    --cp14-line:#e4e8e5;
    --cp14-soft:#f7f8f7;
    --cp14-white:#ffffff;
    background:#fff;
}

body.cp-shop-v14 #content{
    padding-top:0 !important;
}

body.cp-shop-v14 #content > .ast-container{
    width:min(calc(100% - 48px), 1240px) !important;
    max-width:1240px !important;
    margin:0 auto !important;
    padding:0 !important;
    display:block !important;
}

body.cp-shop-v14 #primary{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 0 88px !important;
    border:0 !important;
    float:none !important;
}

body.cp-shop-v14 #secondary,
body.cp-shop-v14 .widget-area.secondary{
    display:none !important;
}

body.cp-shop-v14 .woocommerce-products-header,
body.cp-shop-v14 .entry-header{
    display:none !important;
}

body.cp-shop-v14 .cp-shop-shell{
    width:100%;
    max-width:1080px;
    margin:0 auto;
}

body.cp-shop-v14 .cp-shop-hero{
    padding:84px 0 58px;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-shop-eyebrow{
    margin-bottom:18px;
    color:var(--cp14-gold);
    font-size:12px;
    font-weight:800;
    letter-spacing:.18em;
    text-transform:uppercase;
}

body.cp-shop-v14 .cp-shop-hero h1{
    max-width:900px;
    margin:0;
    color:var(--cp14-green);
    font-family:Georgia, "Times New Roman", serif;
    font-size:clamp(48px, 5vw, 74px);
    line-height:.98;
    font-weight:400;
    letter-spacing:-.035em;
}

body.cp-shop-v14 .cp-shop-hero p{
    max-width:720px;
    margin:28px 0 0;
    color:var(--cp14-muted);
    font-size:19px;
    line-height:1.65;
}

body.cp-shop-v14 .cp-shop-category-nav{
    margin:34px 0 28px;
    border-top:1px solid var(--cp14-line);
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-shop-category-scroll{
    display:flex;
    align-items:center;
    gap:0;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
}

body.cp-shop-v14 .cp-shop-category-scroll::-webkit-scrollbar{
    display:none;
}

body.cp-shop-v14 .cp-shop-category-link{
    flex:0 0 auto;
    padding:17px 20px 16px;
    color:var(--cp14-green);
    border-right:1px solid var(--cp14-line);
    font-size:13px;
    font-weight:750;
    line-height:1.2;
    text-decoration:none;
    white-space:nowrap;
    transition:background-color .18s ease, color .18s ease;
}

body.cp-shop-v14 .cp-shop-category-link:first-child{
    border-left:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-shop-category-link:hover,
body.cp-shop-v14 .cp-shop-category-link:focus,
body.cp-shop-v14 .cp-shop-category-link.is-current{
    background:var(--cp14-green);
    color:#fff;
}

body.cp-shop-v14 .woocommerce-notices-wrapper{
    margin-top:24px;
}

body.cp-shop-v14 .woocommerce-result-count{
    margin:8px 0 32px !important;
    color:var(--cp14-muted);
    font-size:14px;
    line-height:44px;
}

body.cp-shop-v14 .woocommerce-ordering{
    margin:8px 0 32px !important;
}

body.cp-shop-v14 .woocommerce-ordering select{
    min-width:230px;
    height:44px;
    padding:0 42px 0 14px;
    color:var(--cp14-green);
    background:#fff;
    border:1px solid var(--cp14-line);
    border-radius:0;
    font-size:14px;
    box-shadow:none;
}

body.cp-shop-v14 ul.products{
    clear:both;
    display:grid !important;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:48px 24px;
    margin:0 !important;
    padding:0 !important;
}

body.cp-shop-v14 ul.products::before,
body.cp-shop-v14 ul.products::after{
    display:none !important;
}

body.cp-shop-v14 ul.products li.product{
    position:relative;
    display:flex;
    flex-direction:column;
    width:auto !important;
    min-width:0;
    margin:0 !important;
    padding:0 0 22px !important;
    float:none !important;
    background:#fff;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 ul.products li.product a.woocommerce-LoopProduct-link{
    display:block;
    color:inherit;
    text-decoration:none;
}

body.cp-shop-v14 ul.products li.product a img{
    width:100% !important;
    aspect-ratio:1 / 1;
    margin:0 0 24px !important;
    padding:24px;
    object-fit:contain;
    background:var(--cp14-soft);
    transition:transform .28s ease;
}

body.cp-shop-v14 ul.products li.product:hover a img{
    transform:scale(1.025);
}

body.cp-shop-v14 ul.products li.product .onsale{
    top:14px !important;
    left:14px !important;
    right:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:8px 11px !important;
    color:#fff !important;
    background:var(--cp14-green) !important;
    border-radius:0 !important;
    font-size:12px !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:.04em;
    z-index:3;
}

body.cp-shop-v14 .woocommerce-loop-product__title,
body.cp-shop-v14 .cp-v14-card-title{
    display:-webkit-box;
    min-height:3.55em;
    margin:0 0 12px !important;
    overflow:hidden;
    color:var(--cp14-green) !important;
    font-family:Georgia, "Times New Roman", serif !important;
    font-size:21px !important;
    line-height:1.18 !important;
    font-weight:400 !important;
    letter-spacing:-.018em;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
}

body.cp-shop-v14 ul.products li.product .price{
    min-height:30px;
    margin:0 0 18px !important;
    color:var(--cp14-muted) !important;
    font-size:17px !important;
    font-weight:500 !important;
    line-height:1.4;
}

body.cp-shop-v14 ul.products li.product .price del{
    margin-right:7px;
    opacity:.52;
    font-size:.85em;
}

body.cp-shop-v14 ul.products li.product .price ins{
    color:var(--cp14-green);
    font-weight:700;
    text-decoration:none;
}

body.cp-shop-v14 .cp-v14-product-cta{
    display:inline-flex;
    align-items:center;
    gap:9px;
    width:max-content;
    margin-top:auto;
    color:var(--cp14-green);
    border-bottom:1px solid transparent;
    font-size:14px;
    font-weight:800;
    line-height:1.35;
    text-decoration:none;
}

body.cp-shop-v14 .cp-v14-product-cta:hover,
body.cp-shop-v14 .cp-v14-product-cta:focus{
    border-bottom-color:var(--cp14-green);
}

body.cp-shop-v14 nav.woocommerce-pagination{
    margin:72px 0 0;
    text-align:center;
}

body.cp-shop-v14 nav.woocommerce-pagination ul{
    display:inline-flex;
    gap:7px;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
}

body.cp-shop-v14 nav.woocommerce-pagination ul li{
    border:0 !important;
}

body.cp-shop-v14 nav.woocommerce-pagination ul li a,
body.cp-shop-v14 nav.woocommerce-pagination ul li span{
    display:grid;
    width:42px;
    height:42px;
    place-items:center;
    margin:0 !important;
    padding:0 !important;
    color:var(--cp14-green);
    background:#fff;
    border:1px solid var(--cp14-line);
    font-size:14px;
    font-weight:700;
    line-height:1;
}

body.cp-shop-v14 nav.woocommerce-pagination ul li span.current,
body.cp-shop-v14 nav.woocommerce-pagination ul li a:hover{
    color:#fff;
    background:var(--cp14-green);
    border-color:var(--cp14-green);
}

/* Woo category tiles, in case Shop is configured to display categories. */
body.cp-shop-v14 ul.products li.product-category h2{
    margin-top:18px !important;
    color:var(--cp14-green) !important;
    font-family:Georgia, "Times New Roman", serif !important;
    font-size:22px !important;
    font-weight:400 !important;
}

body.cp-shop-v14 ul.products li.product-category mark{
    color:var(--cp14-muted);
    background:transparent;
    font-family:Arial, sans-serif;
    font-size:12px;
}

/* Tablet */
@media(max-width:1099px){
    body.cp-shop-v14 #content > .ast-container{
        width:min(calc(100% - 36px), 980px) !important;
    }

    body.cp-shop-v14 ul.products{
        grid-template-columns:repeat(3, minmax(0, 1fr));
        gap:42px 20px;
    }

    body.cp-shop-v14 .cp-shop-hero{
        padding-top:68px;
    }
}

/* Mobile */
@media(max-width:767px){
    body.cp-shop-v14 #content > .ast-container{
        width:100% !important;
    }

    body.cp-shop-v14 #primary{
        padding-bottom:64px !important;
    }

    body.cp-shop-v14 .cp-shop-hero{
        padding:54px 22px 38px;
    }

    body.cp-shop-v14 .cp-shop-hero h1{
        font-size:clamp(42px, 13vw, 58px);
        line-height:.98;
    }

    body.cp-shop-v14 .cp-shop-hero p{
        margin-top:22px;
        font-size:17px;
        line-height:1.55;
    }

    body.cp-shop-v14 .cp-shop-category-nav{
        margin:24px 0 22px;
    }

    body.cp-shop-v14 .cp-shop-category-scroll{
        padding-left:18px;
        padding-right:18px;
    }

    body.cp-shop-v14 .cp-shop-category-link{
        padding:15px 16px 14px;
        font-size:12px;
    }

    body.cp-shop-v14 .woocommerce-result-count{
        float:none !important;
        margin:0 22px 8px !important;
        line-height:1.4;
    }

    body.cp-shop-v14 .woocommerce-ordering{
        float:none !important;
        margin:0 22px 30px !important;
    }

    body.cp-shop-v14 .woocommerce-ordering,
    body.cp-shop-v14 .woocommerce-ordering select{
        width:calc(100% - 44px);
        max-width:none;
    }

    body.cp-shop-v14 .woocommerce-ordering select{
        width:100%;
    }

    body.cp-shop-v14 ul.products{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:34px 14px;
        padding:0 18px !important;
    }

    body.cp-shop-v14 ul.products li.product{
        padding-bottom:18px !important;
    }

    body.cp-shop-v14 ul.products li.product a img{
        margin-bottom:16px !important;
        padding:14px;
    }

    body.cp-shop-v14 .woocommerce-loop-product__title,
body.cp-shop-v14 .cp-v14-card-title{
        min-height:3.55em;
        margin-bottom:9px !important;
        font-size:17px !important;
        line-height:1.18 !important;
    }

    body.cp-shop-v14 ul.products li.product .price{
        min-height:24px;
        margin-bottom:13px !important;
        font-size:15px !important;
    }

    body.cp-shop-v14 .cp-v14-product-cta{
        gap:6px;
        font-size:13px;
    }

    body.cp-shop-v14 ul.products li.product .onsale{
        top:8px !important;
        left:8px !important;
        padding:7px 8px !important;
        font-size:10px !important;
    }

    body.cp-shop-v14 nav.woocommerce-pagination{
        margin-top:54px;
    }
}

@media(max-width:390px){
    body.cp-shop-v14 ul.products{
        gap:30px 10px;
        padding-left:14px !important;
        padding-right:14px !important;
    }

    body.cp-shop-v14 .woocommerce-loop-product__title,
body.cp-shop-v14 .cp-v14-card-title{
        font-size:16px !important;
    }

    body.cp-shop-v14 ul.products li.product .price{
        font-size:14px !important;
    }
}


/* =========================================================
   V14.1 FIXES
   ========================================================= */

/* We now use the native Astra/Woo title, so only one title remains. */
body.cp-shop-v14 ul.products li.product .woocommerce-loop-product__title{
    color:var(--cp14-green) !important;
    font-family:Georgia, "Times New Roman", serif !important;
    font-weight:400 !important;
    text-decoration:none !important;
}

/* Astra can output ratings independently of WooCommerce's default hook. */
body.cp-shop-v14 ul.products li.product .star-rating{
    display:none !important;
}

/* Force the native loop button to disappear if a plugin/theme injects a second one. */
body.cp-shop-v14 ul.products li.product a.button:not(.cp-v14-product-cta),
body.cp-shop-v14 ul.products li.product .add_to_cart_button,
body.cp-shop-v14 ul.products li.product .product_type_simple.button,
body.cp-shop-v14 ul.products li.product .product_type_variable.button{
    display:none !important;
}

/* V14.1 CTA */
body.cp-shop-v14 ul.products li.product .cp-v14-product-cta{
    display:inline-flex !important;
    align-items:center;
    gap:8px;
    width:max-content;
    margin-top:auto;
    padding:0 !important;
    color:var(--cp14-green) !important;
    background:transparent !important;
    border:0 !important;
    border-bottom:1px solid transparent !important;
    border-radius:0 !important;
    box-shadow:none !important;
    font-size:14px !important;
    font-weight:800 !important;
    line-height:1.4 !important;
    text-decoration:none !important;
}

body.cp-shop-v14 ul.products li.product .cp-v14-product-cta:hover{
    border-bottom-color:var(--cp14-green) !important;
}

/* Mobile: categories are all visible. No hidden horizontal scrolling. */
@media(max-width:767px){
    body.cp-shop-v14 .cp-shop-category-nav{
        margin:24px 18px 28px;
        border:0;
    }

    body.cp-shop-v14 .cp-shop-category-scroll{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:9px;
        overflow:visible;
        padding:0;
    }

    body.cp-shop-v14 .cp-shop-category-link,
    body.cp-shop-v14 .cp-shop-category-link:first-child{
        display:flex;
        align-items:center;
        min-height:50px;
        padding:12px 13px;
        border:1px solid var(--cp14-line);
        white-space:normal;
        line-height:1.25;
    }

    body.cp-shop-v14 .cp-shop-category-link.is-current{
        border-color:var(--cp14-green);
    }
}

@media(max-width:380px){
    body.cp-shop-v14 .cp-shop-category-scroll{
        grid-template-columns:1fr;
    }
}


/* =========================================================
   V14.2: CATEGORY GRID + CONTROLLED PRODUCT CARD
   ========================================================= */

/* Categories: no horizontal scrolling on desktop or mobile. */
body.cp-shop-v14 .cp-shop-category-nav{
    margin:34px 0 42px !important;
    border:0 !important;
}

body.cp-shop-v14 .cp-shop-category-scroll{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:10px !important;
    overflow:visible !important;
    padding:0 !important;
}

body.cp-shop-v14 .cp-shop-category-link,
body.cp-shop-v14 .cp-shop-category-link:first-child{
    position:relative;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    min-height:58px !important;
    padding:14px 42px 14px 16px !important;
    color:var(--cp14-green) !important;
    background:#fff !important;
    border:1px solid var(--cp14-line) !important;
    white-space:normal !important;
    line-height:1.25 !important;
}

body.cp-shop-v14 .cp-shop-category-link::after{
    content:"→";
    position:absolute;
    right:16px;
    top:50%;
    transform:translateY(-50%);
    font-size:16px;
    line-height:1;
}

body.cp-shop-v14 .cp-shop-category-link:hover,
body.cp-shop-v14 .cp-shop-category-link:focus,
body.cp-shop-v14 .cp-shop-category-link.is-current{
    color:#fff !important;
    background:var(--cp14-green) !important;
    border-color:var(--cp14-green) !important;
}

/* Fully controlled V14.2 product cards. */
body.cp-shop-v14 ul.products li.product.cp-v14-product-card{
    display:flex !important;
    flex-direction:column !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 0 24px !important;
    background:#fff !important;
    border:0 !important;
    border-bottom:1px solid var(--cp14-line) !important;
    float:none !important;
    box-shadow:none !important;
}

body.cp-shop-v14 .cp-v14-card-main{
    display:block !important;
    color:inherit !important;
    text-decoration:none !important;
}

body.cp-shop-v14 .cp-v14-card-media{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    aspect-ratio:1 / 1;
    margin:0 0 22px;
    padding:24px;
    overflow:hidden;
    background:var(--cp14-soft);
}

body.cp-shop-v14 .cp-v14-card-media img.cp-v14-card-image{
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    object-fit:contain !important;
    background:transparent !important;
    transform:none;
    transition:transform .28s ease;
}

body.cp-shop-v14 li.cp-v14-product-card:hover .cp-v14-card-image{
    transform:scale(1.025);
}

body.cp-shop-v14 .cp-v14-card-title{
    display:-webkit-box;
    min-height:3.55em;
    margin:0 0 12px !important;
    overflow:hidden;
    color:var(--cp14-green) !important;
    font-family:Georgia, "Times New Roman", serif !important;
    font-size:21px !important;
    line-height:1.18 !important;
    font-weight:400 !important;
    letter-spacing:-.018em;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
}

body.cp-shop-v14 .cp-v14-card-price{
    min-height:30px;
    margin:0 0 18px;
    color:var(--cp14-muted);
    font-size:17px;
    font-weight:500;
    line-height:1.4;
}

body.cp-shop-v14 .cp-v14-card-price del{
    margin-right:7px;
    opacity:.5;
    font-size:.85em;
}

body.cp-shop-v14 .cp-v14-card-price ins{
    color:var(--cp14-green);
    font-weight:700;
    text-decoration:none;
}

body.cp-shop-v14 .cp-v14-stock-note{
    margin:-6px 0 14px;
    color:#8b3d35;
    font-size:12px;
    font-weight:700;
    letter-spacing:.03em;
    text-transform:uppercase;
}

/* The old Astra title/rating/button cannot appear inside our controlled template. */
body.cp-shop-v14 li.cp-v14-product-card .star-rating,
body.cp-shop-v14 li.cp-v14-product-card .button,
body.cp-shop-v14 li.cp-v14-product-card .add_to_cart_button,
body.cp-shop-v14 li.cp-v14-product-card .ast-woo-product-category,
body.cp-shop-v14 li.cp-v14-product-card .astra-shop-summary-wrap{
    display:none !important;
}

body.cp-shop-v14 li.cp-v14-product-card .cp-v14-product-cta{
    display:inline-flex !important;
    align-items:center !important;
    gap:8px !important;
    width:max-content !important;
    margin-top:auto !important;
    padding:0 0 3px !important;
    color:var(--cp14-green) !important;
    background:transparent !important;
    border:0 !important;
    border-bottom:1px solid transparent !important;
    border-radius:0 !important;
    box-shadow:none !important;
    font-size:14px !important;
    font-weight:800 !important;
    line-height:1.4 !important;
    text-decoration:none !important;
}

body.cp-shop-v14 li.cp-v14-product-card .cp-v14-product-cta:hover{
    border-bottom-color:var(--cp14-green) !important;
}

/* Sale percentage badge remains compatible with the existing child-theme filter. */
body.cp-shop-v14 .cp-v14-card-media .onsale{
    top:14px !important;
    left:14px !important;
    right:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:8px 11px !important;
    color:#fff !important;
    background:var(--cp14-green) !important;
    border-radius:0 !important;
    font-size:12px !important;
    font-weight:800 !important;
    line-height:1 !important;
}

/* Tablet */
@media(max-width:1099px){
    body.cp-shop-v14 .cp-shop-category-scroll{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
}

/* Mobile */
@media(max-width:767px){
    body.cp-shop-v14 .cp-shop-category-nav{
        margin:24px 18px 30px !important;
    }

    body.cp-shop-v14 .cp-shop-category-scroll{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:8px !important;
    }

    body.cp-shop-v14 .cp-shop-category-link,
    body.cp-shop-v14 .cp-shop-category-link:first-child{
        min-height:54px !important;
        padding:12px 34px 12px 12px !important;
        font-size:12px !important;
    }

    body.cp-shop-v14 .cp-shop-category-link::after{
        right:12px;
        font-size:14px;
    }

    body.cp-shop-v14 .cp-v14-card-media{
        margin-bottom:15px;
        padding:13px;
    }

    body.cp-shop-v14 .cp-v14-card-title{
        min-height:3.55em;
        margin-bottom:9px !important;
        font-size:17px !important;
    }

    body.cp-shop-v14 .cp-v14-card-price{
        min-height:24px;
        margin-bottom:12px;
        font-size:15px;
    }

    body.cp-shop-v14 li.cp-v14-product-card .cp-v14-product-cta{
        font-size:13px !important;
    }
}

@media(max-width:390px){
    body.cp-shop-v14 .cp-shop-category-scroll{
        grid-template-columns:1fr !important;
    }
}


/* =========================================================
   V14.3: SHOP DISCOVERY AND CATEGORY UX
   ========================================================= */

/* Old V14.2 category-wall rules are neutralized by the new markup. */

body.cp-shop-v14 .cp-shop-hero-main{
    padding:64px 0 42px;
}

body.cp-shop-v14 .cp-shop-hero-main h1{
    max-width:820px;
}

body.cp-shop-v14 .cp-shop-hero-main p{
    margin-top:22px;
}

body.cp-shop-v14 .cp-shop-hero-term{
    padding:52px 0 34px;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-shop-hero-term h1{
    font-size:clamp(44px,4.4vw,64px);
}

body.cp-shop-v14 .cp-shop-term-count{
    margin-top:18px;
    color:var(--cp14-muted);
    font-size:15px;
    font-weight:650;
}

/* Main Shop category discovery */
body.cp-shop-v14 .cp-v143-discovery{
    margin:34px 0 34px;
}

body.cp-shop-v14 .cp-v143-discovery-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:18px;
}

body.cp-shop-v14 .cp-v143-discovery h2{
    margin:0;
    color:var(--cp14-green);
    font-family:Georgia,"Times New Roman",serif;
    font-size:32px;
    line-height:1.05;
    font-weight:400;
    letter-spacing:-.02em;
}

body.cp-shop-v14 .cp-v143-shortcuts{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:8px;
}

body.cp-shop-v14 .cp-v143-shortcut{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:64px;
    padding:14px 15px;
    color:var(--cp14-green);
    background:#fff;
    border:1px solid var(--cp14-line);
    font-size:13px;
    font-weight:750;
    line-height:1.25;
    text-decoration:none;
    transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}

body.cp-shop-v14 .cp-v143-shortcut:hover,
body.cp-shop-v14 .cp-v143-shortcut:focus{
    color:#fff;
    background:var(--cp14-green);
    border-color:var(--cp14-green);
}

/* Collapsible category browser */
body.cp-shop-v14 .cp-v143-browser{
    position:relative;
    margin-top:10px;
    border-top:1px solid var(--cp14-line);
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v143-browser > summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    min-height:54px;
    padding:0 2px;
    color:var(--cp14-green);
    cursor:pointer;
    list-style:none;
    font-size:14px;
    font-weight:800;
}

body.cp-shop-v14 .cp-v143-browser > summary::-webkit-details-marker{
    display:none;
}

body.cp-shop-v14 .cp-v143-summary-plus{
    display:grid;
    width:30px;
    height:30px;
    place-items:center;
    font-size:22px;
    font-weight:400;
    transition:transform .18s ease;
}

body.cp-shop-v14 .cp-v143-browser[open] .cp-v143-summary-plus{
    transform:rotate(45deg);
}

body.cp-shop-v14 .cp-v143-all-groups{
    display:grid;
    grid-template-columns:1.5fr .8fr .8fr;
    gap:38px;
    padding:8px 0 30px;
}

body.cp-shop-v14 .cp-v143-group-title{
    margin-bottom:12px;
    color:var(--cp14-gold);
    font-size:11px;
    font-weight:850;
    letter-spacing:.14em;
    text-transform:uppercase;
}

body.cp-shop-v14 .cp-v143-group-links{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 18px;
}

body.cp-shop-v14 .cp-v143-group:nth-child(n+2) .cp-v143-group-links{
    grid-template-columns:1fr;
}

body.cp-shop-v14 .cp-v143-group-links a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:42px;
    padding:8px 0;
    color:var(--cp14-green);
    border-bottom:1px solid var(--cp14-line);
    font-size:13px;
    font-weight:650;
    line-height:1.25;
    text-decoration:none;
}

body.cp-shop-v14 .cp-v143-group-links a:hover,
body.cp-shop-v14 .cp-v143-group-links a:focus{
    color:var(--cp14-green-mid);
}

/* Category page context: compact by default */
body.cp-shop-v14 .cp-v143-category-context{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:28px;
    margin:22px 0 24px;
    padding-bottom:16px;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v143-back-shop{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--cp14-green);
    font-size:14px;
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
}

body.cp-shop-v14 .cp-v143-browser-compact{
    flex:0 1 280px;
    margin:0;
    border:0;
}

body.cp-shop-v14 .cp-v143-browser-compact > summary{
    min-height:42px;
    padding:0 12px;
    border:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v143-browser-compact[open]{
    flex-basis:100%;
}

body.cp-shop-v14 .cp-v143-browser-compact[open] > summary{
    margin-left:auto;
    width:280px;
}

body.cp-shop-v14 .cp-v143-all-groups-compact{
    margin-top:12px;
    padding:22px;
    background:var(--cp14-soft);
}

/* Result tools stay compact so products follow immediately. */
body.cp-shop-v14 .woocommerce-result-count{
    margin-top:0 !important;
}

body.cp-shop-v14 .woocommerce-ordering{
    margin-top:0 !important;
}

/* Tablet */
@media(max-width:1099px){
    body.cp-shop-v14 .cp-v143-shortcuts{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    body.cp-shop-v14 .cp-v143-all-groups{
        grid-template-columns:1fr 1fr;
    }
}

/* Mobile */
@media(max-width:767px){
    body.cp-shop-v14 .cp-shop-hero-main{
        padding:48px 22px 32px;
    }

    body.cp-shop-v14 .cp-shop-hero-term{
        padding:40px 22px 26px;
    }

    body.cp-shop-v14 .cp-shop-hero-term h1{
        font-size:44px;
    }

    body.cp-shop-v14 .cp-v143-discovery{
        margin:26px 18px 26px;
    }

    body.cp-shop-v14 .cp-v143-discovery-head{
        margin-bottom:14px;
    }

    body.cp-shop-v14 .cp-v143-discovery h2{
        font-size:28px;
    }

    body.cp-shop-v14 .cp-v143-shortcuts{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:7px;
    }

    body.cp-shop-v14 .cp-v143-shortcut{
        min-height:56px;
        padding:11px 12px;
        font-size:12px;
    }

    body.cp-shop-v14 .cp-v143-browser > summary{
        min-height:50px;
        font-size:13px;
    }

    body.cp-shop-v14 .cp-v143-all-groups{
        grid-template-columns:1fr;
        gap:24px;
        padding-bottom:24px;
    }

    body.cp-shop-v14 .cp-v143-group-links,
    body.cp-shop-v14 .cp-v143-group:nth-child(n+2) .cp-v143-group-links{
        grid-template-columns:1fr;
    }

    body.cp-shop-v14 .cp-v143-category-context{
        display:grid;
        grid-template-columns:1fr;
        gap:12px;
        margin:18px 18px 20px;
        padding-bottom:14px;
    }

    body.cp-shop-v14 .cp-v143-browser-compact{
        width:100%;
        max-width:none;
    }

    body.cp-shop-v14 .cp-v143-browser-compact > summary,
    body.cp-shop-v14 .cp-v143-browser-compact[open] > summary{
        width:100%;
        min-height:46px;
        margin:0;
    }

    body.cp-shop-v14 .cp-v143-all-groups-compact{
        margin-top:8px;
        padding:18px 14px;
    }
}


/* =========================================================
   V14.4: CURATED FRONT-END TAXONOMY
   ========================================================= */

/* V14.3 category discovery is no longer rendered. */

body.cp-shop-v14 .cp-v144-nav{
    margin:30px 0 30px;
}

body.cp-shop-v14 .cp-v144-nav-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:16px;
}

body.cp-shop-v14 .cp-v144-nav h2{
    margin:0;
    color:var(--cp14-green);
    font-family:Georgia,"Times New Roman",serif;
    font-size:31px;
    line-height:1.08;
    font-weight:400;
    letter-spacing:-.018em;
}

body.cp-shop-v14 .cp-v144-clear{
    color:var(--cp14-green);
    font-size:13px;
    font-weight:800;
    text-decoration:none;
    border-bottom:1px solid var(--cp14-green);
}

body.cp-shop-v14 .cp-v144-pills{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:8px;
}

body.cp-shop-v14 .cp-v144-pill{
    display:flex;
    align-items:center;
    min-height:58px;
    padding:13px 15px;
    color:var(--cp14-green);
    background:#fff;
    border:1px solid var(--cp14-line);
    font-size:13px;
    font-weight:760;
    line-height:1.25;
    text-decoration:none;
    transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}

body.cp-shop-v14 .cp-v144-pill:hover,
body.cp-shop-v14 .cp-v144-pill:focus,
body.cp-shop-v14 .cp-v144-pill.is-current{
    color:#fff;
    background:var(--cp14-green);
    border-color:var(--cp14-green);
}

body.cp-shop-v14 .cp-v144-native-category-nav{
    margin:20px 0 22px;
    padding-bottom:14px;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v144-native-category-nav a{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--cp14-green);
    font-size:14px;
    font-weight:800;
    text-decoration:none;
}

body.cp-shop-v14 .cp-shop-hero-collection{
    padding-bottom:28px;
}

body.cp-shop-v14 .cp-shop-hero-collection p{
    max-width:560px;
}

/* Keep controls close to product grid. */
body.cp-shop-v14 .woocommerce-result-count,
body.cp-shop-v14 .woocommerce-ordering{
    margin-bottom:18px !important;
}

/* Tablet */
@media(max-width:1099px){
    body.cp-shop-v14 .cp-v144-pills{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

/* Mobile */
@media(max-width:767px){
    body.cp-shop-v14 .cp-v144-nav{
        margin:24px 18px 26px;
    }

    body.cp-shop-v14 .cp-v144-nav-head{
        display:block;
        margin-bottom:14px;
    }

    body.cp-shop-v14 .cp-v144-nav h2{
        font-size:28px;
    }

    body.cp-shop-v14 .cp-v144-clear{
        display:inline-block;
        margin-top:12px;
    }

    body.cp-shop-v14 .cp-v144-pills{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:7px;
    }

    body.cp-shop-v14 .cp-v144-pill{
        min-height:54px;
        padding:11px 12px;
        font-size:12px;
    }

    body.cp-shop-v14 .cp-v144-native-category-nav{
        margin:16px 18px 18px;
    }
}

@media(max-width:380px){
    body.cp-shop-v14 .cp-v144-pills{
        grid-template-columns:1fr;
    }
}


/* =========================================================
   V15 CATEGORY-FIRST SHOP
   ========================================================= */

body.cp-shop-v14 .cp-v144-nav,
body.cp-shop-v14 .cp-v143-discovery,
body.cp-shop-v14 .cp-v143-category-context{
    display:none !important;
}

body.cp-shop-v14 .cp-v15-discovery{
    margin:34px 0 46px;
    padding:34px 0 38px;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v15-discovery-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:28px;
    margin-bottom:22px;
}

body.cp-shop-v14 .cp-v15-discovery h2,
body.cp-shop-v14 .cp-v15-results-head h2{
    margin:0;
    color:var(--cp14-green);
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(31px,3vw,46px);
    line-height:1.03;
    font-weight:400;
    letter-spacing:-.025em;
}

body.cp-shop-v14 .cp-v15-all-link{
    display:inline-flex;
    align-items:center;
    min-height:42px;
    color:var(--cp14-green);
    font-size:13px;
    font-weight:800;
    text-decoration:none;
    border-bottom:1px solid transparent;
}

body.cp-shop-v14 .cp-v15-all-link:hover,
body.cp-shop-v14 .cp-v15-all-link:focus,
body.cp-shop-v14 .cp-v15-all-link.is-current{
    border-bottom-color:var(--cp14-green);
}

body.cp-shop-v14 .cp-v15-category-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    border-top:1px solid var(--cp14-line);
    border-left:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v15-category{
    min-height:74px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:18px 18px;
    color:var(--cp14-green);
    background:#fff;
    border-right:1px solid var(--cp14-line);
    border-bottom:1px solid var(--cp14-line);
    font-size:13px;
    font-weight:800;
    line-height:1.3;
    text-decoration:none;
    transition:background-color .18s ease,color .18s ease;
}

body.cp-shop-v14 .cp-v15-category span:last-child{
    flex:0 0 auto;
    font-size:18px;
    font-weight:400;
}

body.cp-shop-v14 .cp-v15-category:hover,
body.cp-shop-v14 .cp-v15-category:focus{
    color:#fff;
    background:var(--cp14-green);
}

body.cp-shop-v14 .cp-v15-compact-nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin:26px 0 18px;
    padding:0 0 18px;
    border-bottom:1px solid var(--cp14-line);
}

body.cp-shop-v14 .cp-v15-category-picker{
    position:relative;
    width:min(330px,100%);
}

body.cp-shop-v14 .cp-v15-category-picker > summary{
    min-height:46px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:0 14px;
    color:var(--cp14-green);
    background:#fff;
    border:1px solid var(--cp14-line);
    list-style:none;
    cursor:pointer;
    font-size:13px;
    font-weight:800;
}

body.cp-shop-v14 .cp-v15-category-picker > summary::-webkit-details-marker{
    display:none;
}

body.cp-shop-v14 .cp-v15-category-picker[open] > summary span:last-child{
    transform:rotate(45deg);
}

body.cp-shop-v14 .cp-v15-category-picker-grid{
    position:absolute;
    top:calc(100% + 7px);
    left:0;
    z-index:30;
    width:min(640px,calc(100vw - 48px));
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0;
    padding:10px;
    background:#fff;
    border:1px solid var(--cp14-line);
    box-shadow:0 18px 50px rgba(23,61,45,.12);
}

body.cp-shop-v14 .cp-v15-category-picker-grid a{
    padding:12px 13px;
    color:var(--cp14-green);
    border-bottom:1px solid var(--cp14-line);
    font-size:12px;
    font-weight:700;
    line-height:1.3;
    text-decoration:none;
}

body.cp-shop-v14 .cp-v15-category-picker-grid a:hover,
body.cp-shop-v14 .cp-v15-category-picker-grid a:focus,
body.cp-shop-v14 .cp-v15-category-picker-grid a.is-current{
    background:var(--cp14-soft);
}

body.cp-shop-v14 .cp-v15-results-head{
    clear:both;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    margin:34px 0 24px;
    scroll-margin-top:178px;
}

body.cp-shop-v14 .cp-v15-results-head .cp-shop-eyebrow{
    margin-bottom:10px;
}

body.cp-shop-v14 .cp-v15-results-head p{
    margin:9px 0 0;
    color:var(--cp14-muted);
    font-size:14px;
    line-height:1.5;
}

body.cp-shop-v14 .cp-v15-results-landing{
    margin-top:8px;
}

body.cp-shop-v14 .cp-v15-results-landing + ul.products{
    margin-top:0 !important;
}

body.cp-shop-v14 .cp-v15-all-products-cta{
    margin:44px 0 10px;
    text-align:center;
}

body.cp-shop-v14 .cp-v15-all-products-cta a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    min-height:52px;
    padding:0 25px;
    color:#fff;
    background:var(--cp14-green);
    font-size:14px;
    font-weight:800;
    text-decoration:none;
}

/* Result count is replaced by the clearer V15 section heading. */
body.cp-shop-v14 .woocommerce-result-count{
    display:none !important;
}

/* On filtered/all views, sorting sits directly above the product grid. */
body.cp-shop-v14 .woocommerce-ordering{
    float:none !important;
    display:flex;
    justify-content:flex-end;
    margin:-66px 0 22px auto !important;
}

body.cp-shop-v14 .cp-v15-results-landing ~ .woocommerce-ordering{
    display:none !important;
}

@media(max-width:1099px){
    body.cp-shop-v14 .cp-v15-category-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:767px){
    body.cp-shop-v14 .cp-shop-hero-main{
        padding:36px 18px 24px;
    }

    body.cp-shop-v14 .cp-shop-hero-main h1{
        font-size:38px;
        line-height:1.02;
    }

    body.cp-shop-v14 .cp-shop-hero-main p{
        margin-top:16px;
        font-size:16px;
        line-height:1.5;
    }

    body.cp-shop-v14 .cp-v15-discovery{
        margin:18px 18px 32px;
        padding:18px 0 26px;
    }

    body.cp-shop-v14 .cp-v15-discovery-head{
        display:block;
        margin-bottom:16px;
    }

    body.cp-shop-v14 .cp-v15-discovery h2,
    body.cp-shop-v14 .cp-v15-results-head h2{
        font-size:32px;
    }

    body.cp-shop-v14 .cp-v15-all-link{
        min-height:0;
        margin-top:12px;
    }

    body.cp-shop-v14 .cp-v15-category-grid{
        grid-template-columns:1fr 1fr;
    }

    body.cp-shop-v14 .cp-v15-category{
        min-height:68px;
        padding:14px 12px;
        font-size:12px;
    }

    body.cp-shop-v14 .cp-v15-compact-nav{
        margin:16px 18px 10px;
        padding-bottom:12px;
    }

    body.cp-shop-v14 .cp-v15-category-picker{
        width:auto;
        flex:1 1 auto;
        min-width:0;
    }

    body.cp-shop-v14 .cp-v15-category-picker-grid{
        width:calc(100vw - 36px);
        grid-template-columns:1fr 1fr;
    }

    body.cp-shop-v14 .cp-v15-results-head{
        margin:26px 18px 20px;
        scroll-margin-top:150px;
    }

    body.cp-shop-v14 .cp-v15-results-head p{
        font-size:13px;
    }

    body.cp-shop-v14 .woocommerce-ordering{
        width:calc(100% - 36px);
        margin:0 18px 22px !important;
        justify-content:flex-start;
    }

    body.cp-shop-v14 .woocommerce-ordering select{
        width:100%;
        min-width:0;
    }

    body.cp-shop-v14 .cp-v15-all-products-cta{
        margin:34px 18px 4px;
    }

    body.cp-shop-v14 .cp-v15-all-products-cta a{
        width:100%;
    }
}

@media(max-width:390px){
    body.cp-shop-v14 .cp-v15-category-grid,
    body.cp-shop-v14 .cp-v15-category-picker-grid{
        grid-template-columns:1fr;
    }
}


/* =========================================================
   V15.1 PRODUCT CARD POLISH
   ========================================================= */

body.cp-shop-v14 .cp-v14-card-title{
    color:#173d2d !important;
}

body.cp-shop-v14 .cp-v14-card-price,
body.cp-shop-v14 .cp-v14-card-price .woocommerce-Price-amount,
body.cp-shop-v14 .cp-v14-card-price bdi{
    color:#8a7650 !important;
    font-weight:650 !important;
}

body.cp-shop-v14 li.cp-v14-product-card .cp-v14-product-cta{
    color:#2d5d45 !important;
    font-size:12px !important;
    letter-spacing:.055em;
    text-transform:uppercase;
}

@media(max-width:767px){
    body.cp-shop-v14 .cp-v14-card-title{
        min-height:0 !important;
        -webkit-line-clamp:4 !important;
        font-size:16px !important;
        line-height:1.16 !important;
    }

    body.cp-shop-v14 .cp-v14-card-price{
        margin-top:2px !important;
    }
}


/* =========================================================
   V15.2: MOBILE CARD HIERARCHY
   ========================================================= */

@media(max-width:767px){
    body.cp-shop-v14 .cp-v14-card-title{
        -webkit-line-clamp:4 !important;
        min-height:0 !important;
        font-size:15px !important;
        line-height:1.15 !important;
    }

    body.cp-shop-v14 .cp-v14-card-price{
        display:inline-flex !important;
        align-items:center;
        width:max-content;
        max-width:100%;
        min-height:0 !important;
        margin:7px 0 12px !important;
        padding:7px 9px !important;
        background:#173d2d !important;
        color:#d8bd7a !important;
        font-size:14px !important;
        line-height:1.1 !important;
    }

    body.cp-shop-v14 .cp-v14-card-price *,
    body.cp-shop-v14 .cp-v14-card-price .woocommerce-Price-amount,
    body.cp-shop-v14 .cp-v14-card-price bdi,
    body.cp-shop-v14 .cp-v14-card-price .woocommerce-Price-currencySymbol{
        color:#d8bd7a !important;
    }
}


/* =========================================================
   V15.2.1 PRICE BADGE FIX
   Shop/category product cards, desktop + tablet + mobile
   ========================================================= */

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-height:0 !important;
    margin:8px 0 13px !important;
    padding:8px 11px !important;
    background:#173d2d !important;
    color:#d8bd7a !important;
    border:1px solid rgba(183,154,88,.34) !important;
    border-radius:0 !important;
    font-size:14px !important;
    line-height:1.05 !important;
    font-weight:700 !important;
}

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;
}

body.cp-shop-v14 ul.products li.product .cp-v14-card-price del{
    opacity:.6 !important;
    margin-right:6px !important;
}

body.cp-shop-v14 ul.products li.product .cp-v14-card-price ins{
    background:transparent !important;
    text-decoration:none !important;
}
