/**
 * Cart Page Styling — Orevea Theme
 * Matches the official approved template mockup 4 (2-column layout + incentives).
 *
 * @package Orevea
 */

/* ================================================================
   1. CONTAINER & RESET
   ================================================================ */
.orevea-cart-wrapper {
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

/* Clear duplicate headers if hooked twice */
.orevea-cart-hero + .orevea-cart-wrapper .orevea-cart-header,
.orevea-cart-hero + .orevea-cart-wrapper .orevea-shipping-bar {
    display: none;
}

.orevea-cart-header {
    margin-bottom: 24px;
}

.orevea-cart-header__title {
    font-family: var(--orevea-font-display, 'Outfit', sans-serif);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #241411;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.orevea-cart-header__count {
    font-size: 16px;
    font-weight: 500;
    color: #8c827a;
}

/* ================================================================
   2. FREE SHIPPING PROGRESS BAR
   ================================================================ */
.orevea-shipping-bar {
    background: #ffffff;
    border: 1px solid rgba(58, 36, 32, .08);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 28px;
    box-shadow: 0 2px 10px rgba(58, 36, 32, .02);
}

.orevea-shipping-bar__message {
    font-size: 13px;
    color: #55483f;
    margin-bottom: 10px;
}

.orevea-shipping-bar__message strong {
    color: #241411;
}

.orevea-shipping-bar__track {
    width: 100%;
    height: 8px;
    background: #ede8df;
    border-radius: 999px;
    overflow: hidden;
}

.orevea-shipping-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #8b7355, #2e7d32);
    border-radius: 999px;
    transition: width .4s ease;
}

/* ================================================================
   3. 2-COLUMN GRID LAYOUT
   ================================================================ */
.orevea-cart {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 36px !important;
    align-items: start !important;
    width: 100% !important;
}

.orevea-cart__items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ================================================================
   4. CART ITEM CARD (.orevea-citem)
   ================================================================ */
.orevea-citem {
    background: #ffffff;
    border: 1px solid rgba(58, 36, 32, .08);
    border-radius: 14px;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 20px;
    align-items: center;
    box-shadow: 0 2px 12px rgba(58, 36, 32, .02);
    margin-bottom: 14px;
}

.orevea-citem__img {
    width: 90px;
    height: 90px;
    background: #fbf9f5;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(58, 36, 32, .06);
}

.orevea-citem__img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.orevea-citem__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.orevea-citem__brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8b7355;
}

.orevea-citem__name a {
    font-size: 14px;
    font-weight: 600;
    color: #241411;
    text-decoration: none;
    line-height: 1.35;
}

.orevea-citem__name a:hover {
    color: #6b2e2a;
}

.orevea-badge-stock-pill {
    display: inline-block;
    color: #2e7d32;
    font-size: 11.5px;
    font-weight: 700;
    margin-top: 2px;
}

.orevea-citem__actions-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.orevea-citem__remove,
.orevea-citem__wishlist {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #8c827a;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .2s ease;
}

.orevea-citem__remove:hover {
    color: #d32f2f;
}

.orevea-citem__wishlist:hover {
    color: #241411;
}

/* Quantity & Price in Item Card */
.orevea-citem__controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.orevea-citem__price {
    font-size: 15px;
    font-weight: 700;
    color: #241411;
    white-space: nowrap;
}

.orevea-citem__qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(58, 36, 32, .18);
    border-radius: 8px;
    background: #fbfbf9;
    overflow: hidden;
}

.orevea-citem__qty-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #241411;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orevea-citem__qty-btn:hover {
    background: rgba(58, 36, 32, .05);
}

.orevea-citem__qty-input {
    width: 38px;
    height: 32px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #241411;
    outline: none;
}

/* ================================================================
   5. INCENTIVES (FREE GIFT & REASSURANCE)
   ================================================================ */
.orevea-cart-gift-card,
.orevea-cart-free-gift-box {
    background: #fdfaf3 !important;
    border: 1.5px dashed #d5be9b !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 16px 0 !important;
}

.orevea-cart-gift-card__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.orevea-cart-gift-card__content {
    flex: 1;
}

.orevea-cart-gift-card__content strong {
    font-size: 12.5px;
    font-weight: 700;
    color: #2e7d32;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.orevea-cart-gift-card__content p {
    font-size: 12px;
    color: #55483f;
    margin: 0;
}

.orevea-cart-gift-card__badge {
    background: #2e7d32;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* 3 Mini Trust Icons */
.orevea-cart-reassurance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #fbf9f5;
    border: 1px solid rgba(58, 36, 32, .08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 12px;
}

.orevea-cart-reassurance__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #55483f;
}

.orevea-cart__continue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6d5d54;
    text-decoration: none;
    margin-top: 12px;
}

.orevea-cart__continue:hover {
    color: #6b2e2a;
}

/* ================================================================
   6. ORDER SUMMARY SIDEBAR (.cart_totals)
   ================================================================ */
.orevea-summary,
.woocommerce .cart-collaterals,
.woocommerce-page .cart-collaterals,
.woocommerce .cart_totals,
.woocommerce-page .cart_totals,
.cart-collaterals,
.cart_totals {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.orevea-summary {
    position: sticky;
    top: 90px;
}

.cart_totals {
    background: #ffffff !important;
    border: 1px solid rgba(58, 36, 32, .09) !important;
    border-radius: 16px !important;
    padding: 28px 26px !important;
    box-shadow: 0 4px 20px rgba(58, 36, 32, .03) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.cart_totals h2 {
    font-family: var(--orevea-font-display, 'Outfit', sans-serif) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    color: #241411 !important;
    margin: 0 0 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(58, 36, 32, .08) !important;
}

.cart_totals table.shop_table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    margin-bottom: 24px !important;
    display: table !important;
}

.cart_totals table.shop_table tbody {
    display: table-row-group !important;
}

.cart_totals table.shop_table tr {
    border-bottom: 1px solid rgba(58, 36, 32, .06) !important;
}

.cart_totals table.shop_table th {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #6d5d54 !important;
    padding: 12px 0 !important;
    border: none !important;
    text-align: left !important;
    width: 40% !important;
}

.cart_totals table.shop_table td {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #241411 !important;
    padding: 12px 0 !important;
    border: none !important;
    text-align: right !important;
    width: 60% !important;
}

.cart_totals table.shop_table tr.order-total {
    border-top: 1.5px solid rgba(58, 36, 32, .12) !important;
    border-bottom: none !important;
}

.cart_totals table.shop_table tr.order-total th {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #241411 !important;
    padding-top: 16px !important;
}

.cart_totals table.shop_table tr.order-total td strong,
.cart_totals table.shop_table tr.order-total td span.amount {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #241411 !important;
    padding-top: 16px !important;
}

.wc-proceed-to-checkout {
    padding: 0 !important;
    margin-top: 12px !important;
}

.wc-proceed-to-checkout a.checkout-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 52px !important;
    padding: 0 20px !important;
    background: #241411 !important;
    color: #ffffff !important;
    text-align: center !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    transition: all .2s ease !important;
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background: #6b2e2a !important;
    box-shadow: 0 8px 24px rgba(107, 46, 42, .25) !important;
    transform: translateY(-2px) !important;
}

.cart_totals .orevea-summary__pay-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */
@media (max-width: 992px) {
    .orevea-cart {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .orevea-summary {
        position: static;
    }
    .orevea-cart-reassurance {
        grid-template-columns: 1fr;
    }
}
