/* ==========================================================
   SareeGenz Cart Redesign — targets the WooCommerce Cart BLOCK
   Scoped to body.woocommerce-cart only.
   ========================================================== */

body.woocommerce-cart {
	background: linear-gradient(180deg, #fdf3f0 0%, #fdf6ee 60%, #fff9f2 100%);
}

body.woocommerce-cart .entry-content,
body.woocommerce-cart .wp-block-post-content,
body.woocommerce-cart main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 20px 60px;
}

/* ---------- Intro ---------- */
.sgz-cart-intro { margin: 10px 0 24px; }
.sgz-eyebrow {
	color: #ec1361;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.sgz-subtitle { color: #8a7b76; margin-top: 6px; font-size: 15px; }

body.woocommerce-cart .wc-block-cart {
	gap: 28px;
}

/* Desktop / tablet: force main cart on the left, order summary pinned to the right */
@media (min-width: 769px) {
	body.woocommerce-cart .wc-block-cart {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: flex-start !important;
	}
	body.woocommerce-cart .wc-block-cart__main {
		flex: 1 1 auto !important;
		order: 1 !important;
		min-width: 0;
	}
	body.woocommerce-cart .wc-block-cart__sidebar {
		flex: 0 0 340px !important;
		width: 340px !important;
		order: 2 !important;
		margin-left: auto;
		position: sticky;
		top: 20px;
	}
}

/* ---------- Items table / list ---------- */
body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart [class*="cart-items"]:not(button) {
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(236, 19, 97, 0.06);
	overflow: hidden;
	border: none !important;
}
body.woocommerce-cart .wc-block-cart-items th {
	background: #fff;
	color: #2a2118;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 1px;
	border-bottom: 1px solid #f3e7e2 !important;
	padding: 12px 14px !important;
}
body.woocommerce-cart .wc-block-cart-items tr,
body.woocommerce-cart [class*="cart-items__row"] {
	border-bottom: 1px solid #f6ece8 !important;
	position: relative;
}

/* ---- compact row spacing ---- */
body.woocommerce-cart .wc-block-cart-items td,
body.woocommerce-cart [class*="cart-item__"] {
	padding: 8px 12px !important;
	vertical-align: middle;
	border: none !important;
}

/* smaller product image */
body.woocommerce-cart [class*="cart-item__image"] img {
	border-radius: 10px !important;
	object-fit: cover;
	width: 60px !important;
	height: 72px !important;
}

/* product name link */
body.woocommerce-cart [class*="cart-item__product-name"] {
	color: #2a2118 !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	text-decoration: none !important;
}

/* truncate description to one line to save height */
body.woocommerce-cart [class*="cart-item__"] p,
body.woocommerce-cart [class*="cart-item__short-description"],
body.woocommerce-cart [class*="cart-item__product-metadata"] {
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12px !important;
	margin: 2px 0 !important;
	max-width: 340px;
}

/* prices */
body.woocommerce-cart [class*="cart-item__prices"],
body.woocommerce-cart [class*="cart-item__total"],
body.woocommerce-cart [class*="formatted-money-amount"] {
	color: #2a2118;
	font-weight: 600;
	font-size: 13px;
}

/* quantity stepper — smaller */
body.woocommerce-cart [class*="quantity-selector"] {
	border: 1px solid #f0d9df !important;
	border-radius: 8px !important;
	overflow: hidden;
	transform: scale(0.9);
	transform-origin: left center;
}
body.woocommerce-cart [class*="quantity-selector__input"] {
	border: none !important;
	text-align: center;
}
body.woocommerce-cart [class*="quantity-selector__button"] {
	background: #fff8f6 !important;
	color: #ec1361 !important;
	border: none !important;
}

/* ---------- Remove control ----------
   Desktop/tablet: default WooCommerce look (icon/link), just tinted.
   Mobile only: small round "×" button, top-right of the row (see media query below). */
body.woocommerce-cart [class*="cart-item__remove-link"] {
	color: #b23b5a !important;
}

/* ---------- Coupon ---------- */
body.woocommerce-cart [class*="totals-coupon"] input {
	border: 1px solid #f0d9df !important;
	border-radius: 10px !important;
	padding: 10px 14px !important;
}
body.woocommerce-cart [class*="totals-coupon"] button:not([class*="link"]) {
	background: linear-gradient(90deg, #ec1361, #1e6fff) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
}

/* ---------- Sidebar / order summary card ---------- */
body.woocommerce-cart .wc-block-cart__sidebar {
	background: #fff;
	border-radius: 18px;
	padding: 22px;
	box-shadow: 0 10px 30px rgba(236, 19, 97, 0.08);
}
body.woocommerce-cart [class*="cart__totals-title"] {
	font-size: 19px !important;
	color: #2a2118 !important;
}
body.woocommerce-cart [class*="totals-item"] {
	color: #5b4d47 !important;
	font-size: 14px !important;
}
body.woocommerce-cart [class*="totals-footer-item"] {
	font-size: 19px !important;
	font-weight: 800 !important;
	color: #2a2118 !important;
	border-top: 1px solid #f3e7e2 !important;
	padding-top: 14px !important;
}

/* checkout button — neon gradient */
body.woocommerce-cart [class*="cart__submit-button"],
body.woocommerce-cart a[class*="wc-block-components-button"][class*="checkout"] {
	display: block !important;
	width: 100% !important;
	text-align: center !important;
	background: linear-gradient(90deg, #ec1361 0%, #1e6fff 100%) !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	padding: 16px !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 22px rgba(236, 19, 97, 0.35);
	border: none !important;
}

/* ---------- Recommended products ---------- */
.sgz-recommend-wrap {
	box-sizing: border-box;
	clear: both;
	margin-top: 30px;
	background: linear-gradient(120deg, #c81d5f, #ec1361 45%, #1e6fff);
	color: #fff;
}
.sgz-recommend-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 34px;
	box-sizing: border-box;
}
.sgz-eyebrow-light {
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	opacity: 0.85;
	font-weight: 700;
}
.sgz-recommend-banner h2 { font-size: 28px; margin: 10px 0 6px; color:#fff; }
.sgz-recommend-banner p { opacity: 0.9; margin-bottom: 16px; }
.sgz-explore-btn {
	display: inline-block;
	background: #fff;
	color: #ec1361 !important;
	font-weight: 700;
	padding: 12px 22px;
	border-radius: 10px;
	text-decoration: none !important;
}

.sgz-recommend-grid {
	margin-top: 26px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.sgz-rec-card {
	background: #fff;
	border-radius: 14px;
	padding: 14px 14px 18px;
	text-decoration: none !important;
	color: #2a2118 !important;
	display: block;
	transition: transform .15s ease, box-shadow .15s ease;
	box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.sgz-rec-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0,0,0,0.14);
}
.sgz-rec-img { position: relative; border-radius: 10px; overflow: hidden; }
.sgz-rec-img img { width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; display: block; border-radius: 10px; }
.sgz-rec-heart {
	position: absolute;
	top: 8px;
	right: 8px;
	background: #fff;
	border-radius: 50%;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #ec1361;
}
.sgz-rec-heart { display: none !important; }
.sgz-rec-name {
	margin-top: 12px;
	font-weight: 600;
	font-size: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 38px;
}
.sgz-rec-price { color: #ec1361; font-weight: 700; margin-top: 6px; }

/* ==========================================================
   Mobile
   ========================================================== */
@media (max-width: 768px) {
	body.woocommerce-cart .wc-block-cart { flex-direction: column; }
	body.woocommerce-cart .wc-block-cart-items thead { display: none; }
	body.woocommerce-cart [class*="cart-items__row"] {
		display: flex;
		flex-wrap: wrap;
		position: relative;
		padding: 10px;
	}
	.sgz-recommend-grid { grid-template-columns: repeat(2, 1fr); }

	/* Mobile-only: round "×" remove button, top-right of the row */
	body.woocommerce-cart [class*="cart-item__remove-link"] {
		position: absolute !important;
		top: 10px;
		right: 10px;
		width: 24px !important;
		height: 24px !important;
		padding: 0 !important;
		border-radius: 50% !important;
		background: #fdeef1 !important;
		border: none !important;
		font-size: 0 !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		text-decoration: none !important;
	}
	body.woocommerce-cart [class*="cart-item__remove-link"]::before {
		content: "\00d7";
		font-size: 16px;
		line-height: 1;
		font-weight: 700;
	}
	body.woocommerce-cart [class*="cart-item__remove-link"] svg { display: none !important; }
}

/* Full-bleed breakout: works regardless of any max-width ancestor container.
   Uses the 100vw + negative-margin technique anchored to 50%. This only
   fully reaches the viewport edges if no ancestor between <body> and this
   element clips overflow — many themes set `overflow-x: hidden` (or the
   shorthand `overflow: hidden`) on a wrapper like #page, .site,
   .site-content, .wp-site-blocks, main, etc. to prevent accidental
   horizontal scrollbars. We force those known wrapper patterns back to
   visible, scoped to the cart page only, so the breakout isn't clipped. */
html { overflow-x: hidden; }
body.woocommerce-cart { overflow-x: hidden; }
body.woocommerce-cart #page,
body.woocommerce-cart #content,
body.woocommerce-cart #wrapper,
body.woocommerce-cart .site,
body.woocommerce-cart .site-content,
body.woocommerce-cart .content-area,
body.woocommerce-cart .wp-site-blocks,
body.woocommerce-cart .wp-block-group,
body.woocommerce-cart .ast-container,
body.woocommerce-cart .ast-woocommerce-container,
body.woocommerce-cart main,
body.woocommerce-cart #main,
body.woocommerce-cart #primary,
body.woocommerce-cart article,
body.woocommerce-cart .hentry,
body.woocommerce-cart .entry-content,
body.woocommerce-cart .wp-block-post-content {
	overflow-x: visible !important;
}
/* Belt-and-suspenders fallback: if a theme-specific wrapper isn't covered
   above, this catches it without touching vertical overflow (so truncated
   text / scrollable widgets elsewhere on the page still work normally).
   !important here matters: without it, Astra's own dynamic CSS (which also
   targets .ast-container etc. with equal specificity) can load after ours
   and silently win the tie, which is what was happening before. */
body.woocommerce-cart * {
	overflow-x: visible !important;
}

.sgz-recommend-wrap {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-radius: 0;
}

/* Desktop/tablet spacing */
@media (min-width: 769px) {
	.sgz-recommend-inner { padding: 60px 40px; }
	.sgz-recommend-grid { gap: 28px; }
}

/* Extra breathing room on wide desktop screens */
@media (min-width: 1400px) {
	.sgz-recommend-inner { max-width: 1320px; padding: 70px 40px; }
	.sgz-recommend-grid { gap: 32px; }
}
