body.single-product #primary{
    width:100%;
    background:#f4f7f4;
}

body.single-product #primary .site-main{
    width:min(1180px,100%);
    margin:0 auto;
    padding-right:24px;
    padding-bottom:72px;
    padding-left:24px;
}

body.single-product div.product{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(320px,.9fr);
    gap:42px;
    width:100%;
}

body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product .summary{
    float:none!important;
    width:100%!important;
    margin:0!important;
}

body.single-product div.product .woocommerce-product-gallery{
    grid-column:1;
    position:relative;
}
.cosvin-single-product-tools{position:absolute;z-index:8;top:14px;right:14px;display:grid;gap:9px}.cosvin-single-tool{display:grid;width:44px;height:44px;place-items:center;border:1px solid #d7e3d9;border-radius:50%;background:#fff;color:#173226;box-shadow:0 5px 15px rgba(0,0,0,.14);cursor:pointer}.cosvin-single-tool.is-active{background:#e8f7ee;color:#078c49}

body.single-product div.product .summary{
    grid-column:2;
}

body.single-product div.product .woocommerce-tabs,
body.single-product div.product .related,
body.single-product div.product .upsells{
    grid-column:1/-1;
}

/* This conversion story is a direct grid child. It must span both product
   columns instead of collapsing into the gallery column. */
body.single-product div.product > .cosvin-product-story{
    grid-column:1/-1;
    width:100%;
    margin:10px 0 6px;
}

body.single-product div.product .woocommerce-tabs{
    margin-top:10px;
    overflow:hidden;
    border:1px solid #dfe9e2;
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 32px rgba(16,54,31,.07);
}

body.single-product div.product .woocommerce-tabs ul.tabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:0!important;
    padding:14px 18px 0!important;
    border:0!important;
    background:#f4f8f5;
}

body.single-product div.product .woocommerce-tabs ul.tabs::before,
body.single-product div.product .woocommerce-tabs ul.tabs::after{
    display:none!important;
    content:none!important;
}

body.single-product div.product .woocommerce-tabs ul.tabs li{
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:999px!important;
    background:transparent!important;
}

body.single-product div.product .woocommerce-tabs ul.tabs li a{
    display:block;
    padding:9px 14px!important;
    border-radius:999px;
    color:#34513e!important;
    font-size:13px;
    font-weight:800!important;
    text-decoration:none;
}

body.single-product div.product .woocommerce-tabs ul.tabs li.active a{
    background:#087f43;
    color:#fff!important;
}

body.single-product div.product .woocommerce-tabs .panel{
    margin:0!important;
    padding:22px 24px 26px;
    color:#35493a;
    font-size:15px;
    line-height:1.7;
}

body.single-product div.product .woocommerce-tabs .panel > :first-child{margin-top:0;}
body.single-product div.product .woocommerce-tabs .panel > :last-child{margin-bottom:0;}

body.single-product .related.products{
    margin-top:18px;
    padding:26px;
    border:1px solid #dfe9e2;
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 32px rgba(16,54,31,.08);
}

body.single-product .related.products>h2{
    margin:0 0 20px;
    color:#17251c;
    font-size:26px;
    font-weight:800;
}

body.single-product .related.products ul.products{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
    margin:0!important;
}

body.single-product .related.products ul.products::before,
body.single-product .related.products ul.products::after{display:none!important;content:none!important;}

body.single-product .related.products ul.products li.product{
    position:relative;
    float:none!important;
    width:auto!important;
    margin:0!important;
    padding:12px 12px 14px;
    border:1px solid #e3ebe5;
    border-radius:16px;
    background:#fff;
    box-shadow:0 6px 18px rgba(16,54,31,.06);
    transition:transform .2s ease,box-shadow .2s ease;
}

body.single-product .related.products ul.products li.product:hover{
    transform:translateY(-3px);
    box-shadow:0 12px 25px rgba(16,54,31,.12);
}

body.single-product .related.products ul.products li.product img{
    width:100%;
    height:190px;
    margin:0 0 12px!important;
    border-radius:12px;
    background:#f5f7f5;
    object-fit:contain;
}

body.single-product .related.products .woocommerce-loop-product__title{
    min-height:48px;
    margin:0!important;
    padding:0!important;
    color:#17251c;
    font-size:15px!important;
    line-height:1.35;
    font-weight:750;
}

body.single-product .related.products .price{
    display:block!important;
    margin:9px 0 12px!important;
    color:#078c49!important;
    font-size:15px!important;
    font-weight:800!important;
}

body.single-product .related.products .button{
    width:100%;
    margin:0!important;
    border-radius:9px!important;
    background:#079b50!important;
    color:#fff!important;
    text-align:center;
    font-size:13px!important;
    font-weight:800!important;
}

body.single-product .related.products li.product .button + .button{
    margin-top:7px!important;
}

