/* =========================================================
   JRABAWY CORE v1.5.0 — CART RESPONSIVE HARDENING
   Designed to sit on top of the existing Jrabawy Cart Enhancer.
========================================================= */

body.woocommerce-cart{
    overflow-x:hidden!important;
}

body.woocommerce-cart .jr-cart-chrome,
body.woocommerce-cart .jr-cart-header,
body.woocommerce-cart .jr-cart-hero,
body.woocommerce-cart .jr-cart-trust,
body.woocommerce-cart .jr-cart-native-root,
body.woocommerce-cart .jr-cart-footer,
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wc-block-cart,
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
}

body.woocommerce-cart .jr-cart-container,
body.woocommerce-cart .jr-cart-native-root{
    margin-inline:auto!important;
}

/* Logo protection, same strategy as Checkout / Thank You. */
body.woocommerce-cart .jr-cart-logo{
    min-width:0!important;
    max-width:190px!important;
    overflow:hidden!important;
    line-height:0!important;
}

body.woocommerce-cart .jr-cart-logo img{
    width:auto!important;
    height:44px!important;
    max-width:180px!important;
    max-height:44px!important;
    object-fit:contain!important;
}

/* Tablet and below: never keep a two-column cart. */
@media (max-width:900px){
    body.woocommerce-cart .jr-cart-native-root .wc-block-cart,
    body.woocommerce-cart .wc-block-cart{
        display:grid!important;
        grid-template-columns:minmax(0,1fr)!important;
        width:100%!important;
        gap:16px!important;
    }

    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wc-block-cart__sidebar{
        width:100%!important;
        position:static!important;
        inset:auto!important;
    }
}

