
/* =====================================================
   ITEMSIFY 2.0 — CART & CHECKOUT BLOCKS
   Version 1.0
   WooCommerce Blocks + Kadence Child Theme
===================================================== */

/* 01 — Brand variables */

body.woocommerce-cart,
body.woocommerce-checkout {
    --icc-navy: #172554;
    --icc-purple: #7C3AED;
    --icc-purple-hover: #6D28D9;
    --icc-border: #E7EAF2;
    --icc-muted: #64748B;
    --icc-soft: #F5F3FF;
}

/* 02 — Main page spacing */

body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
    padding-bottom: 65px;
}

body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
}

/* 03 — Page headings */

body.woocommerce-cart .entry-title,
body.woocommerce-checkout .entry-title {
    color: #172554;
    font-weight: 800;
    letter-spacing: -0.8px;
}

/* 04 — Blocks root */

body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-checkout .wp-block-woocommerce-checkout {
    color: #172554;
    font-family: inherit;
}

/* 05 — Cart and checkout sections */

body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wc-block-cart__totals-title,
body.woocommerce-checkout .wc-block-components-checkout-step,
body.woocommerce-checkout .wc-block-components-order-summary {
    color: #172554;
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar,
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
    box-sizing: border-box;
    min-width: 0;
}

/* 06 — Cart items */

body.woocommerce-cart .wc-block-cart-items {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

body.woocommerce-cart .wc-block-cart-items__row {
    border-bottom: 1px solid #E7EAF2;
}

body.woocommerce-cart .wc-block-cart-item__image img {
    border-radius: 12px;
    background: #F8FAFC;
}

body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-components-product-name {
    color: #172554;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.5;
}

body.woocommerce-cart .wc-block-components-product-name:hover,
body.woocommerce-checkout .wc-block-components-product-name:hover {
    color: #7C3AED;
}

body.woocommerce-cart .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper,
body.woocommerce-checkout .wc-block-components-product-price {
    color: #172554;
    font-weight: 700;
}

/* 07 — Quantity controls */

body.woocommerce-cart .wc-block-components-quantity-selector {
    border: 1px solid #E7EAF2;
    border-radius: 10px;
    background: #FFFFFF;
    overflow: hidden;
}

body.woocommerce-cart .wc-block-components-quantity-selector input {
    color: #172554;
    font-weight: 700;
}

body.woocommerce-cart .wc-block-components-quantity-selector button {
    color: #64748B;
}

body.woocommerce-cart .wc-block-components-quantity-selector button:hover {
    color: #7C3AED;
}

/* 08 — Remove item */

body.woocommerce-cart .wc-block-cart-item__remove-link {
    color: #64748B;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.woocommerce-cart .wc-block-cart-item__remove-link:hover {
    color: #B91C1C;
}

/* 09 — Cart totals and order summary */

body.woocommerce-cart .wc-block-cart__sidebar,
body.woocommerce-checkout .wc-block-checkout__sidebar {
    border: 1px solid #E7EAF2;
    border-radius: 18px;
    background: #FFFFFF;
    padding: 24px;
    box-shadow: 0 8px 28px rgba(23, 37, 84, 0.045);
}

body.woocommerce-cart .wc-block-components-totals-wrapper,
body.woocommerce-checkout .wc-block-components-totals-wrapper {
    border-color: #E7EAF2;
}

body.woocommerce-cart .wc-block-components-totals-footer-item,
body.woocommerce-checkout .wc-block-components-totals-footer-item {
    color: #172554;
    font-weight: 800;
}

/* 10 — Coupon input */

body.woocommerce-cart .wc-block-components-totals-coupon,
body.woocommerce-checkout .wc-block-components-totals-coupon {
    margin-top: 10px;
}

/* 11 — Form inputs */

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox input,
body.woocommerce-cart .wc-block-components-text-input input {
    box-sizing: border-box;
    border: 1px solid #DCE2EC;
    border-radius: 10px;
    background: #FFFFFF;
    color: #172554;
    min-height: 48px;
}

body.woocommerce-checkout .wc-block-components-text-input.is-active input,
body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-cart .wc-block-components-text-input input:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.10);
    outline: none;
}

