/* ============================================================
   Cart page (woocommerce/cart/cart.php + cart-totals.php)
   Ported from the Skye Athletic cart design (cart-static.html).
   ============================================================ */

/* page.php prints the page title + breadcrumbs; the design has its own. */
body.woocommerce-cart .sky-generic-page__head,
body.woocommerce-cart .sky-breadcrumbs { display: none; }
body.woocommerce-cart .sky-generic-page { background: #faf9f6; }

.sky-cart {
	--ink: #0a0a0a;
	--ink-2: #1a1a1a;
	--yellow: #fdc502;
	--muted: #565659;
	--line: rgba(0, 0, 0, .06);
	font-family: 'Montserrat', sans-serif;
	color: var(--ink);
	padding: 16px 0 40px;
}
:where(.sky-cart) *, :where(.sky-cart) *::before, :where(.sky-cart) *::after { box-sizing: border-box; }
:where(.sky-cart) :where(h1, h2, h3, p) { margin: 0; }
.sky-cart svg { display: block; flex: none; }
.sky-cart a { text-decoration: none; }

.sky-cart__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) 400px;
	gap: 40px;
	align-items: start;
}
.sky-cart__main,
.sky-cart__side { min-width: 0; }

/* ---------- Payment process banner ---------- */
.sky-cart__banner {
	border: 1px solid var(--yellow);
	border-radius: 8px;
	padding: 24px;
	background: #fff;
	margin-bottom: 40px;
}
.sky-cart__banner-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px !important;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ink);
}
.sky-cart__banner-title svg { width: 15px; height: 15px; color: var(--yellow); }
.sky-cart__banner p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- Title ---------- */
.sky-cart__step {
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 8px !important;
}
.sky-cart__title {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 500;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ink);
	margin-bottom: 32px !important;
	line-height: 1.1;
}

/* ---------- Items ---------- */
.sky-cart-item {
	display: grid;
	grid-template-columns: 100px minmax(0, 1fr) auto;
	gap: 24px;
	padding: 24px 0;
	border-bottom: 1px solid var(--line);
}
.sky-cart-item:first-child { padding-top: 0; }
.sky-cart__items > .sky-cart-item:last-of-type { border-bottom: 0; }

.sky-cart-item__thumb {
	width: 100px;
	height: 100px;
	border-radius: 8px;
	background: #f4f5f9;
	overflow: hidden;
	display: grid;
	place-items: center;
}
.sky-cart-item__thumb a { display: block; width: 100%; height: 100%; }
.sky-cart-item__thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	border-radius: 0 !important;
	display: block;
}

