/*==================================================
  HYBRID CART STYLES
  Supports:
  - Classic WooCommerce Cart
  - WooCommerce Block Cart
  Fully Responsive (320px → Desktop)
==================================================*/

/*==================================
  DESIGN TOKENS
==================================*/

:root {
    --cart-bg: #ffffff;
    --cart-muted: #777;
    --cart-border: #e5e7eb;
    --cart-radius: 14px;
    --cart-gap: 16px;
    --cart-primary: var(--primary, #111827);
}

/*==================================
  RESET (CART ONLY)
==================================*/

.woocommerce-cart *,
.wp-block-woocommerce-cart * {
    box-sizing: border-box;
}

/*==================================
  ===============================
  CLASSIC CART
  ===============================
==================================*/

/* Cart item */
.woocommerce-cart .cart_item {
    display: grid;
    grid-template-columns: 90px 1fr 120px 40px;
    gap: var(--cart-gap);
    padding: 16px;
    background: var(--cart-bg);
    margin-bottom: 16px;
    align-items: center;
}

/* Hover */
.woocommerce-cart .cart_item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* Image */
.woocommerce-cart .product-thumbnail img {
    width: 90px;
    height: 90px;
    object-fit: cover;
}

/* Quantity */
.woocommerce-cart .quantity input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--cart-border);
    border-radius: 8px;
}

/* Subtotal */
.woocommerce-cart .product-subtotal {
    font-weight: 700;
    color: var(--cart-primary);
}

/* Remove */
.woocommerce-cart .remove {
    color: #ef4444;
    font-size: 14px;
}

/* Totals */
.woocommerce-cart .cart_totals {
    background: var(--cart-bg);
    padding: 24px;
    margin-top: 24px;
}

/*==================================
  ===============================
  BLOCK CART (GRID / CARD MODE)
  ===============================
==================================*/

/* Remove table header */
.wc-block-cart-items thead {
    display: none !important;
}

/* Neutralize table look */
.wc-block-cart-items {
    border-collapse: separate !important;
    /* border-spacing: 0 18px !important; */
    /* background: transparent !important; */
    border-bottom: none !important;
}

/* Break table behavior */
.wc-block-cart-items__row > td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
}

/* Card layout */
.wc-block-cart-items__row {
    display: grid !important;
    grid-template-columns: 100px 1fr 120px !important;
    gap: 16px !important;
    padding: 16px !important;
    background: var(--cart-bg) !important;
    /* box-shadow: 0 10px 25px rgba(0,0,0,.06) !important; */
    align-items: start !important;
}

/* Image */
.wc-block-cart-item__image img {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover !important;
}

/* Title */

/* Hide long meta on small screens */
.wc-block-components-product-metadata__description {
    display: none !important;
}

/* Quantity */
.wc-block-components-quantity-selector__input {
    width: 60px !important;
    height: 40px !important;
    text-align: center !important;
}

/* Remove */
.wc-block-cart-item__remove-link {
    color: #ef4444 !important;
    font-size: 13px !important;
}

/* Totals sidebar */
.wc-block-cart__sidebar,
.wc-block-cart__totals {
    background: var(--cart-bg) !important;
    padding: 24px !important;
}

/* Checkout button */
.wc-block-cart__submit-button {
    width: 100% !important;
    padding: 16px !important;
    background: var(--primary, #2563eb) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-align: center !important;
}

/*==================================
  EMPTY CART
==================================*/

.cart-empty,
.wp-block-woocommerce-empty-cart-block {
    text-align: center;
    padding: 60px 20px;
}

/*==================================
  RESPONSIVE FIXES
==================================*/

/* Tablets & small laptops */
@media (max-width: 992px) {

    .wc-block-cart-items__row {
        grid-template-columns: 90px 1fr 100px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Classic */
    .woocommerce-cart .cart_item {
        grid-template-columns: 70px 1fr;
    }

    /* Block */
    .wc-block-cart-items__row {
        grid-template-columns: 70px 1fr !important;
    }

    .wc-block-cart-item__total {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        margin-top: 6px !important;
        text-align: right !important;
        font-size: 1rem !important;
        display: block !important;
    }

}

/* Very small devices (320px safe) */
@media (max-width: 480px) {

    .woocommerce-cart .product-thumbnail img,
    .wc-block-cart-item__image img {
        width: 60px !important;
        height: 60px !important;
    }

    .wc-block-components-product-name,
    .wc-block-components-sale-badge {
        font-size: 0.55rem !important;
    }

    .wc-block-cart-item__quantity {
        display: flex;
        flex-direction: row;
    }
}

/* FIX TOTAL POSITION (DESKTOP) */
.wc-block-cart-item__total {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
}

.wc-block-cart-item__prices {
    display: none;
}

.breadcrumbs {
    display: none;
}

.page-article {
    padding-top: 50px;
}