body.single-product .related.products .button.cosvin-loop-buy-now{
    border:1px solid #0c3a21!important;
    background:#092619!important;
    color:#fff!important;
}

body.single-product .related.products .button.cosvin-loop-buy-now:hover,
body.single-product .related.products .button.cosvin-loop-buy-now:focus-visible{
    background:#0f3b26!important;
}

.cosvin-product-share{
    display:flex;
    flex-wrap:wrap;
    gap:10px 14px;
    align-items:center;
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid #dfe9e2;
}

.cosvin-product-share__label{
    color:#31513d;
    font-size:14px;
    font-weight:800;
}

.cosvin-product-share__label i{ color:#08a653; }

.cosvin-product-share__actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.cosvin-product-share__button{
    display:inline-flex;
    gap:6px;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:7px 11px;
    border:1px solid #cfe2d5;
    border-radius:999px;
    background:#fff;
    color:#1d3828;
    font-size:13px;
    font-weight:750;
    line-height:1;
    transition:background .2s ease,border-color .2s ease,transform .2s ease;
}

.cosvin-product-share__button:hover{
    border-color:#079b50;
    background:#edfff4;
    color:#04743a;
    transform:translateY(-1px);
}

.cosvin-related-wishlist{
    position:absolute;
    top:20px;
    right:20px;
    z-index:4;
    display:flex;
    width:36px;
    height:36px;
    align-items:center;
    justify-content:center;
    border:1px solid #dfe7e1;
    border-radius:50%;
    background:#fff;
    color:#263a2d;
    cursor:pointer;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
}

.cosvin-related-tools{position:absolute;top:14px;right:14px;z-index:4;display:grid;gap:8px}.cosvin-related-tools .cosvin-related-wishlist,.cosvin-related-share{position:static;display:grid;width:36px;height:36px;place-items:center;border:1px solid #dfe7e1;border-radius:50%;background:#fff;color:#263a2d;cursor:pointer;box-shadow:0 5px 15px rgba(0,0,0,.12)}

.cosvin-related-wishlist.is-active{
    border-color:#ffccd2;
    color:#e32944;
}

@media(max-width:768px){
    body.single-product #primary{
        display:block!important;
        min-height:100vh;
    }

    body.single-product #primary .site-main{
        display:block!important;
        overflow:visible;
        padding-right:14px;
        padding-bottom:54px;
        padding-left:14px;
    }

    body.single-product div.product{
        display:flex!important;
        flex-direction:column;
        gap:22px;
        clear:both;
    }

    body.single-product div.product .woocommerce-product-gallery,
    body.single-product div.product .summary{
        position:relative!important;
        display:block!important;
        visibility:visible!important;
        opacity:1!important;
    }

    body.single-product div.product .woocommerce-product-gallery{
        order:1;
    }

    body.single-product div.product .summary{
        order:2;
        padding:18px;
        border:1px solid #e1e9e3;
        border-radius:16px;
        background:#fff;
        color:#17251c;
        box-shadow:0 8px 24px rgba(16,54,31,.08);
    }

    body.single-product div.product .woocommerce-tabs,
    body.single-product div.product .related,
    body.single-product div.product .upsells{
        grid-column:1;
    }

    body.single-product div.product .woocommerce-tabs{
        order:4;
    }

    body.single-product div.product > .cosvin-product-story{
        order:3;
        width:100%;
        margin:0;
    }

    body.single-product div.product .upsells{
        order:5;
    }

    body.single-product div.product .related{
        order:6;
    }

    body.single-product div.product .woocommerce-product-gallery img{
        display:block!important;
        width:100%;
        height:auto;
    }

    body.single-product .related.products{
        padding:16px 10px;
        border-radius:16px;
    }

    body.single-product .related.products>h2{
        margin-bottom:14px;
        font-size:22px;
    }

    body.single-product .related.products ul.products{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }

    body.single-product .related.products ul.products li.product{
        padding:8px 8px 11px;
        border-radius:13px;
    }

    body.single-product .related.products ul.products li.product img{
        height:135px;
        margin-bottom:9px!important;
    }

    body.single-product .related.products .woocommerce-loop-product__title{
        min-height:54px;
        font-size:13px!important;
    }

    body.single-product .related.products .price{
        font-size:13px!important;
    }

    body.single-product .related.products .button{
        min-height:36px;
        padding:7px 5px!important;
        font-size:11px!important;
        line-height:1.15;
        white-space:normal;
    }

    .cosvin-related-wishlist{
        top:14px;
        right:14px;
        width:32px;
        height:32px;
    }

    .cosvin-product-share{
        align-items:flex-start;
        margin-top:18px;
    }

    .cosvin-product-share__actions{ width:100%; }

    .cosvin-product-share__button{ flex:1 1 calc(50% - 4px); }
}

@media (min-width:769px) and (max-width:1024px){body.single-product .related.products ul.products{grid-template-columns:repeat(3,minmax(0,1fr));}}