/* 12 — Field labels */

body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label {
    color: #334155;
}

/* 13 — Checkout step headings */

body.woocommerce-checkout .wc-block-components-checkout-step__heading {
    margin-bottom: 18px;
}

body.woocommerce-checkout .wc-block-components-checkout-step__title {
    color: #172554;
    font-size: 20px;
    font-weight: 750;
}

/* 14 — Shipping and payment options */

body.woocommerce-checkout .wc-block-components-radio-control,
body.woocommerce-checkout .wc-block-components-shipping-rates-control {
    border-color: #E7EAF2;
    border-radius: 12px;
}

body.woocommerce-checkout .wc-block-components-radio-control__option {
    border-color: #E7EAF2;
}

body.woocommerce-checkout input[type="radio"],
body.woocommerce-checkout input[type="checkbox"] {
    accent-color: #7C3AED;
}

/* 15 — Primary checkout buttons */

body.woocommerce-cart .wc-block-components-button:not(.is-link),
body.woocommerce-checkout .wc-block-components-button:not(.is-link) {
    border-radius: 11px;
    background: #7C3AED;
    color: #FFFFFF;
    font-weight: 700;
    min-height: 48px;
    transition: background 0.2s ease;
}

body.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
body.woocommerce-checkout .wc-block-components-button:not(.is-link):hover {
    background: #6D28D9;
    color: #FFFFFF;
}

body.woocommerce-cart .wc-block-components-button:focus-visible,
body.woocommerce-checkout .wc-block-components-button:focus-visible {
    outline: 3px solid #C4B5FD;
    outline-offset: 3px;
}

/* 16 — Links */

body.woocommerce-cart .wp-block-woocommerce-cart a,
body.woocommerce-checkout .wp-block-woocommerce-checkout a {
    text-underline-offset: 3px;
}

body.woocommerce-cart .wc-block-components-totals-coupon-link,
body.woocommerce-checkout .wc-block-components-totals-coupon-link {
    color: #7C3AED;
}

/* 17 — Empty cart */

body.woocommerce-cart .wc-block-cart__empty-cart__title {
    color: #172554;
    font-weight: 800;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    padding-top: 25px;
    padding-bottom: 50px;
}

/* 18 — Tablet */

@media (max-width: 1024px) {

    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-checkout .wc-block-checkout__sidebar {
        padding: 20px;
        border-radius: 15px;
    }
}

/* 19 — Mobile */

@media (max-width: 767px) {

    body.woocommerce-cart .site-main,
    body.woocommerce-checkout .site-main {
        padding-bottom: 40px;
    }

    body.woocommerce-cart .entry-title,
    body.woocommerce-checkout .entry-title {
        font-size: 27px;
    }

    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-checkout .wc-block-checkout__sidebar {
        padding: 16px;
        border-radius: 13px;
        box-shadow: none;
    }

    body.woocommerce-cart .wc-block-components-product-name,
    body.woocommerce-checkout .wc-block-components-product-name {
        font-size: 13px;
    }

    body.woocommerce-checkout .wc-block-components-checkout-step__title {
        font-size: 18px;
    }

    body.woocommerce-cart .wc-block-components-button:not(.is-link),
    body.woocommerce-checkout .wc-block-components-button:not(.is-link) {
        min-height: 46px;
        font-size: 13px;
    }
}

/* 20 — Reduced motion */

@media (prefers-reduced-motion: reduce) {

    body.woocommerce-cart .wc-block-components-button,
    body.woocommerce-checkout .wc-block-components-button {
        transition: none;
    }
}

/* ================= END ================= */



/* ===============================================
   ITEMSIFY — MOBILE CART FINAL FIX
   WooCommerce Cart Block
   Desktop and Checkout remain unchanged
=============================================== */

