/* ============================================================
   Espresso Club Shop Cart — standalone styles
   Palette: Mint #7CC5B2 · Deep #2F8E74 · Green #175A49 · Ink #10241E
   Font: Inter (loaded by shop-cart.php). Elementor style controls
   override these defaults per widget.
   ============================================================ */
:root {
	--ec-mint: #7CC5B2;
	--ec-mint-deep: #2F8E74;
	--ec-green: #175A49;
	--ec-ink: #10241E;
	--ec-page: #FAFCFB;
	--ec-cream: #EDF7F3;
	--ec-surface: #E2F1EB;
	--ec-warn: #D96A4A;
	--ec-ink-70: rgba(16, 36, 30, 0.7);
	--ec-ink-55: rgba(16, 36, 30, 0.55);
	--ec-ink-40: rgba(16, 36, 30, 0.4);
	--ec-rule: rgba(23, 90, 73, 0.16);
	--ec-rule-soft: rgba(23, 90, 73, 0.08);
	--ec-radius: 18px;
	--ec-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--ec-shadow: 0 1px 2px rgba(16, 36, 30, 0.05), 0 12px 32px -12px rgba(23, 90, 73, 0.14);
	--ec-shadow-lg: 0 2px 4px rgba(16, 36, 30, 0.06), 0 24px 48px -16px rgba(23, 90, 73, 0.24);
}

.ecel-cart {
	--cart-side: 380px;
	font-family: var(--ec-font);
	padding: 48px 0 80px;
	color: var(--ec-ink);
	background: var(--ec-page);
}
.ecel-cart button,
.ecel-cart input { font-family: inherit; }

.ecel-cart .cart-wrap { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.ecel-cart .cart-head { margin-bottom: 28px; }
.ecel-cart .cart-eyebrow {
	display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
	text-transform: uppercase; color: var(--ec-mint-deep); margin-bottom: 8px;
}
.ecel-cart .cart-title { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--ec-green); }
.ecel-cart .cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--cart-side); gap: 32px; align-items: start; }
.ecel-cart .cart-main { min-width: 0; }
.ecel-cart .cart-side { position: sticky; top: 24px; display: grid; gap: 16px; }

.ecel-cart .cart-card {
	background: #fff; border: 1px solid var(--ec-rule-soft); border-radius: var(--ec-radius);
	box-shadow: var(--ec-shadow); padding: 24px;
}

/* Item table */
.ecel-cart .cart-items { padding: 8px 24px; }
.ecel-cart .cart-cols,
.ecel-cart .cart-item {
	display: grid;
	grid-template-columns: minmax(0, 2.4fr) minmax(90px, 1fr) minmax(130px, 1.1fr) minmax(90px, 1fr) 32px;
	gap: 18px; align-items: center;
}
.ecel-cart .cart-product { grid-column: 1; min-width: 0; display: flex; gap: 18px; align-items: center; }
.ecel-cart .cart-col-price { grid-column: 2; }
.ecel-cart .cart-qty { grid-column: 3; }
.ecel-cart .cart-line-total { grid-column: 4; justify-self: end; }
.ecel-cart .cart-remove { grid-column: 5; }

.ecel-cart .cart-cols {
	padding: 14px 0; border-bottom: 1px solid var(--ec-rule);
	font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ec-ink-55);
}
.ecel-cart .cart-item { padding: 22px 0; border-bottom: 1px solid var(--ec-rule-soft); }
.ecel-cart .cart-item:last-child { border-bottom: 0; }
.ecel-cart .cart-thumb-link { flex: 0 0 auto; }
.ecel-cart .cart-thumb,
.ecel-cart .cart-thumb-link img {
	width: 96px !important; height: 96px !important; max-width: 96px; flex: 0 0 96px;
	object-fit: contain; background: var(--ec-cream); border-radius: 14px; padding: 8px; display: block;
}
.ecel-cart .cart-info { min-width: 0; }
.ecel-cart .cart-name { display: block; font-size: 15px; font-weight: 700; color: var(--ec-ink); text-decoration: none; line-height: 1.35; }
.ecel-cart .cart-name:hover { color: var(--ec-mint-deep); }
.ecel-cart .cart-meta { margin-top: 4px; font-size: 12.5px; color: var(--ec-ink-55); }
.ecel-cart .cart-meta dl, .ecel-cart .cart-meta p { margin: 0; }
.ecel-cart .cart-price, .ecel-cart .cart-line-total { font-size: 15px; font-weight: 700; color: var(--ec-green); white-space: nowrap; }
.ecel-cart .cart-price-mobile { display: none; margin-top: 6px; }
.ecel-cart .cart-price del, .ecel-cart .cart-line-total del { opacity: 0.5; font-weight: 500; }

