/**
 * NeoYug cart page.
 * Brand: purple #8D22C3, orange #E96F46, deep purple #261A48, cream #FAF9F6.
 * Global site font (inherit), so the cart reads seamlessly with the catalog.
 * Scoped to the .nyc-cart wrapper the template always prints, so styling
 * applies wherever the cart renders (no dependency on is_cart() or a body class).
 */
.nyc-cart{
	--nyc-purple:#8D22C3;
	--nyc-orange:#E96F46;
	--nyc-deep:#261A48;
	--nyc-cream:#FAF9F6;
	--nyc-line:rgba(38,26,72,.12);
	--nyc-radius:16px;
}

/* Let the cart breathe; the theme's page wrapper keeps the site chrome. */
.nyc-cart{
	max-width:1120px;margin:0 auto;padding:8px 4px 64px;
	color:var(--nyc-deep);
}
.nyc-cart .nyc-cart-title{
	font-weight:700;font-size:34px;line-height:1.1;margin:6px 0 26px;letter-spacing:.01em;
	color:var(--nyc-purple);
}

/* Hide the theme's own page title ("Cart") so it isn't shown twice next to our
   "Your cart". This rule ships with the cart CSS, which loads only where our
   template renders, so it never affects other pages. */
.woocommerce-products-header__title.page-title,
.entry-header .entry-title.page-title{display:none;}

/* Layout */
.nyc-cart,
.nyc-cart *,
.nyc-cart *::before,
.nyc-cart *::after{box-sizing:border-box;}
.nyc-cart{width:100%;max-width:min(1120px,100%);}

.nyc-cart .nyc-cart-grid{
	display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:32px;align-items:start;
}
/* Grid/flex children default to min-width:auto, which lets a long title or a
   fixed-width child push the track wider than the viewport. Pin them to 0 so
   the track can actually shrink. */
.nyc-cart .nyc-cart-grid > *{min-width:0;}

/* The collapse to one column. This was scoped to `body.nyc-cart-page` — a class
   that is NEVER added on NeoYug (is_cart() is false on /cart/, see the header
   note in class-nyc-cart.php), so the 400px summary column stayed on phones and
   pushed the whole grid off-screen. Scoped to .nyc-cart like every other rule. */
@media(max-width:900px){
	.nyc-cart .nyc-cart-grid{grid-template-columns:minmax(0,1fr);gap:20px;}
	.nyc-cart .nyc-summary{position:static;top:auto;}
}

/* ---------- Line items ---------- */
.nyc-cart .nyc-cart-lines{display:flex;flex-direction:column;gap:14px;}
.nyc-cart .nyc-line{
	display:grid;grid-template-columns:128px minmax(0,1fr);gap:18px;align-items:center;
	background:#fff;border:1px solid var(--nyc-line);border-radius:var(--nyc-radius);padding:16px;
	box-shadow:0 1px 2px rgba(38,26,72,.04),0 10px 28px rgba(38,26,72,.05);
}
.nyc-cart .nyc-line > *{min-width:0;}
.nyc-cart .nyc-line-thumb{
	width:128px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--nyc-cream);
}
.nyc-cart .nyc-line.is-event .nyc-line-thumb{aspect-ratio:4/5;}
.nyc-cart .nyc-line-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.nyc-cart .nyc-line-kind{
	font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
	color:var(--nyc-purple);margin-bottom:5px;
}
.nyc-cart .nyc-line-name{font-weight:600;font-size:16px;line-height:1.35;margin-bottom:4px;overflow-wrap:anywhere;}
.nyc-cart .nyc-line-mentor{font-size:13px;opacity:.6;margin-bottom:10px;}
.nyc-cart .nyc-line-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.nyc-cart .nyc-line-price{
	font-weight:600;font-size:17px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--nyc-deep);
}
.nyc-cart .nyc-line-price del{opacity:.5;font-weight:500;margin-right:6px;}
.nyc-cart .nyc-line-remove{
	font-size:12px;font-weight:500;color:var(--nyc-deep);opacity:.5;text-decoration:none;
	white-space:nowrap;flex:0 0 auto;
}
.nyc-cart .nyc-line-remove:hover{opacity:.9;color:var(--nyc-orange);}