@media (max-width:767px){

    .jr-cart-container,
    body.woocommerce-cart .jr-cart-native-root{
        width:calc(100% - 20px)!important;
        max-width:calc(100% - 20px)!important;
    }

    /* Header */
    body.woocommerce-cart .jr-cart-header{
        height:62px!important;
    }

    body.admin-bar.woocommerce-cart .jr-cart-header{
        top:46px!important;
    }

    body.woocommerce-cart .jr-cart-logo{
        max-width:145px!important;
    }

    body.woocommerce-cart .jr-cart-logo img{
        height:35px!important;
        max-height:35px!important;
        max-width:140px!important;
    }

    body.woocommerce-cart .jr-cart-menu-button{
        width:44px!important;
        height:44px!important;
        min-height:44px!important;
    }

    /* Hero */
    body.woocommerce-cart .jr-cart-hero{
        width:100%!important;
        overflow:hidden!important;
    }

    body.woocommerce-cart .jr-cart-breadcrumb{
        padding-top:18px!important;
        font-size:11px!important;
    }

    body.woocommerce-cart .jr-cart-hero__layout{
        width:100%!important;
        min-height:0!important;
        padding:35px 0 52px!important;
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:20px!important;
    }

    body.woocommerce-cart .jr-cart-hero__copy{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    body.woocommerce-cart .jr-cart-eyebrow{
        font-size:11px!important;
        letter-spacing:1.6px!important;
    }

    body.woocommerce-cart .jr-cart-hero h1{
        max-width:100%!important;
        margin:0!important;
        font-size:clamp(34px,10vw,44px)!important;
        line-height:1.25!important;
        letter-spacing:-.5px!important;
        overflow-wrap:anywhere;
    }

    body.woocommerce-cart .jr-cart-hero__copy p{
        width:100%!important;
        max-width:100%!important;
        margin-top:12px!important;
        font-size:14px!important;
        line-height:1.8!important;
    }

    body.woocommerce-cart .jr-cart-hero__count-card{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        padding:14px!important;
    }

    body.woocommerce-cart .jr-cart-hero__count-card strong{
        font-size:19px!important;
    }

    body.woocommerce-cart .jr-cart-hero__count-card span{
        font-size:12px!important;
    }

    /* Trust cards */
    body.woocommerce-cart .jr-cart-trust{
        width:100%!important;
        margin-top:-20px!important;
    }

    body.woocommerce-cart .jr-cart-trust__grid{
        width:100%!important;
        grid-template-columns:1fr!important;
        padding:5px 11px!important;
    }

    body.woocommerce-cart .jr-cart-trust__item{
        min-width:0!important;
        padding:12px 4px!important;
    }

    body.woocommerce-cart .jr-cart-trust__item strong{
        font-size:13px!important;
    }

    body.woocommerce-cart .jr-cart-trust__item span{
        font-size:11px!important;
        line-height:1.55!important;
    }

    /* Native Woo Cart area */
    body.woocommerce-cart .jr-cart-native-root{
        margin:36px auto 55px!important;
        overflow:visible!important;
    }

    body.woocommerce-cart .jr-cart-native-root .wp-block-woocommerce-cart,
    body.woocommerce-cart .jr-cart-native-root .wc-block-cart{
        width:100%!important;
        max-width:100%!important;
        overflow:visible!important;
    }

    body.woocommerce-cart .wc-block-cart__main{
        min-width:0!important;
        overflow:visible!important;
    }

    /* Rebuild the WooCommerce Cart Block table rows as mobile cards.
       This removes the fixed table columns that caused the screenshot clipping. */
    body.woocommerce-cart table.wc-block-cart-items,
    body.woocommerce-cart .wc-block-cart-items{
        width:100%!important;
        max-width:100%!important;
        display:block!important;
        table-layout:auto!important;
        border-collapse:separate!important;
        overflow:visible!important;
    }

    body.woocommerce-cart .wc-block-cart-items thead{
        display:none!important;
    }

    body.woocommerce-cart .wc-block-cart-items tbody{
        width:100%!important;
        display:grid!important;
        gap:12px!important;
    }

    body.woocommerce-cart .wc-block-cart-items__row{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        display:grid!important;
        grid-template-columns:82px minmax(0,1fr)!important;
        grid-template-rows:auto auto!important;
        column-gap:12px!important;
        row-gap:5px!important;
        padding:13px!important;
        border:1px solid rgba(53,9,144,.09)!important;
        border-radius:17px!important;
        background:#fff!important;
        box-shadow:0 9px 30px rgba(38,7,102,.045)!important;
        overflow:hidden!important;
    }

    body.woocommerce-cart .wc-block-cart-items__row td{
        width:auto!important;
        min-width:0!important;
        max-width:100%!important;
        padding:0!important;
        border:0!important;
        display:block!important;
        box-sizing:border-box!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image{
        grid-column:1!important;
        grid-row:1 / span 2!important;
        width:82px!important;
        max-width:82px!important;
        align-self:start!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image a{
        display:block!important;
        width:100%!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image img{
        display:block!important;
        width:82px!important;
        height:104px!important;
        max-width:82px!important;
        object-fit:cover!important;
        border-radius:13px!important;
    }

    body.woocommerce-cart .wc-block-cart-item__product{
        grid-column:2!important;
        grid-row:1!important;
        width:100%!important;
        min-width:0!important;
        padding:0!important;
    }

    body.woocommerce-cart .wc-block-cart-item__total{
        grid-column:2!important;
        grid-row:2!important;
        width:100%!important;
        min-width:0!important;
        padding:3px 0 0!important;
        text-align:right!important;
        align-self:end!important;
    }

    body.woocommerce-cart .wc-block-components-product-name{
        display:block!important;
        width:100%!important;
        max-width:100%!important;
        margin:0 0 7px!important;
        font-size:15px!important;
        line-height:1.45!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
    }

    body.woocommerce-cart .wc-block-components-product-metadata{
        width:100%!important;
        margin:0!important;
        font-size:11.5px!important;
        line-height:1.6!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
    }

    body.woocommerce-cart .wc-block-components-product-metadata__description,
    body.woocommerce-cart .wc-block-components-product-details{
        white-space:normal!important;
        overflow-wrap:anywhere!important;
    }

    body.woocommerce-cart .wc-block-components-product-price,
    body.woocommerce-cart .wc-block-components-product-price__value,
    body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper{
        font-size:14px!important;
        line-height:1.4!important;
    }

    body.woocommerce-cart .wc-block-components-quantity-selector{
        width:116px!important;
        min-width:0!important;
        max-width:100%!important;
        height:40px!important;
        margin-top:9px!important;
    }

    body.woocommerce-cart .wc-block-components-quantity-selector input{
        min-width:38px!important;
        font-size:13px!important;
    }

    body.woocommerce-cart .wc-block-cart-item__remove-link{
        margin-top:8px!important;
        font-size:12px!important;
    }

    /* Sidebar / totals */
    body.woocommerce-cart .wc-block-cart__sidebar{
        width:100%!important;
        min-width:0!important;
        margin:0!important;
        padding:15px!important;
        border-radius:17px!important;
        position:static!important;
    }

    body.woocommerce-cart .wc-block-cart__totals-title{
        font-size:19px!important;
    }

    body.woocommerce-cart .wc-block-components-totals-item{
        font-size:13px!important;
    }

    body.woocommerce-cart .wc-block-components-totals-item__label,
    body.woocommerce-cart .wc-block-components-totals-item__value{
        font-size:13px!important;
    }

    body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label{
        font-size:15px!important;
    }

    body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value{
        font-size:18px!important;
    }

    body.woocommerce-cart .wc-block-components-panel__button,
    body.woocommerce-cart .wc-block-components-radio-control__label{
        font-size:12px!important;
    }

    body.woocommerce-cart .wc-block-cart__submit-button{
        min-height:52px!important;
        width:100%!important;
        font-size:14px!important;
    }

    /* BOGO inside cart */
    body.woocommerce-cart .jr-bogo-banner{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        overflow:hidden!important;
    }

    body.woocommerce-cart .jr-bogo-banner__content{
        min-width:0!important;
    }

    body.woocommerce-cart .jr-bogo-banner strong{
        font-size:13px!important;
        line-height:1.5!important;
    }

    body.woocommerce-cart .jr-bogo-banner p{
        font-size:11.5px!important;
        line-height:1.65!important;
    }

    /* Footer */
    body.woocommerce-cart .jr-cart-footer__grid{
        grid-template-columns:1fr!important;
        gap:28px!important;
    }

    body.woocommerce-cart .jr-cart-footer__brand,
    body.woocommerce-cart .jr-cart-footer__column{
        min-width:0!important;
        grid-column:auto!important;
    }

    body.woocommerce-cart .jr-cart-footer__brand p,
    body.woocommerce-cart .jr-cart-footer__column a{
        font-size:13px!important;
        line-height:1.75!important;
    }

    body.woocommerce-cart .jr-cart-footer__column h3{
        font-size:16px!important;
    }

    body.woocommerce-cart .jr-cart-footer__bottom{
        flex-direction:column!important;
        align-items:flex-start!important;
        font-size:11px!important;
    }
}

@media (max-width:420px){
    .jr-cart-container,
    body.woocommerce-cart .jr-cart-native-root{
        width:calc(100% - 16px)!important;
        max-width:calc(100% - 16px)!important;
    }

    body.woocommerce-cart .wc-block-cart-items__row{
        grid-template-columns:72px minmax(0,1fr)!important;
        column-gap:10px!important;
        padding:11px!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image{
        width:72px!important;
        max-width:72px!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image img{
        width:72px!important;
        max-width:72px!important;
        height:92px!important;
    }

    body.woocommerce-cart .wc-block-components-product-name{
        font-size:14px!important;
    }

    body.woocommerce-cart .wc-block-components-product-metadata{
        font-size:11px!important;
    }
}

@media (max-width:360px){
    .jr-cart-container,
    body.woocommerce-cart .jr-cart-native-root{
        width:calc(100% - 12px)!important;
        max-width:calc(100% - 12px)!important;
    }

    body.woocommerce-cart .wc-block-cart-items__row{
        grid-template-columns:64px minmax(0,1fr)!important;
        padding:10px 9px!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image{
        width:64px!important;
        max-width:64px!important;
    }

    body.woocommerce-cart .wc-block-cart-item__image img{
        width:64px!important;
        max-width:64px!important;
        height:84px!important;
    }

    body.woocommerce-cart .wc-block-components-quantity-selector{
        width:108px!important;
    }
}