/* Quantity stepper */
.ecel-cart .cart-qty {
	display: inline-flex; align-items: center; width: max-content;
	border: 1px solid var(--ec-rule); border-radius: 999px; overflow: hidden; background: #fff;
}
.ecel-cart .qty-btn {
	width: 36px; height: 36px; border: 0; background: var(--ec-mint-deep); color: #fff;
	font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.ecel-cart .qty-btn:hover { background: var(--ec-green); }
.ecel-cart .qty {
	width: 52px; height: 36px; border: 0; text-align: center; font: 600 14px var(--ec-font);
	color: var(--ec-ink); -moz-appearance: textfield; appearance: textfield;
}
.ecel-cart .qty::-webkit-outer-spin-button,
.ecel-cart .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ecel-cart .qty:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ec-mint); }

.ecel-cart .cart-remove {
	justify-self: end; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
	color: var(--ec-ink-40); border: 1px solid var(--ec-rule); text-decoration: none; font-size: 18px; line-height: 1;
	transition: color 0.2s, border-color 0.2s;
}
.ecel-cart .cart-remove:hover { color: var(--ec-warn); border-color: var(--ec-warn); }

/* Buttons */
.ecel-cart .cart-actions { display: flex; justify-content: flex-start; margin-top: 20px; }
.ecel-cart .cart-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 24px; border: 0; border-radius: 999px; font: 700 13px var(--ec-font);
	text-decoration: none; cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.25s;
}
.ecel-cart .cart-btn--primary { background: var(--ec-mint-deep); color: #fff; }
.ecel-cart .cart-btn--primary:hover { background: var(--ec-green); color: #fff; transform: translateY(-1px); }
.ecel-cart .cart-btn--ghost { background: transparent; color: var(--ec-green); padding-left: 0; }
.ecel-cart .cart-btn--ghost:hover { color: var(--ec-mint-deep); }
.ecel-cart .cart-btn--dark { background: var(--ec-ink); color: #fff; }
.ecel-cart .cart-btn--dark:hover { background: var(--ec-green); color: #fff; }
.ecel-cart .cart-btn--wide { width: 100%; padding: 17px 24px; font-size: 14px; margin-top: 20px; }

/* Coupon */
.ecel-cart .cart-coupon { padding: 18px; }
.ecel-cart .coupon-row { display: flex; gap: 10px; }
.ecel-cart .coupon-row .input-text {
	flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--ec-rule); border-radius: 999px;
	font: 500 14px var(--ec-font); color: var(--ec-ink); background: var(--ec-page);
}
.ecel-cart .coupon-row .input-text:focus { outline: none; border-color: var(--ec-mint-deep); box-shadow: 0 0 0 3px var(--ec-surface); }

/* Order summary */
.ecel-cart .cart-summary {
	background: linear-gradient(160deg, #17493C 0%, #0E2B23 100%); color: #fff; border: 0;
	padding: 28px; box-shadow: var(--ec-shadow-lg);
}
.ecel-cart .cart-summary-title { margin: 0 0 18px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.ecel-cart .cart-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; color: rgba(255,255,255,0.82); }
.ecel-cart .cart-val { font-weight: 600; color: #fff; text-align: right; }
.ecel-cart .cart-muted { font-weight: 500; color: rgba(255,255,255,0.6); }
.ecel-cart .cart-discount { color: #F3B39F; }
.ecel-cart .cart-remove-coupon { color: rgba(255,255,255,0.6); text-decoration: none; margin-left: 4px; }
.ecel-cart .cart-remove-coupon:hover { color: #F3B39F; }
.ecel-cart .cart-divider { height: 1px; background: rgba(255,255,255,0.14); margin: 14px 0; }
.ecel-cart .cart-grand-row { align-items: baseline; padding: 0; }
.ecel-cart .cart-grand-label { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.82); }
.ecel-cart .cart-grand { font-size: 26px; font-weight: 800; color: #7CC5B2; letter-spacing: -0.01em; }
.ecel-cart .cart-tax { margin: 4px 0 0; font-size: 12px; color: rgba(255,255,255,0.6); text-align: right; }
.ecel-cart .cart-summary .cart-btn--primary { background: var(--ec-mint); color: var(--ec-ink); }
.ecel-cart .cart-summary .cart-btn--primary:hover { background: #fff; color: var(--ec-ink); }

/* Empty + notices */
.ecel-cart .cart-empty-card { text-align: center; padding: 56px 24px; }
.ecel-cart .cart-empty-card p { margin: 0 0 22px; font-size: 16px; color: var(--ec-ink-70); }
.ecel-cart .cart-notices .woocommerce-message,
.ecel-cart .cart-notices .woocommerce-error,
.ecel-cart .cart-notices .woocommerce-info { list-style: none; margin: 0 0 16px; padding: 14px 18px; border-radius: 14px; background: var(--ec-surface); color: var(--ec-green); font-size: 14px; }
.ecel-cart .cart-notices .woocommerce-error { background: #FBEAE4; color: #9A3F24; }

/* Responsive */
@media (max-width: 960px) {
	.ecel-cart .cart-grid { grid-template-columns: 1fr; }
	.ecel-cart .cart-side { position: static; }
}
@media (max-width: 640px) {
	.ecel-cart { padding: 28px 0 56px; }
	.ecel-cart .cart-items { padding: 4px 16px; }
	.ecel-cart .cart-cols { display: none; }
	.ecel-cart .cart-item { grid-template-columns: 1fr auto 28px; grid-template-areas: "product product remove" "qty total total"; gap: 12px 14px; }
	.ecel-cart .cart-product { grid-area: product; }
	.ecel-cart .cart-col-price { display: none; }
	.ecel-cart .cart-price-mobile { display: block; }
	.ecel-cart .cart-qty { grid-area: qty; }
	.ecel-cart .cart-line-total { grid-area: total; justify-self: end; }
	.ecel-cart .cart-remove { grid-area: remove; }
	.ecel-cart .cart-thumb,
	.ecel-cart .cart-thumb-link img { width: 72px !important; height: 72px !important; max-width: 72px; flex-basis: 72px; }
	.ecel-cart .cart-card { padding: 18px; }
	.ecel-cart .cart-summary { padding: 22px; }
}

/* Notification: top right */
.ecel-cart-toast {
	position: fixed; top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 9999;
	transform: translateX(16px); opacity: 0; pointer-events: none; max-width: min(360px, calc(100vw - 32px));
	background: var(--ec-green); color: #fff; padding: 14px 18px 14px 44px; border-radius: 14px;
	font: 600 14px/1.4 var(--ec-font); box-shadow: var(--ec-shadow-lg); transition: opacity 0.25s, transform 0.25s;
}
.ecel-cart-toast::before {
	content: ''; position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
	background: var(--ec-mint); box-shadow: inset 0 0 0 3px var(--ec-green);
}
.ecel-cart-toast.is-error { background: #9A3F24; }
.ecel-cart-toast.is-error::before { background: #F3B39F; }
.ecel-cart-toast.is-on { opacity: 1; transform: translateX(0); }

/* Sale tag, struck prices, quantity read-only */
.ecel-cart .cart-sale-tag {
	display: inline-flex; align-self: flex-start; margin-bottom: 6px; padding: 4px 10px; border-radius: 999px;
	background: var(--ec-warn); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.ecel-cart .cart-price del,
.ecel-cart .cart-line-total del,
.ecel-cart .cart-line-was { color: var(--ink-3, rgba(16, 36, 30, 0.5)); font-weight: 500; margin-right: 6px; }
.ecel-cart .cart-price ins { text-decoration: none; color: var(--ec-warn); font-weight: 800; }
.ecel-cart .cart-qty .qty { cursor: default; }
.ecel-cart .cart-item .cart-info { display: flex; flex-direction: column; align-items: flex-start; }

/* Table header centred, columns aligned to it */
.ecel-cart .cart-cols { justify-items: center; text-align: center; }
.ecel-cart .cart-cols span:first-child { justify-self: start; text-align: left; }
.ecel-cart .cart-col-price,
.ecel-cart .cart-qty,
.ecel-cart .cart-line-total { justify-self: center; text-align: center; }
.ecel-cart .cart-line-total { justify-self: center; }

/* Price stack: original struck through in theme colour, sale below */
.ecel-cart .cart-price-stack { display: inline-grid; justify-items: center; gap: 2px; }
.ecel-cart .cart-price-stack del { color: var(--ec-mint-deep); text-decoration: line-through; font-weight: 600; font-size: 13px; }
.ecel-cart .cart-price-stack ins { text-decoration: none; color: var(--ec-warn); font-weight: 800; font-size: 15px; }

/* Variations under the product name */
.ecel-cart .cart-variation { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: rgba(16, 36, 30, 0.65); }
.ecel-cart .cart-variation dl,
.ecel-cart .cart-variation dt,
.ecel-cart .cart-variation dd,
.ecel-cart .cart-variation p { margin: 0; display: inline; }
.ecel-cart .cart-variation dt { font-weight: 700; color: var(--ec-green); }
.ecel-cart .cart-variation dt::after { content: ': '; }

/* Original price: same font, size, weight and colour as a regular price, struck through */
.ecel-cart .cart-price-stack del,
.ecel-cart .cart-line-total del {
	color: var(--ec-green); font-size: 15px; font-weight: 700; text-decoration: line-through;
	text-decoration-thickness: 1.5px; font-family: inherit; opacity: 1;
}

/* Variations: label and selected value on their own lines, under the product name */
.ecel-cart .cart-variation { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; font-size: 13px; }
.ecel-cart .cart-var-row { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin: 0; }
.ecel-cart .cart-variation dt { font-weight: 600; color: rgba(16, 36, 30, 0.6); margin: 0; }
.ecel-cart .cart-variation dt::after { content: ':'; }
.ecel-cart .cart-variation dd { margin: 0; font-weight: 700; color: var(--ec-green); }

/* Message above the coupon field (replaces the floating pop-up) */
.ecel-cart .cart-live { display: none; }
.ecel-cart .cart-live.is-on {
	display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
	background: var(--ec-surface); color: var(--ec-green); font-size: 14px; font-weight: 600; line-height: 1.45;
	border: 1px solid var(--ec-rule); box-shadow: var(--ec-shadow);
}
.ecel-cart .cart-live.is-on::before {
	content: ''; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
	background: var(--ec-mint-deep); box-shadow: inset 0 0 0 4px var(--ec-surface);
}
.ecel-cart .cart-live.is-on.is-error { background: #FBEAE4; color: #9A3F24; border-color: #E9B9A8; }
.ecel-cart .cart-live.is-on.is-error::before { background: var(--ec-warn); }

/* Popup notification: slides in from the right, leaves after 4 seconds */
.ecel-cart-toast {
	position: fixed; top: 150px; right: max(16px, env(safe-area-inset-right, 0px)); z-index: 9999;
	max-width: min(380px, calc(100vw - 32px)); padding: 14px 18px 14px 44px; border-radius: 16px;
	background: var(--ec-green); color: #fff; font: 600 14px/1.45 var(--ec-font); box-shadow: var(--ec-shadow-lg);
	transform: translateX(calc(100% + 32px)); opacity: 0; pointer-events: none;
	transition: transform 0.4s cubic-bezier(.2,.8,.2,1), opacity 0.3s ease;
}
.ecel-cart-toast::before {
	content: ''; position: absolute; left: 18px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
	background: var(--ec-mint); box-shadow: inset 0 0 0 3px var(--ec-green);
}
.ecel-cart-toast.is-error { background: #9A3F24; }
.ecel-cart-toast.is-error::before { background: #F3B39F; }
.ecel-cart-toast.is-on { transform: translateX(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ecel-cart-toast { transition: none; } }
@media (max-width: 782px) { .ecel-cart-toast { top: 130px; } }