/* Phones: smaller thumb + tighter padding so the card fits a 360px viewport. */
@media(max-width:560px){
	.nyc-cart{padding-left:2px;padding-right:2px;}
	.nyc-cart .nyc-cart-title{font-size:28px;margin-bottom:18px;}
	.nyc-cart .nyc-line{grid-template-columns:92px minmax(0,1fr);gap:12px;padding:12px;}
	.nyc-cart .nyc-line-thumb{width:92px;}
	.nyc-cart .nyc-line-name{font-size:15px;}
	.nyc-cart .nyc-line-foot{gap:8px;flex-wrap:wrap;}
	.nyc-cart .nyc-summary{padding:18px;}
}

/* ---------- Summary card ---------- */
.nyc-cart .nyc-summary{
	background:#fff;border:1px solid var(--nyc-line);border-radius:var(--nyc-radius);
	padding:24px;position:sticky;top:24px;
	box-shadow:0 1px 2px rgba(38,26,72,.04),0 10px 28px rgba(38,26,72,.06);
}
.nyc-cart .nyc-summary h2{font-weight:700;font-size:20px;margin:0 0 16px;color:var(--nyc-deep);}
.nyc-cart .nyc-coupon{display:flex;gap:8px;margin:0 0 18px;}
.nyc-cart .nyc-coupon-input{
	flex:1;min-width:0;height:46px;border:1px solid var(--nyc-line);border-radius:12px;padding:0 14px;
	font:inherit;font-size:14px;color:var(--nyc-deep);background:#fff;
}
.nyc-cart .nyc-coupon-input:focus{outline:0;border-color:var(--nyc-purple);box-shadow:0 0 0 3px rgba(141,34,195,.12);}
.nyc-cart .nyc-coupon-btn{
	height:46px;padding:0 16px;border:1px solid var(--nyc-purple);background:#fff;color:var(--nyc-purple);
	border-radius:12px;font:inherit;font-weight:600;font-size:14px;cursor:pointer;white-space:nowrap;
}
.nyc-cart .nyc-coupon-btn:hover{background:rgba(141,34,195,.06);}
.nyc-cart .nyc-sum-rows{border-top:1px solid var(--nyc-line);padding-top:14px;}
.nyc-cart .nyc-sum-row{display:flex;justify-content:space-between;gap:12px;padding:7px 0;font-size:14px;color:var(--nyc-deep);}
.nyc-cart .nyc-sum-muted{opacity:.6;}
.nyc-cart .nyc-sum-coupon{color:var(--nyc-purple);}
.nyc-cart .nyc-num{font-variant-numeric:tabular-nums;text-align:right;}
.nyc-cart .nyc-num .amount{font-variant-numeric:tabular-nums;}
.nyc-cart .nyc-sum-total{
	border-top:1px solid var(--nyc-line);margin-top:8px;padding-top:14px;font-size:19px;font-weight:600;
}

