/* CART / CHECKOUT PAGE STYLES */

.cart {
	padding: 3rem 2rem 5rem;
}

.cart-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 3rem;
	align-items: flex-start;
}

/* Cart items */
.cart-items {
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
}

.cart-row {
	display: grid;
	grid-template-columns: 88px 1fr auto;
	gap: 1.25rem;
	align-items: center;
	padding: 1.5rem;
	border-bottom: 1px solid var(--brand-off-white);
}

.cart-row:last-child {
	border-bottom: none;
}

.cart-item-image {
	width: 88px;
	height: 88px;
	background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
	border: 1px solid #ebebeb;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cart-item-image svg {
	width: 42px;
	height: 42px;
	stroke: var(--brand-light-gray);
	stroke-width: 1.2;
	fill: none;
}

.cart-item-info {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.cart-item-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--brand-black);
	letter-spacing: 0.03em;
	margin: 0;
	text-decoration: none;
}

.cart-item-name:hover {
	color: var(--brand-primary-red);
}

.cart-item-variant {
	font-size: 0.72rem;
	color: var(--brand-light-gray);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.cart-item-remove {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--brand-medium-gray);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0;
	width: fit-content;
	transition: color 0.2s ease;
}

.cart-item-remove:hover {
	color: var(--brand-primary-red);
}

.cart-item-controls {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.85rem;
}

.cart-item-price {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--brand-dark-gray);
}

.cart-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
}

.cart-qty button {
	width: 34px;
	height: 34px;
	background: none;
	border: none;
	font-size: 1rem;
	color: var(--brand-dark-gray);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.cart-qty button:hover {
	background-color: var(--brand-off-white);
}

.cart-qty input {
	width: 44px;
	height: 34px;
	border: none;
	border-left: 1px solid var(--brand-off-white);
	border-right: 1px solid var(--brand-off-white);
	text-align: center;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--brand-dark-gray);
}

/* Continue shopping */
.cart-actions-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.5rem;
}

.cart-continue {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--brand-primary-red);
	text-decoration: none;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: gap 0.3s ease;
}

.cart-continue:hover {
	gap: 0.85rem;
}

/* Order summary */
.cart-summary {
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
	padding: 1.75rem;
	position: sticky;
	top: 6rem;
}

.cart-summary-title {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--brand-dark-gray);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 0 1.5rem 0;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--brand-off-white);
}

.summary-line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.85rem;
	color: var(--brand-medium-gray);
	margin-bottom: 0.85rem;
}

.summary-line span:last-child {
	font-weight: 600;
	color: var(--brand-dark-gray);
}

.summary-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--brand-black);
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--brand-off-white);
}

.summary-total span:last-child {
	color: var(--brand-primary-red);
}

.cart-summary .btn {
	margin-top: 1.5rem;
}

.promo-field {
	display: flex;
	gap: 0.5rem;
	margin: 1.25rem 0;
}

.promo-field input {
	flex: 1;
	font-family: inherit;
	font-size: 0.8rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
	color: var(--brand-dark-gray);
}

.promo-field input:focus {
	outline: none;
	border-color: var(--brand-primary-red);
}

.promo-field button {
	font-family: inherit;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0 1rem;
	background-color: var(--brand-dark-gray);
	color: var(--brand-white);
	border: none;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.promo-field button:hover {
	background-color: var(--brand-black);
}

.summary-note {
	font-size: 0.7rem;
	color: var(--brand-light-gray);
	text-align: center;
	margin-top: 1rem;
	letter-spacing: 0.03em;
}

/* Empty state */
.cart-empty {
	text-align: center;
	padding: 4rem 1rem;
	border: 1px dashed var(--brand-off-white);
	border-radius: 2px;
}

.cart-empty svg {
	width: 64px;
	height: 64px;
	stroke: var(--brand-light-gray);
	stroke-width: 1.2;
	fill: none;
	margin-bottom: 1.5rem;
}

.cart-empty p {
	color: var(--brand-medium-gray);
	margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
	.cart-layout {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.cart-summary {
		position: static;
	}
}

@media (max-width: 768px) {
	.cart {
		padding: 2rem 1rem 3.5rem;
	}

	.cart-row {
		grid-template-columns: 64px 1fr;
		gap: 1rem;
	}

	.cart-item-controls {
		grid-column: 1 / -1;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		width: 100%;
	}
}

/* =========================================================================
   WooCommerce Cart Block — brand theming (live cart uses the block markup)
   ========================================================================= */

/* Let the cart block breathe instead of the narrow prose column. */
.woocommerce-cart .content-prose {
	max-width: 1120px;
	margin: 0 auto;
}

.woocommerce-cart .wp-block-woocommerce-cart {
	color: var(--brand-dark-gray);
}

/* Primary action buttons (Proceed to Checkout, Apply coupon) → brand red. */
.woocommerce-cart .wc-block-cart__submit-button,
.woocommerce-cart .wc-block-components-button.contained {
	background-color: var(--brand-primary-red) !important;
	color: var(--brand-white) !important;
	border-radius: 2px;
	font-weight: 600;
	letter-spacing: 0.03em;
	transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.woocommerce-cart .wc-block-cart__submit-button:hover,
.woocommerce-cart .wc-block-components-button.contained:hover {
	background-color: #8b0a0e !important;
	box-shadow: 0 8px 16px rgba(187, 13, 18, 0.18);
}

/* Order summary heading. */
.woocommerce-cart .wc-block-cart__totals-title {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	color: var(--brand-dark-gray);
}

/* Grand total value in brand red. */
.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--brand-primary-red);
	font-weight: 700;
}

/* Product name links (were default blue). */
.woocommerce-cart .wc-block-components-product-name {
	color: var(--brand-black);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease;
}

.woocommerce-cart .wc-block-components-product-name:hover {
	color: var(--brand-primary-red);
}

/* Sale / discount badge in brand tint. */
.woocommerce-cart .wc-block-components-sale-badge {
	background-color: rgba(187, 13, 18, 0.08);
	color: var(--brand-primary-red);
	border-radius: 2px;
	font-weight: 600;
}

/* Discounted price emphasis. */
.woocommerce-cart .wc-block-components-product-price__value.is-discounted,
.woocommerce-cart ins.wc-block-components-product-price__value {
	color: var(--brand-primary-red);
	text-decoration: none;
}

/* Quantity selector to match theme inputs. */
.woocommerce-cart .wc-block-components-quantity-selector {
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
}

.woocommerce-cart .wc-block-components-quantity-selector__input:focus {
	outline: none;
}

/* Coupon toggle link accent. */
.woocommerce-cart .wc-block-components-totals-coupon-link,
.woocommerce-cart .wc-block-components-panel__button {
	color: var(--brand-primary-red);
}

/* Text links inside the cart (e.g. remove, continue) use brand red on hover. */
.woocommerce-cart .wc-block-cart__submit-container a,
.woocommerce-cart .wc-block-components-button.wc-block-components-button--text:hover {
	color: var(--brand-primary-red);
}

/* Focus rings / inputs → brand red border. */
.woocommerce-cart .wc-block-components-text-input input:focus,
.woocommerce-cart .wc-block-components-totals-coupon__input input:focus {
	outline: none;
	box-shadow: 0 0 0 1px var(--brand-primary-red);
	border-color: var(--brand-primary-red);
}
