/* Wepic — cart page (light & editorial). */

.cart-page { background: var(--sand); }
.cart-page > .container { padding-block: clamp(28px, 4vw, 48px) var(--section-space); }
.cart-page__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 28px; }
.cart-page__title { margin: 0; font-size: clamp(2.4rem, 1.6rem + 2.8vw, 3.6rem); }
.cart-page__count { color: var(--muted); font-size: .55em; font-weight: 500; vertical-align: middle; }

/* Checkout steps */
.checkout-steps { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.checkout-steps li { display: flex; align-items: center; gap: 8px; }
.checkout-steps li + li::before { content: ""; width: 28px; height: 1px; background: #d9d0c3; }
.checkout-steps span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d9d0c3; background: var(--white); font-weight: 700; font-size: .75rem; }
.checkout-steps [aria-current] { color: var(--ink); font-weight: 700; }
.checkout-steps [aria-current] span { background: var(--black); border-color: var(--black); color: var(--white); }
@media (max-width: 599px) { .checkout-steps li:not([aria-current]) { font-size: 0; gap: 0; } .checkout-steps li:not([aria-current]) span { font-size: .75rem; } }

/* Notices */
.cart-page .woocommerce-message, .cart-page .woocommerce-info, .cart-page .woocommerce-error { margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius); background: var(--white); color: var(--ink); list-style: none; box-shadow: 0 1px 0 var(--line); }
.cart-page .woocommerce-error { background: #fdecea; color: #8a1c13; }
.cart-page .woocommerce-message a, .cart-page .woocommerce-info a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Layout */
.cart-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1024px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 410px; gap: 32px; } .cart-collaterals { position: sticky; top: calc(var(--header-h) + 20px); } }

/* Item cards */
.cart-items { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cart_item {
	display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; grid-template-areas: "thumb name name" "thumb qty subtotal" "thumb remove remove";
	gap: 10px 16px; padding: 16px; border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.cart_item .product-thumbnail { grid-area: thumb; }
.cart_item .product-thumbnail img { width: 104px; height: 104px; border-radius: var(--radius); object-fit: cover; background: var(--sand); }
.cart_item .product-name { grid-area: name; min-width: 0; }
.cart_item .product-name > a { color: var(--ink); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.cart_item .product-name dl.variation { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.cart_item .product-name dl.variation dt { font-weight: 600; }
.cart_item .product-name dl.variation dd, .cart_item .product-name dl.variation p { margin: 0; }
.cart_item .product-price { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.cart_item .product-quantity { grid-area: qty; align-self: center; }
.cart_item .product-subtotal { grid-area: subtotal; align-self: center; justify-self: end; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.cart_item .product-remove { grid-area: remove; }
.cart_item .product-remove .remove { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.cart_item .product-remove .remove:hover { color: #b3261e; }
@media (min-width: 768px) {
	.cart_item { grid-template-columns: 140px minmax(0, 1fr) auto auto; grid-template-areas: "thumb name qty subtotal" "thumb remove qty subtotal"; padding: 20px; column-gap: 24px; }
	.cart_item .product-thumbnail img { width: 140px; height: 140px; }
	.cart_item .product-remove { align-self: end; }
	.cart_item .product-subtotal { min-width: 90px; text-align: right; }
}

/* Quantity stepper */
.cart_item .quantity { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--white); }
.cart_item .quantity .qty { width: 40px; height: 40px; border: 0; background: none; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.cart_item .quantity .qty::-webkit-inner-spin-button, .cart_item .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 40px; height: 40px; border: 0; background: none; color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.qty-btn:hover { background: var(--sand); }

/* Cart actions (update button only needed without JavaScript) */
.woocommerce-cart-form .actions { margin-top: 12px; }
.js .woocommerce-cart-form .cart-update { display: none; }
.cart-update { padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-weight: 600; cursor: pointer; }

/* Reassurance under the items */
.cart-reassurance { display: grid; gap: 12px; margin: 20px 0 0; padding: 18px 20px; list-style: none; border-radius: var(--radius-lg); border: 1px dashed #d9d0c3; }
@media (min-width: 768px) { .cart-reassurance { grid-template-columns: repeat(3, 1fr); } }
.cart-reassurance li { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.cart-reassurance strong { display: block; color: var(--ink); font-size: .9rem; }
.cart-reassurance .icon { flex: none; color: var(--accent); }
.cart-reassurance a { text-decoration: underline; text-underline-offset: 3px; }

/* Summary card */
.summary-card { padding: 28px 24px; border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 12px 40px rgb(43 33 20 / 0.08); }
.summary-card__title { margin: 0 0 12px; font-size: 2rem; }
.summary-card__rows { margin: 0; }
.summary-card__rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-card__rows dt { color: var(--text); }
.summary-card__rows dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.summary-card__rows .cart-discount dd { color: #17803d; }
.summary-card__rows .cart-discount dd a { margin-left: 8px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.badge-free { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #e6f6ea; color: #17803d; font-size: .8rem; font-weight: 800; }
.coupon-form { display: flex; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.coupon-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); color: var(--ink); }
.coupon-form input:focus { background: var(--white); border-color: var(--ink); outline: none; }
.coupon-form .btn { min-height: 44px; padding: 0 16px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); font-size: .88rem; }
.coupon-form .btn:hover { background: var(--ink); color: var(--white); }
.order-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 20px; color: var(--ink); font-size: 1.05rem; font-weight: 700; }
.order-total strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.order-total small { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); }
.wc-proceed-to-checkout .checkout-button {
	display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border-radius: var(--radius);
	background: var(--charcoal); color: var(--white); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
	transition: background-color .2s, color .2s;
}
.wc-proceed-to-checkout .checkout-button:hover { background: var(--accent-text); color: var(--white); }
.summary-card__trust { margin-top: 18px; }
.summary-card__payments { width: 160px; height: auto; margin: 0 auto 16px; }
.summary-card__trust ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .84rem; color: var(--text); }
.summary-card__trust li { position: relative; padding-left: 24px; }
.summary-card__trust li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 12px; height: 7px; border: solid #17803d; border-width: 0 0 2px 2px; transform: rotate(-45deg); }

/* Empty cart */
.cart-empty-state { display: grid; justify-items: center; gap: 8px; max-width: 560px; margin: 16px auto 56px; padding: 44px 28px; border-radius: var(--radius-lg); background: var(--white); text-align: center; }
.cart-empty-state__icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 8px; border-radius: 50%; background: var(--sand); color: var(--accent); }
.cart-empty-state__title { margin: 0; font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; color: var(--ink); }
.cart-empty-state .btn { margin-top: 12px; }

/* Suggestions below: white band, so it separates from the sand cart area */
.cart-page .section--sand { background: var(--white); }

/* Mobile sticky checkout bar */
.cart-sticky { position: fixed; inset: auto 0 0; z-index: 44; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--white); box-shadow: 0 -6px 24px rgb(0 0 0 / 0.12); transform: translateY(110%); transition: transform .25s; }
.cart-sticky[hidden] { display: none; }
.cart-sticky.is-visible { transform: none; }
.cart-sticky__total { display: grid; margin: 0; font-size: .8rem; color: var(--muted); }
.cart-sticky__total strong { font-size: 1.15rem; color: var(--ink); }
.cart-sticky__total small { display: none; }
.cart-sticky .btn { min-height: 46px; padding-inline: 28px; }
@media (min-width: 1024px) { .cart-sticky { display: none !important; } }
.has-cart-sticky .whatsapp-float { bottom: 84px; }