/* ---------- Buttons ---------- */
.nyc-cart .nyc-btn{
	display:inline-flex;align-items:center;justify-content:center;text-decoration:none;
	font:inherit;cursor:pointer;
}
.nyc-cart .nyc-btn--primary,
.nyc-cart a.nyc-btn--primary,
.nyc-cart .nyc-btn--primary:link,
.nyc-cart .nyc-btn--primary:visited,
.nyc-cart .nyc-btn--primary:hover,
.nyc-cart .nyc-btn--primary:focus,
.nyc-cart .nyc-btn--primary:active{
	background:linear-gradient(135deg,var(--nyc-purple),#6c1f9e) !important;color:#fff !important;
	border:0 !important;opacity:1 !important;text-decoration:none !important;
	border-radius:14px;font-weight:700;box-shadow:0 8px 20px rgba(141,34,195,.28);
}
.nyc-cart .nyc-btn--primary:hover{filter:brightness(1.06);}
.nyc-cart .nyc-checkout-cta{width:100%;height:54px;margin-top:18px;font-size:16px;letter-spacing:.01em;}

.nyc-cart .nyc-trust{
	display:flex;align-items:center;justify-content:center;gap:7px;
	margin-top:14px;font-size:12px;opacity:.6;color:var(--nyc-deep);
}
.nyc-cart .nyc-trust svg{width:14px;height:14px;}
.nyc-cart .nyc-fx-note{margin-top:12px;font-size:12px;opacity:.6;text-align:center;line-height:1.45;color:var(--nyc-deep);}

/* ---------- Empty / recovery ---------- */
.nyc-cart .nyc-empty{
	max-width:560px;margin:24px auto 0;text-align:center;
	background:#fff;border:1px solid var(--nyc-line);border-radius:22px;padding:48px 40px 44px;
	box-shadow:0 1px 2px rgba(38,26,72,.04),0 18px 44px rgba(38,26,72,.07);
}
.nyc-cart .nyc-empty-glyph{
	width:96px;height:96px;margin:0 auto 22px;border-radius:50%;display:grid;place-items:center;
	background:radial-gradient(120% 120% at 30% 20%,rgba(141,34,195,.14),rgba(233,111,70,.10));
}
.nyc-cart .nyc-empty-glyph svg{width:44px;height:44px;color:var(--nyc-purple);}
.nyc-cart .nyc-empty--recover .nyc-empty-glyph{background:radial-gradient(120% 120% at 30% 20%,rgba(233,111,70,.16),rgba(141,34,195,.10));}
.nyc-cart .nyc-empty--recover .nyc-empty-glyph svg{color:var(--nyc-orange);}
.nyc-cart .nyc-empty h2{font-weight:700;font-size:26px;margin:0 0 10px;color:var(--nyc-deep);}
.nyc-cart .nyc-empty p{margin:0 auto 26px;max-width:400px;opacity:.72;font-size:15px;color:var(--nyc-deep);}
.nyc-cart .nyc-empty .nyc-btn--primary{height:50px;padding:0 26px;font-size:15px;font-weight:600;border-radius:13px;}

/* ---------- Cross-sell rail (bare .nyc-cards filled by NYLL_Cart_Rail) ---------- */
.nyc-cart .nyc-rail{margin-top:56px;}
.nyc-cart .nyc-rail-title{font-weight:700;font-size:22px;margin:0 0 18px;color:var(--nyc-deep);}
/* The rail returns bare cards; give them the carousel layout + tile width here,
   so a card is a fixed fraction of the row instead of full width. */
.nyc-cart .nyc-rail-track{
	display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;
	padding-bottom:8px;scrollbar-width:thin;
}
.nyc-cart .nyc-rail-track > *{
	flex:0 0 calc((100% - 80px)/4.5);scroll-snap-align:start;min-width:0;
}
@media(max-width:900px){.nyc-cart .nyc-rail-track > *{flex:0 0 calc((100% - 28px)/2.5);}}
@media(max-width:560px){.nyc-cart .nyc-rail-track > *{flex:0 0 calc((100% - 14px)/1.5);}}
/* Belt-and-suspenders: keep any card's media from ballooning if the catalog
   image rule hasn't applied for some reason. */
.nyc-cart .nyc-rail-track img{max-width:100%;height:auto;}

/* Hide any stray default WooCommerce cart chrome the theme might still print. */
.nyc-cart .woocommerce-cart-form .actions .button[name="update_cart"],
.nyc-cart .cross-sells,
.nyc-cart .cart-collaterals .cart_totals > h2{display:none;}

/* NeoYug's /cart/ URL resolves to the product/shop ARCHIVE, and the
   [woocommerce_cart] shortcode lives in the archive DESCRIPTION, which the theme
   renders INSIDE <header class="woocommerce-products-header">. So we must NOT
   hide that header (our whole cart is nested in it) - only its "Cart" title.
   The product loop, result count, ordering and "1 2 ->" pagination are separate
   siblings and safe to hide. (Proper fix: resolve the /cart/ slug collision so
   the real Cart page is served instead of the archive.) */
.woocommerce-products-header__title,
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-pagination,
ul.products.columns-1,
ul.products.columns-2,
ul.products.columns-3,
ul.products.columns-4,
ul.products.columns-5,
ul.products.columns-6{display:none !important;}

/* Rail card price pill was going blank on hover: the theme restyles generic
   buttons/links on hover with !important, wiping the fill. The visible purple
   pill is the OUTER span.nyc-buy; the inner span.nyc-buy-price/.nyc-buy-go hold
   the "Rs4,999 >" text. Pin all three across every state, scoped to our rail so
   it only affects the cart. */
.nyc-rail .nyc-buy,
.nyc-rail a:hover .nyc-buy,
.nyc-rail a:focus .nyc-buy,
.nyc-rail .nyc-buy:hover,
.nyc-rail .nyc-buy:focus{
	background:linear-gradient(135deg,var(--nyc-purple),#6c1f9e) !important;
	opacity:1 !important;text-decoration:none !important;
}
.nyc-rail .nyc-buy,
.nyc-rail .nyc-buy *,
.nyc-rail a:hover .nyc-buy *,
.nyc-rail .nyc-buy:hover *{color:#fff !important;}

/* ---------- WooCommerce notices on the cart ----------------------------------
   Woo prints its own notices (and, when the cart empties, its own "currently
   empty" message + Return to shop button) ABOVE our template. They land outside
   .nyc-cart, so they arrive with theme defaults: grey slab, coloured top rule,
   red button. These rules are intentionally UNSCOPED for the same reason as the
   archive-title rule above — cart.css only loads where our template renders.   */

/* Align the notice column with the cart body. */
.woocommerce-notices-wrapper{max-width:1120px;margin:0 auto;padding:0 4px;}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error{
	position:relative;
	list-style:none;
	background:#FAF9F6;
	border:1px solid rgba(38,26,72,.12);
	border-left:3px solid #8D22C3;
	border-radius:12px;
	color:#261A48;
	font-size:15px;
	line-height:1.5;
	margin:0 0 14px;
	padding:14px 18px;
	display:flex;
	align-items:center;
	gap:12px;
	flex-wrap:wrap;
}
.woocommerce-notices-wrapper .woocommerce-error{border-left-color:#C0392B;}
.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-notices-wrapper .woocommerce-error::before{display:none;}

/* The inline action ("Undo?", "View cart") becomes a quiet purple text link,
   not the theme's red block button. */
.woocommerce-notices-wrapper .woocommerce-message .button,
.woocommerce-notices-wrapper .woocommerce-info .button{
	margin-left:auto;
	background:none !important;
	border:none !important;
	padding:0 !important;
	color:#8D22C3 !important;
	font-weight:600;
	font-size:15px;
	text-decoration:none;
	border-radius:0;
	min-height:0;
	height:auto;
	line-height:1.5;
}
.woocommerce-notices-wrapper .woocommerce-message .button:hover,
.woocommerce-notices-wrapper .woocommerce-info .button:hover{text-decoration:underline;}

/* Woo's own empty-cart message and Return to shop button are a duplicate of the
   branded "Nothing here yet" block our template prints right below them. Drop
   them rather than style two versions of the same thing. Scoped to the empty
   variants so a real info notice still shows. */
.wc-empty-cart-message,
.woocommerce-info.cart-empty,
p.cart-empty,
.return-to-shop{display:none !important;}

/* The stray "View all courses" button. /cart/ is served by the product/shop
   ARCHIVE (see the archive-title rule above), so this is archive/theme chrome
   printed around our template, not Woo's own Return to shop — 1.11.2's
   .return-to-shop hide did not reach it. Hidden by position instead: any button
   that sits in the archive header / description / term description and is NOT
   inside our own cart wrapper. */
.woocommerce-products-header a.button,
.woocommerce-products-header .stm-lms-btn,
.page-description > a.button,
.page-description > p > a.button,
.term-description a.button,
.woocommerce-archive-description a.button,
.woocommerce > a.button.wc-backward,
.woocommerce > p > a.button.wc-backward{display:none !important;}
.nyc-cart a.button{display:inline-flex !important;} /* never hide our own */