.sky-cart-item__details { min-width: 0; }
.sky-cart-item__title {
	font-family: 'Inter', sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ink);
	margin-bottom: 6px !important;
}
.sky-cart-item__title a { color: inherit; }
.sky-cart-item__title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.sky-cart-item__meta {
	display: flex;
	flex-direction: column;
	font-size: 14px;
	line-height: 1.65;
	color: var(--muted);
}
.sky-cart-item__meta .woocommerce-Price-amount { font-weight: 500; }
.sky-cart-item__more summary {
	cursor: pointer;
	width: max-content;
	font-size: 12px;
	font-weight: 600;
	color: var(--ink);
	margin: 2px 0;
}
.sky-cart-item__more[open] summary { margin-bottom: 2px; }
/* One option per line — only the option rows, not the price pieces inside them. */
.sky-cart-item__more > span { display: block; }
.sky-cart-item__more > span span { display: inline; }
.sky-cart-item__more summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.sky-cart-item__more summary::-webkit-details-marker { display: none; }
.sky-cart-item__more summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; margin-right: 2px; }
.sky-cart-item__more[open] summary::before { transform: rotate(45deg); }
.sky-cart-item .backorder_notification { font-size: 12px; color: #8a6400; margin-top: 6px; }

/* Quantity pill */
.sky-cart-item__qty { margin-top: 16px; }
.sky-qty {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 100px;
	background: #f4f5f9;
}
.sky-qty__btn {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ink);
	cursor: pointer;
	padding: 0;
}
.sky-qty__btn:hover { background: rgba(10,10,10, .08); }
.sky-qty__btn svg { width: 15px; height: 15px; }
.sky-qty .quantity { margin: 0; }
.sky-qty .quantity input.qty {
	width: 34px;
	height: 30px;
	border: 0;
	background: transparent;
	text-align: center;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--ink);
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}
.sky-qty .quantity input.qty::-webkit-outer-spin-button,
.sky-qty .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sky-qty .quantity input.qty:focus { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.sky-qty .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sky-qty--fixed { padding: 4px 14px; }

/* Price + actions */
.sky-cart-item__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
}
.sky-cart-item__price {
	font-family: 'Inter', sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: var(--ink);
	white-space: nowrap;
	margin-bottom: 10px;
}
.sky-cart-item__price small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.sky-cart-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
	cursor: pointer;
	transition: color .2s ease;
}
.sky-cart-action svg { width: 15px; height: 15px; }
.sky-cart-action:hover { color: var(--ink); }
.sky-cart-action:disabled { opacity: .45; cursor: default; color: var(--muted); }
.sky-cart .product-remove a.remove.sky-cart-action {
	/* WooCommerce styles a.remove as a red round "×" — undo that here. */
	width: auto;
	height: auto;
	border-radius: 0;
	font-size: 12px;
	line-height: inherit;
	color: var(--muted) !important;
	background: none !important;
	font-weight: 600;
	text-align: left;
	display: inline-flex;
}
.sky-cart .product-remove a.remove.sky-cart-action:hover { color: #c62828 !important; }

/* The form's own "Update cart" button: kept for WooCommerce + keyboard,
   pressed for you by the − / + buttons. */
.sky-cart__actions { position: relative; }
.sky-cart__update-all {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
	padding: 0;
}

/* ---------- Order summary panel ---------- */
.sky-cart__side { position: sticky; top: calc(var(--header-h, 90px) + 24px); }
.sky-cart .cart-collaterals { width: auto; float: none; }
.sky-summary {
	width: 100% !important;
	float: none !important;
	background: var(--ink);
	color: #fff;
	border-radius: 10px;
	padding: 36px 32px;
	box-shadow: 0 8px 28px rgba(10,10,10, .18);
}
.sky-summary__eyebrow {
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .55);
	margin-bottom: 4px !important;
}
.sky-summary__title {
	font-family: 'Montserrat', sans-serif;
	font-size: 28px;
	font-weight: 600;
	text-transform: uppercase;
	color: #fff;
	margin-bottom: 28px !important;
	line-height: 1.15;
}
.sky-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .12);
	font-size: 15px;
}
.sky-summary__rows .sky-summary__row:last-child { border-bottom: 0; }
.sky-summary__row .sky-summary__label { font-weight: 600; color: rgba(255, 255, 255, .8); }
.sky-summary__value { font-family: 'Inter', sans-serif; font-weight: 700; color: #fff; text-align: right; }
.sky-summary__value--soft { font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 13px; color: rgba(255, 255, 255, .6); }
.sky-summary__value small,
.sky-summary__value .includes_tax { display: block; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .55); }
.sky-summary .woocommerce-remove-coupon { color: var(--yellow); font-size: 12px; font-weight: 600; margin-left: 6px; }
.sky-summary__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 12px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, .12);
}
.sky-summary__total .sky-summary__label { font-size: 18px; font-weight: 700; color: #fff; }
.sky-summary__total .sky-summary__value { font-size: 24px; color: var(--yellow); }
.sky-summary__total .sky-summary__value strong { font-weight: 700; }

.sky-summary__coupon { margin-top: 26px; }
.sky-summary__coupon-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .8);
	margin-bottom: 12px;
}
.sky-summary__coupon-field {
	display: flex;
	align-items: center;
	background: var(--ink-2);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 8px;
	padding: 6px;
}
.sky-summary__coupon-field input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	padding: 12px 14px !important;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px;
	color: #fff !important;
	outline: none;
}
.sky-summary__coupon-field input::placeholder { color: rgba(255, 255, 255, .45); }
.sky-summary__coupon-field button {
	border: 0;
	background: none;
	padding: 10px 16px;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .8);
	cursor: pointer;
}
.sky-summary__coupon-field button:hover { color: #fff; }
.sky-summary__coupon-field:focus-within { border-color: rgba(255, 255, 255, .4); }

.sky-summary__checkout { margin-top: 28px; padding: 0 !important; }
.sky-summary__btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 20px !important;
	border-radius: 8px;
	background: var(--yellow) !important;
	color: var(--ink) !important;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px !important;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	transition: filter .2s ease, transform .2s ease;
	margin: 0 !important;
}
.sky-summary__btn svg { width: 18px; height: 18px; }
.sky-summary__btn:hover { filter: brightness(.95); transform: translateY(-1px); }

/* ---------- Cross-sells ---------- */
.sky-cart__cross { margin-top: 72px; }
.sky-cart__cross-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}
.sky-cart__cross-head h2 {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 500;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ink);
}
.sky-cart .sky-product-grid--4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

/* ---------- Empty cart ---------- */
body.woocommerce-cart .cart-empty.woocommerce-info { margin: 24px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	/* minmax(0, 1fr): a long cart line can no longer push the column wider than a small phone. */
	.sky-cart__layout { grid-template-columns: minmax(0, 1fr); }
	.sky-cart__side { position: static; }
	.sky-cart .sky-product-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.sky-cart__banner { padding: 18px; margin-bottom: 28px; }
	.sky-cart-item { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; }
	.sky-cart-item__thumb { width: 80px; height: 80px; }
	.sky-cart-item__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		gap: 18px;
	}
	.sky-cart-item__price { margin: 0 auto 0 0; font-size: 19px; }
	.sky-summary { padding: 26px 20px; }
	.sky-summary__title { font-size: 24px; }
	.sky-cart .sky-product-grid--4 { gap: 14px; }
	.sky-cart__cross { margin-top: 48px; }
}

/* Update / Edit / Remove line up: one column with the icons in a line
   (desktop), one even row next to the price (phone). */
.sky-cart-item__actions .sky-cart-action,
.sky-cart .product-remove a.remove.sky-cart-action { line-height: 1; height: 20px; }
.sky-cart-item__actions .product-remove { display: inline-flex; line-height: 1; }
@media (min-width: 601px) {
	.sky-cart-item__actions {
		display: grid;
		grid-template-columns: max-content;
		justify-content: end;
		align-content: start;
		row-gap: 14px;
	}
	.sky-cart-item__actions > * { justify-self: start; }
	.sky-cart-item__actions > .sky-cart-item__price { justify-self: end; }
}
@media (max-width: 600px) {
	.sky-cart-item__actions { flex-wrap: nowrap; gap: 14px; }
	.sky-cart-item__actions .sky-cart-action { letter-spacing: .04em; gap: 6px; }
}
/* Very small phones: price on its own line, the three actions under it. */
@media (max-width: 360px) {
	.sky-cart-item__actions { flex-wrap: wrap; justify-content: flex-start; row-gap: 10px; }
	.sky-cart-item__price { flex-basis: 100%; }
}
