/* ============================================================
   GoLo Winch — Cart page  (WooCommerce Cart block)
   Presentation only. Brand palette matches the header / drawer.
   ============================================================ */

.wp-block-woocommerce-cart {
	--gh-accent:   var(--e-global-color-accent, #ff5600);
	--gh-accent-2: var(--e-global-color-secondary, #ff5600);
	--gh-ink:      var(--e-global-color-text, #181b22);
	--gh-muted:    #69707c;
	--gh-line:     #e5e8ed;
	--gh-line-2:   #eef1f4;
	--gh-mist:     #f6f7f9;
	--gh-radius:   5px;
	font-family: var(--e-global-typography-primary-font-family, system-ui, sans-serif);
	color: var(--gh-ink);
}

/* Spacing at the top of the page + breathing room between the columns */
.wp-block-woocommerce-cart {
	padding-top: 44px;
}
.wp-block-woocommerce-cart .wc-block-cart {
	gap: 40px;
}

/* ---- Two-column layout: items + sticky order summary ----
   WooCommerce only places the summary beside the items once its container query
   measures the cart wrapper at ≥700px. On this theme the wrapper is narrower, so
   the summary drops underneath. Re-assert the side-by-side layout on wide screens. */
@media (min-width: 992px) {
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: flex-start;
	}
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart__main {
		width: auto;
		flex: 1 1 auto;
		min-width: 0;
		/* keep the card's own L/R padding and override WooCommerce's inter-column
		   gutter (padding-right:4.52%) — column spacing is handled by `gap` instead */
		padding: 8px 28px;
	}
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart__sidebar {
		width: 366px;
		flex: 0 0 366px;
	}

	/* Items render as a proper table on wide screens. WooCommerce collapses the
	   rows into a stacked grid via the same <700px container query, so re-assert
	   the table layout here too (kept in lock-step with the forced columns). */
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart-items__header {
		display: table-row;
	}
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout table.wc-block-cart-items .wc-block-cart-items__row {
		display: table-row;
	}
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout table.wc-block-cart-items .wc-block-cart-items__row > td {
		display: table-cell;
		grid-column: auto;
		grid-row: auto;
		vertical-align: top;
		padding-left: 16px;
	}
	.wp-block-woocommerce-cart .wc-block-components-sidebar-layout table.wc-block-cart-items .wc-block-cart-item__remove-link {
		display: block;
	}
}

/* items card */
.wp-block-woocommerce-cart .wc-block-cart__main {
	padding: 8px 28px;
	background: #fff;
	border: 1px solid var(--gh-line);
	border-radius: var(--gh-radius);
	box-shadow: 0 1px 2px rgba(15, 20, 40, .04);
}

/* sticky order-summary card */
.wp-block-woocommerce-cart .wc-block-cart__sidebar {
	position: sticky;
	top: 24px;
	align-self: flex-start;
	background: var(--gh-mist);
	border: 1px solid var(--gh-line);
	border-radius: var(--gh-radius);
	padding: 10px 26px 26px;
}
/* the order-summary block sits flush inside our card — drop its own chrome */
.wp-block-woocommerce-cart .wc-block-cart__sidebar .wc-block-components-sidebar {
	background: transparent;
	border: 0;
	padding: 0;
}

/* ============================================================
   Items table
   ============================================================ */
.wp-block-woocommerce-cart table.wc-block-cart-items {
	border: 0;
	margin: 0;
}
.wp-block-woocommerce-cart .wc-block-cart-items__header {
	color: var(--gh-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-bottom: 2px solid var(--gh-line);
}
.wp-block-woocommerce-cart .wc-block-cart-items__row {
	border-bottom: 1px solid var(--gh-line-2);
	transition: background-color .15s ease;
}
.wp-block-woocommerce-cart .wc-block-cart-items__row:hover {
	background: var(--gh-mist);
}
.wp-block-woocommerce-cart .wc-block-cart-items__row:last-child {
	border-bottom: 0;
}
.wp-block-woocommerce-cart .wc-block-cart-items__row td {
	padding-top: 24px;
	padding-bottom: 24px;
}
/* round the row's leading/trailing cells so the hover highlight looks like a card */
.wp-block-woocommerce-cart .wc-block-cart-items__row td:first-child {
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}
.wp-block-woocommerce-cart .wc-block-cart-items__row td:last-child {
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
}

/* product thumbnail — framed tile */
.wp-block-woocommerce-cart td.wc-block-cart-item__image {
	width: 104px;
}
.wp-block-woocommerce-cart .wc-block-cart-item__image img {
	width: 88px;
	height: 88px;
	object-fit: contain;
	padding: 6px;
	border: 1px solid var(--gh-line-2);
	border-radius: 5px;
	background: #fff;
}

/* product name + meta.
   NB: WooCommerce styles these with `table.wc-block-cart-items
   .wc-block-cart-items__row .wc-block-components-product-name` (specificity
   0,3,1), so the item-text rules below carry the same ancestor prefix to win. */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	color: var(--gh-ink);
	font-weight: 700;
	font-size: 15.5px;
	line-height: 1.35;
	text-decoration: none;
	max-width: none;
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row a.wc-block-components-product-name:hover {
	color: var(--gh-accent-2);
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata {
	color: var(--gh-muted);
	font-size: 13px;
	margin-top: 4px;
}
/* hide the product short description in the cart list */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata__description {
	display: none;
}

/* remove link */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link {
	color: var(--gh-muted);
	font-size: 12.5px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	text-underline-offset: 2px;
	transition: color .15s ease;
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__remove-link:hover {
	color: var(--gh-accent);
}

/* prices */
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices .wc-block-components-product-price__value {
	color: var(--gh-muted);
	font-weight: 600;
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-product-price__value {
	color: var(--gh-ink);
	font-weight: 800;
	font-size: 16px;
}
.wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-price__regular {
	color: var(--gh-muted);
}

/* ---- Quantity selector ---- */
.wp-block-woocommerce-cart .wc-block-components-quantity-selector {
	border: 1.5px solid var(--gh-line);
	border-radius: 5px;
	max-width: 116px;
	overflow: hidden;
	background: #fff;
}
.wp-block-woocommerce-cart .wc-block-components-quantity-selector__input {
	color: var(--gh-ink);
	font-weight: 700;
	font-size: 14px;
}
.wp-block-woocommerce-cart .wc-block-components-quantity-selector__button {
	color: var(--gh-muted);
	font-size: 18px;
	font-weight: 600;
	transition: color .15s ease, background-color .15s ease;
}
.wp-block-woocommerce-cart .wc-block-components-quantity-selector__button:hover {
	color: var(--gh-accent);
	background: var(--gh-mist);
}
/* keep the divider lines subtle */
.wp-block-woocommerce-cart .wc-block-components-quantity-selector__button--minus {
	border-right: 1px solid var(--gh-line-2);
}
.wp-block-woocommerce-cart .wc-block-components-quantity-selector__button--plus {
	border-left: 1px solid var(--gh-line-2);
}

/* ============================================================
   Order summary sidebar
   ============================================================ */
.wp-block-woocommerce-cart .wc-block-cart__totals-title {
	color: var(--gh-muted);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.wp-block-woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
	background: transparent;
}

/* totals rows */
.wp-block-woocommerce-cart .wc-block-components-totals-item {
	color: var(--gh-ink);
	font-size: 14.5px;
}
.wp-block-woocommerce-cart .wc-block-components-totals-item__label {
	font-weight: 600;
}
.wp-block-woocommerce-cart .wc-block-components-totals-wrapper {
	border-top-color: var(--gh-line);
}

/* grand total */
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-weight: 800;
	font-size: 16px;
}
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--gh-accent-2);
	font-weight: 800;
	font-size: 22px;
}

/* discount line */
.wp-block-woocommerce-cart .wc-block-components-totals-discount__coupon-list-item,
.wp-block-woocommerce-cart .wc-block-components-totals-discount .wc-block-components-totals-item__value {
	color: var(--gh-accent);
	font-weight: 700;
}

/* ---- Coupon form ---- */
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__input input {
	border: 1.5px solid var(--gh-line);
	border-radius: 5px;
	background: #fff;
}
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__input.is-active label,
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__input input:focus {
	border-color: var(--gh-accent);
}
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__button {
	border-radius: 5px;
	font-weight: 700;
}

/* ============================================================
   Buttons
   ============================================================ */
.wp-block-woocommerce-cart .wc-block-components-button {
	border-radius: 5px;
	font-weight: 700;
	letter-spacing: .01em;
	transition: background-color .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
}

/* Proceed to checkout — primary accent */
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button {
	background: var(--gh-accent);
	color: #fff;
	box-shadow: 0 8px 18px -8px rgba(226, 98, 44, .65);
	padding-top: 15px;
	padding-bottom: 15px;
	font-size: 15px;
}
.wp-block-woocommerce-cart .wc-block-cart__submit-button:hover,
.wp-block-woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button:hover {
	background: var(--gh-accent-2);
	transform: translateY(-1px);
	box-shadow: 0 12px 22px -8px rgba(226, 98, 44, .7);
}

/* Coupon "Apply" and other secondary (outlined) buttons */
.wp-block-woocommerce-cart .wc-block-components-button.outlined {
	color: var(--gh-accent);
	box-shadow: inset 0 0 0 1.5px var(--gh-line);
}
.wp-block-woocommerce-cart .wc-block-components-button.outlined:hover {
	box-shadow: inset 0 0 0 1.5px var(--gh-accent);
	color: var(--gh-accent-2);
}

/* ============================================================
   Cross-sell / "you may also like" collection
   ============================================================ */
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection,
.wp-block-woocommerce-cart .wc-block-product-template {
	margin-top: 8px;
}
.wp-block-woocommerce-cart .wc-block-product-template .wc-block-components-product-image img,
.wp-block-woocommerce-cart li.product img {
	border-radius: 5px;
}
.wp-block-woocommerce-cart .wp-block-woocommerce-product-button .wp-block-button__link,
.wp-block-woocommerce-cart .wc-block-components-product-button .wc-block-components-product-button__button {
	background: var(--gh-accent);
	color: #fff;
	border-radius: 5px;
	font-weight: 700;
	transition: background-color .15s ease;
}
.wp-block-woocommerce-cart .wp-block-woocommerce-product-button .wp-block-button__link:hover,
.wp-block-woocommerce-cart .wc-block-components-product-button .wc-block-components-product-button__button:hover {
	background: var(--gh-accent-2);
}

/* ============================================================
   Empty cart state — header + "New in store" grid
   ============================================================ */
.wp-block-woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	max-width: 1180px;
	margin-inline: auto;
	padding: 56px 0 72px;
}

/* the icon line ("Your cart is currently empty!") — swap WC's sad-face for a
   branded cart glyph inside an accent badge, then the heading below it */
.wp-block-woocommerce-cart .wc-block-cart__empty-cart__title {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	margin: 0 auto 8px;
	color: var(--gh-ink);
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -.01em;
	text-align: center;
}
.wp-block-woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	content: "";
	width: 92px;
	height: 92px;
	margin: 0;
	background: rgba(226, 98, 44, .1);
	border-radius: 50%;
	-webkit-mask: none;
	mask: none;
	display: grid;
	place-items: center;
	/* cart glyph drawn as an inline SVG background, tinted accent */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23e2622c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

/* dotted separator → clean subtle rule */
.wp-block-woocommerce-cart .wp-block-woocommerce-empty-cart-block hr.wp-block-separator {
	max-width: 1180px;
	margin: 40px auto 8px;
	border: 0;
	border-top: 1px solid var(--gh-line);
	background: none;
}
.wp-block-woocommerce-cart .wp-block-woocommerce-empty-cart-block hr.wp-block-separator::before { content: none; }

/* "New in store" section heading */
.wp-block-woocommerce-cart .wp-block-woocommerce-empty-cart-block > h2.wp-block-heading {
	margin: 36px 0 24px;
	color: var(--gh-ink);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.01em;
	text-align: center;
}

/* ---- "New in store" product grid → shop-style cards ---- */
.wp-block-woocommerce-cart .wc-block-grid__products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.wp-block-woocommerce-cart li.wc-block-grid__product {
	display: flex;
	flex-direction: column;
	/* WC sets width/flex-basis:25% on each product (for its own flex grid);
	   inside our CSS grid that would shrink each card to 25% of its track —
	   force it to fill the grid cell instead */
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid var(--gh-line);
	border-radius: 5px;
	overflow: hidden;
	text-align: left !important;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.wp-block-woocommerce-cart li.wc-block-grid__product:hover {
	transform: translateY(-4px);
	border-color: #d9dee6;
	box-shadow: 0 18px 40px -22px rgba(20, 28, 45, .35);
}
.wp-block-woocommerce-cart .wc-block-grid__product-link { display: block; text-decoration: none; }

/* image frame — fixed square, contained, no crop.
   WC sets this to display:inline-block which collapses to 0×0 once the <img>
   inside is absolutely positioned — force a full-width block. */
.wp-block-woocommerce-cart .wc-block-grid__product-image {
	display: block !important;
	width: 100%;
	aspect-ratio: 1 / 1;
	position: relative;
	margin: 0;
	background: #fff;
	overflow: hidden;
}
.wp-block-woocommerce-cart .wc-block-grid__product-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 14px;
	transition: transform .5s ease;
}
.wp-block-woocommerce-cart li.wc-block-grid__product:hover .wc-block-grid__product-image img {
	transform: scale(1.06);
}

/* title — 2-line clamp so cards line up */
.wp-block-woocommerce-cart .wc-block-grid__product-title {
	margin: 0;
	padding: 14px 14px 0;
	color: var(--gh-ink);
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.35em * 2 + 14px);
	transition: color .15s ease;
}
.wp-block-woocommerce-cart li.wc-block-grid__product:hover .wc-block-grid__product-title { color: var(--gh-accent-2); }

/* price */
.wp-block-woocommerce-cart .wc-block-grid__product-price {
	margin: 0;
	padding: 6px 14px 0;
	color: var(--gh-ink);
	font-weight: 800;
	font-size: 16px;
}
.wp-block-woocommerce-cart .wc-block-grid__product-price .amount { color: var(--gh-ink); }
.wp-block-woocommerce-cart .wc-block-grid__product-price del,
.wp-block-woocommerce-cart .wc-block-grid__product-price del .amount {
	color: var(--gh-muted);
	font-weight: 500;
	font-size: 13px;
}
.wp-block-woocommerce-cart .wc-block-grid__product-price ins,
.wp-block-woocommerce-cart .wc-block-grid__product-price ins .amount {
	text-decoration: none;
	color: var(--gh-accent-2);
}

/* add-to-cart — full-width orange button pinned to the bottom.
   The .wp-block-button container is inline-block by default, so force it to a
   full-width block or the inner link's width:100% only fills the text. */
.wp-block-woocommerce-cart .wc-block-grid__product-add-to-cart {
	display: block !important;
	width: auto !important;
	margin: 12px 0 0 !important;
	padding: 0 14px 14px;
}
.wp-block-woocommerce-cart .wc-block-grid__product-add-to-cart a,
.wp-block-woocommerce-cart .wc-block-grid__product-add-to-cart button {
	display: block !important;
	width: 100% !important;
	text-align: center;
	padding: 11px 16px !important;
	border: 0 !important;
	border-radius: 5px !important;
	background: var(--gh-accent) !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: background-color .15s ease;
}
.wp-block-woocommerce-cart .wc-block-grid__product-add-to-cart a:hover,
.wp-block-woocommerce-cart .wc-block-grid__product-add-to-cart button:hover {
	background: var(--gh-accent-2) !important;
}

/* rating stars (if shown) */
.wp-block-woocommerce-cart .wc-block-grid__product-rating .star-rating span::before { color: var(--gh-accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
	.wp-block-woocommerce-cart .wc-block-cart__sidebar {
		position: static;
	}
}
@media (max-width: 600px) {
	.wp-block-woocommerce-cart .wc-block-cart__main {
		padding: 4px 16px;
	}
	.wp-block-woocommerce-cart .wc-block-cart__sidebar > .is-large {
		padding: 8px 18px 20px;
	}
}

/* ============================================================
   Tablet & mobile side gutter — Blocksy's container is full-bleed
   on this site (edge spacing disabled), so give the cart block the
   same 20px left/right padding the Elementor-built pages use.
   ============================================================ */
@media (max-width: 1024px) {
	body.woocommerce-cart .entry-content {
		padding-left: 20px;
		padding-right: 20px;
	}
}