@media (max-width: 767px) {

    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wc-block-cart__sidebar {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* Product table */
    body.woocommerce-cart .wc-block-cart-items,
    body.woocommerce-cart .wc-block-cart-items tbody {
        display: block;
        width: 100%;
        max-width: 100%;
        border: 0;
    }

    body.woocommerce-cart .wc-block-cart-items thead {
        display: none;
    }

    /* Two-column product layout */
    body.woocommerce-cart
    .wc-block-cart-items__row {
        display: grid !important;
        grid-template-columns: 82px minmax(0, 1fr);
        column-gap: 14px;
        align-items: start;
        width: 100%;
        margin: 0;
        padding: 18px 0 24px;
        border-bottom: 1px solid #E7EAF2;
        box-sizing: border-box;
    }

    body.woocommerce-cart
    .wc-block-cart-items__row > td {
        box-sizing: border-box;
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100%;
        padding: 0 !important;
        border: 0;
    }

    /* Product image */
    body.woocommerce-cart
    .wc-block-cart-item__image {
        grid-column: 1;
        grid-row: 1;
    }

    body.woocommerce-cart
    .wc-block-cart-item__image img {
        display: block;
        width: 82px;
        max-width: 100%;
        height: auto;
        border-radius: 12px;
        object-fit: contain;
    }

    /* Product content */
    body.woocommerce-cart
    .wc-block-cart-item__product {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    body.woocommerce-cart
    .wc-block-cart-item__product
    .wc-block-components-product-name {
        display: block;
        margin: 0 0 8px;
        color: #172554;
        font-size: 14px !important;
        font-weight: 750;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    /* Main price */
    body.woocommerce-cart
    .wc-block-cart-item__product
    .wc-block-components-product-price {
        display: block;
        margin: 0 0 10px;
        color: #7C3AED;
        font-size: 15px;
        font-weight: 800;
    }

    /* Hide duplicate line total on mobile only */
    body.woocommerce-cart
    .wc-block-cart-items__row
    > .wc-block-cart-item__total {
        display: none !important;
    }

    /* Metadata */
    body.woocommerce-cart
    .wc-block-cart-item__product
    .wc-block-components-product-metadata {
        margin: 0 0 12px;
        color: #64748B;
        font-size: 12px;
        line-height: 1.6;
    }

    body.woocommerce-cart
    .wc-block-cart-item__product
    .wc-block-components-product-metadata p {
        margin: 0 0 5px;
    }

    /* Quantity control */
    body.woocommerce-cart
    .wc-block-cart-item__quantity {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 16px;
    }

    body.woocommerce-cart
    .wc-block-components-quantity-selector {
        width: 135px;
        max-width: 100%;
        min-height: 40px;
        margin: 0;
        border: 1px solid #E7EAF2;
        border-radius: 10px;
    }

    /* Remove link */
    body.woocommerce-cart
    .wc-block-cart-item__remove-link {
        color: #64748B;
        font-size: 12px;
    }

    /* Cart summary */
    body.woocommerce-cart
    .wc-block-cart__sidebar {
        width: 100%;
        margin: 24px 0 0;
        padding: 18px 15px;
        border: 1px solid #E7EAF2;
        border-radius: 16px;
        background: #FFFFFF;
        box-shadow: none;
    }

    /* Protect totals from overflow */
    body.woocommerce-cart
    .wc-block-components-totals-item {
        min-width: 0;
        gap: 8px;
    }

    body.woocommerce-cart
    .wc-block-components-totals-item__value {
        min-width: 0;
        text-align: right;
        overflow-wrap: anywhere;
    }

    /* Checkout button */
    body.woocommerce-cart
    .wc-block-cart__submit-button {
        width: 100%;
        min-height: 50px;
        border-radius: 11px;
        background: #7C3AED;
        color: #FFFFFF;
        font-size: 14px;
        font-weight: 750;
    }
}

@media (max-width: 380px) {

    body.woocommerce-cart
    .wc-block-cart-items__row {
        grid-template-columns: 70px minmax(0, 1fr);
        column-gap: 11px;
    }

    body.woocommerce-cart
    .wc-block-cart-item__image img {
        width: 70px;
    }
}


