/* ==========================================================================
   PostPatra — classic cart "Mail Tray" styling
   ========================================================================== */
:root{
    --navy:#14233f; --red:#c0202f; --cream:#f6f1e4; --paper:#fffdf8;
    --gold:#c98a12; --green:#1e6b4f; --ink:#22272e; --muted:#6b7280; --line:#e7ddc7;
}
.woocommerce-cart .entry-title,
.woocommerce-cart h1.entry-title{ font-family:Georgia,"Times New Roman",serif; color:var(--navy); }
.woocommerce-cart div.woocommerce{ margin-bottom:48px; }

/* ---------- two-column layout (flex: items flex, summary fixed 340px) ---------- */
.woocommerce-cart .woocommerce{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:30px; }
.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper{ flex:0 0 100%; }
.woocommerce-cart .woocommerce > form.woocommerce-cart-form{ flex:1 1 300px; min-width:0; margin:0; }
.woocommerce-cart .woocommerce > .cart-collaterals{ flex:0 0 340px; width:340px !important; max-width:100%; float:none !important; margin:0; }
.woocommerce-cart .woocommerce > .cross-sells{ flex:0 0 100%; }

/* ---------- tray count badge ---------- */
.pp-tray-head{ margin:0 0 16px; }
.pp-tray-count{ display:inline-block; font-size:13px; color:var(--navy); background:#fff; border:1px dashed var(--line); border-radius:8px; padding:6px 13px; font-weight:600; }

/* ---------- add-on toggles ---------- */
.pp-cart-addons{ display:grid; gap:12px; margin:0 0 22px; }
.pp-cart-addons.pp-busy{ opacity:.55; pointer-events:none; }
.pp-opt{ display:flex; align-items:center; gap:14px; background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:15px 18px; }
.pp-opt .ic{ font-size:24px; flex:0 0 auto; line-height:1; }
.pp-opt .t{ flex:1; min-width:0; }
.pp-opt .t b{ display:block; color:var(--navy); font-size:15px; font-weight:700; }
.pp-opt .t span{ color:var(--muted); font-size:13px; }
.pp-cart-addons-msg{ color:var(--red); font-size:12.5px; }
.pp-cart-addons-msg:empty{ display:none; }

.pp-sw{ position:relative; display:inline-block; width:50px; height:28px; flex:0 0 auto; cursor:pointer; }
.pp-sw input{ position:absolute; opacity:0; width:0; height:0; }
.pp-sw .sl{ position:absolute; inset:0; background:#d8cdb0; border-radius:28px; transition:.2s; }
.pp-sw .sl::before{ content:""; position:absolute; width:22px; height:22px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.25); }
.pp-sw input:checked + .sl{ background:var(--green); }
.pp-sw input:checked + .sl::before{ transform:translateX(22px); }

/* ---------- cart items as mail-piece cards ---------- */
.woocommerce-cart table.cart{ border:none !important; margin:0; background:none; }
.woocommerce-cart table.cart thead{ display:none; }
.woocommerce-cart table.cart,
.woocommerce-cart table.cart tbody{ display:block; }
.woocommerce-cart table.cart tbody tr{ display:block; }
.woocommerce-cart table.cart tbody tr.woocommerce-cart-form__cart-item{
    display:grid !important; grid-template-columns:60px 1fr auto;
    grid-template-areas:"thumb name sub";
    gap:0 16px; align-items:center;
    background:var(--paper); border:1px solid var(--line); border-radius:14px;
    padding:18px 18px 16px; margin-bottom:14px; position:relative;
}
.woocommerce-cart table.cart tbody tr.cart_item td{ display:block; border:none !important; padding:0 !important; background:none !important; width:auto !important; }
/* kill WooCommerce's responsive "data-title" labels (Product:/Quantity:/Subtotal:) */
.woocommerce-cart table.cart td::before{ display:none !important; content:"" !important; }
.woocommerce-cart td.product-thumbnail{ grid-area:thumb; }
.woocommerce-cart td.product-thumbnail img{ width:60px; height:60px; object-fit:cover; border-radius:9px; border:1px solid var(--line); margin:0; }
.woocommerce-cart td.product-name{ grid-area:name; font-size:14px; color:var(--ink); padding-right:8px !important; }
.woocommerce-cart td.product-name a{ color:var(--navy); text-decoration:none; }
.woocommerce-cart td.product-name > a:first-child{ font-weight:700; font-size:15px; }
.woocommerce-cart td.product-name a:hover{ color:var(--red); }
.woocommerce-cart td.product-name dl,
.woocommerce-cart td.product-name .variation,
.woocommerce-cart td.product-name small{ font-size:12.5px; color:var(--muted); margin-top:3px; }
.woocommerce-cart td.product-price{ display:none !important; }
.woocommerce-cart td.product-quantity{ display:none !important; }   /* each piece of mail is qty 1 */
.woocommerce-cart td.product-subtotal{ grid-area:sub; justify-self:end; font-weight:700; color:var(--navy); font-size:16px; white-space:nowrap; }
.woocommerce-cart td.product-remove{ position:absolute; top:8px; right:11px; padding:0 !important; }
.woocommerce-cart td.product-remove a.remove{ color:#c4a0a8; font-size:18px; line-height:1; font-weight:400; }
.woocommerce-cart td.product-remove a.remove:hover{ background:none !important; color:var(--red) !important; }

/* no quantity to update, so hide the actions row entirely (removal uses the × ) */
.woocommerce-cart table.cart td.actions{ display:none !important; }

/* override WooCommerce's mobile responsive-table behaviour so the card holds at
   every width: keep the thumbnail, left-align the name, right-align the price */
.woocommerce-cart table.cart td.product-thumbnail{ display:block !important; }
.woocommerce-cart table.cart td.product-thumbnail img{ display:block !important; width:60px !important; height:60px !important; }
.woocommerce-cart table.cart td.product-name{ text-align:left !important; }
.woocommerce-cart table.cart td.product-subtotal{ text-align:right !important; }
.woocommerce-cart table.cart tbody tr.woocommerce-cart-form__cart-item::before,
.woocommerce-cart table.cart tbody tr.woocommerce-cart-form__cart-item::after{ content:none !important; display:none !important; }

/* ---------- order summary as a navy postage box ---------- */
.woocommerce-cart .cart-collaterals .cart_totals{ float:none; width:100%; }
.woocommerce-cart .cart_totals{ position:sticky; top:18px; background:var(--navy); color:#eef0f4; border-radius:18px; padding:22px 24px; }
.woocommerce-cart .cart_totals > h2{ color:#fff; font-family:Georgia,serif; font-size:20px; margin:0 0 14px; }
.woocommerce-cart .cart_totals table{ border:none; margin:0; width:100%; display:block; }
.woocommerce-cart .cart_totals table tbody{ display:block; width:100%; }
.woocommerce-cart .cart_totals table tr{ display:flex; justify-content:space-between; align-items:baseline; gap:14px; border-bottom:1px solid #2b3a5c; }
.woocommerce-cart .cart_totals table th,
.woocommerce-cart .cart_totals table td{ border:none !important; padding:11px 0 !important; color:#dfe4ee !important; background:none !important; font-size:14px; }
.woocommerce-cart .cart_totals table th{ text-align:left; font-weight:600; flex:0 0 auto; white-space:nowrap; }
.woocommerce-cart .cart_totals table td{ text-align:right; flex:1 1 auto; }
.woocommerce-cart .cart_totals #shipping_method,
.woocommerce-cart .cart_totals ul{ list-style:none; margin:0; padding:0; }
/* hide the "Shipping to <address>" + change-address calculator inside the summary */
.woocommerce-cart .cart_totals .woocommerce-shipping-destination,
.woocommerce-cart .cart_totals .shipping-calculator-button,
.woocommerce-cart .cart_totals .shipping-calculator-form{ display:none !important; }
.woocommerce-cart .cart_totals table tr.order-total{ border-bottom:none !important; }
.woocommerce-cart .cart_totals table tr.order-total th,
.woocommerce-cart .cart_totals table tr.order-total td{ padding-top:14px !important; }
.woocommerce-cart .cart_totals .order-total th{ color:#fff !important; font-size:16px; }
.woocommerce-cart .cart_totals .order-total .amount{ color:#fff !important; font-size:22px; }
.woocommerce-cart .cart_totals a{ color:#e9c46a; }
.woocommerce-cart .cart_totals .cart-discount td{ color:#bfe3cf !important; }
.woocommerce-cart .wc-proceed-to-checkout{ padding:16px 0 0; }
.woocommerce-cart .wc-proceed-to-checkout .checkout-button{
    background:var(--red) !important; color:#fff !important; border:none !important; border-radius:12px !important;
    padding:15px !important; font-size:16px !important; font-weight:700 !important; width:100%; text-align:center; box-shadow:none !important;
}
.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover{ background:#a91b28 !important; }

/* ---------- empty cart ---------- */
.woocommerce-cart .cart-empty{ font-family:Georgia,serif; color:var(--navy); font-size:18px; }
.woocommerce-cart .return-to-shop .button{ background:var(--navy) !important; color:#fff !important; border-radius:10px !important; padding:13px 22px !important; font-weight:600 !important; }

/* ---------- responsive ---------- */
@media (max-width:820px){
    .woocommerce-cart .woocommerce > form.woocommerce-cart-form{ flex:1 1 100%; }
    .woocommerce-cart .woocommerce > .cart-collaterals{ flex:1 1 100%; width:100% !important; }
    .woocommerce-cart .cart_totals{ position:static; }
}
@media (max-width:480px){
    .woocommerce-cart table.cart tbody tr.woocommerce-cart-form__cart-item{ padding:14px 14px 12px; gap:0 12px; }
    .woocommerce-cart table.cart td.product-thumbnail img{ width:54px !important; height:54px !important; }
    .woocommerce-cart td.product-subtotal{ font-size:15px; }
    .woocommerce-cart .cart_totals{ padding:18px 18px; }
    .pp-opt{ padding:14px; gap:12px; }
    .pp-opt .t b{ font-size:14px; }
    .pp-opt .t span{ font-size:12px; }
}
