/* Indulgence Classic Child 1.1.0: targeted corrections. Loaded after ic-main.css and ic-woocommerce.css.
   Everything is scoped under body.ic-chrome (so nothing applies when the Indulgence chrome is switched off) and
   targets only: the header account icon, the footer wordmark, and WooCommerce product-card Add to Cart buttons.
   See docs/HOMEPAGE-ENHANCEMENT-REPORT.md for the cause of each fix. */

/* ------------------------------------------------------------------
   1. Header: make room for the account icon on narrow phones.
   The original header only just fits search + bag at 320px; a third 44px icon pushed the tools off-screen.
   Above 480px nothing changes.
   ------------------------------------------------------------------ */
@media(max-width:480px){
	body.ic-chrome .ic-hdr{padding-left:.5rem;padding-right:.5rem}
	body.ic-chrome .ic-burger{width:40px}
	body.ic-chrome .ic-tools2{gap:0}
	body.ic-chrome .ic-tools2 a,body.ic-chrome .ic-tools2 button{width:38px}
	body.ic-chrome .ic-logo{font-size:clamp(1rem,4.4vw,1.1rem);letter-spacing:.2em;margin-right:-.2em}
}

/* ------------------------------------------------------------------
   2. Footer wordmark ("INDULGENCE") stays one unbroken word and scales with the footer width.
   Cause: ic-main.css sized it at clamp(2.6rem,13vw,8rem) with .14em tracking. The word is about 7.5 to 8 times the
   font size wide, so from 800px downwards it was wider than the space available (and in the 800-1100px row layout it
   also collided with the address), and the parent theme's word-breaking rules then split it.
   Fix: size from the container width (cqi, with a vw fallback), tighten the tracking on smaller screens, forbid breaks.
   ------------------------------------------------------------------ */
body.ic-chrome footer.ic-ft p.ic-mark{
	--ic-mark-k:7.6;
	font-size:clamp(1.5rem,calc((100vw - 2.4rem) / var(--ic-mark-k)),8rem);
	letter-spacing:.08em;
	white-space:nowrap;
	word-break:keep-all;
	overflow-wrap:normal;
	hyphens:none;
	max-width:100%;
}
@media(min-width:480px){body.ic-chrome footer.ic-ft p.ic-mark{--ic-mark-k:7.9;letter-spacing:.11em}}
@media(min-width:800px){
	body.ic-chrome footer.ic-ft p.ic-mark{
		--ic-mark-k:8.15;
		letter-spacing:.14em;
		/* row layout: leave about 17rem for the address beside the wordmark */
		font-size:clamp(2rem,calc((100vw - 3.6rem - 18rem) / var(--ic-mark-k)),8rem);
	}
}
@supports (container-type:inline-size){
	body.ic-chrome footer.ic-ft .ic-fbot{container-type:inline-size}
	body.ic-chrome footer.ic-ft p.ic-mark{font-size:clamp(1.5rem,calc(100cqi / var(--ic-mark-k)),8rem)}
	@media(min-width:800px){body.ic-chrome footer.ic-ft p.ic-mark{font-size:clamp(2rem,calc((100cqi - 17rem) / var(--ic-mark-k)),8rem)}}
}

/* ------------------------------------------------------------------
   3. (1.2.0, now only the fallback for stock cards when the Indulgence card template is off; see ic-cards.css) Product cards: complete, aligned Add to Cart button (shop, categories, Related, Upsells).
   Cause A: the rule in ic-woocommerce.css that hides card buttons ("body.ic-chrome:not(.ic-cards-cta) ... display:none")
   is out-ranked by the button rule above it (its :is() list contains an ID selector, which gives it ID-level specificity),
   so card buttons are always rendered, inside whatever markup the parent theme wraps the card in.
   Cause B: that same button rule fixes padding (.95rem 1.8rem), 0.16em tracking and nowrap-width, so on narrow cards the
   label is wider than the card; and WooCommerce's loading/added icons need right padding that the rule overrides.
   Cause C: cards of different title length put the button at different heights.
   The selectors below use #page (the theme wrapper) so they out-rank the parent theme without broad !important use.
   Only a handful of properties are forced, and only on buttons inside product loops.
   The option "Show add-to-cart buttons on product cards" is left as it was; see the report.
   ------------------------------------------------------------------ */
body.ic-chrome #page ul.products li.product:not(.ic-pc){display:flex;flex-flow:row wrap;align-items:center;align-content:space-between;column-gap:1rem;min-width:0;height:auto;overflow:visible}
body.ic-chrome #page ul.products li.product:not(.ic-pc)>a.woocommerce-LoopProduct-link,
body.ic-chrome #page ul.products li.product:not(.ic-pc)>a.woocommerce-loop-product__link{flex:1 0 100%;min-width:0}
body.ic-chrome #page ul.products li.product:not(.ic-pc) :is(a.button,button.button){
	position:relative;
	flex:0 0 auto;
	box-sizing:border-box;
	width:auto;
	max-width:100%;
	height:auto;
	margin:.8rem 0 0;
	float:none;
	overflow:visible;
	white-space:nowrap;
	line-height:1.2;
}
/* WooCommerce spinner / tick sit in the right padding: give the label room so the icon never overlaps or gets cut */
body.ic-chrome #page ul.products li.product:not(.ic-pc) :is(a.button,button.button):is(.loading,.added){padding-right:2.7rem!important}
body.ic-chrome #page ul.products li.product:not(.ic-pc) :is(a.button,button.button).loading::after{right:.9rem}
/* "View cart" link WooCommerce appends after an AJAX add */
body.ic-chrome #page ul.products li.product:not(.ic-pc) a.added_to_cart{flex:0 0 auto;margin:.8rem 0 0;padding:0;font-size:.66rem;text-transform:uppercase;letter-spacing:.12em;text-decoration:underline;text-underline-offset:4px;white-space:nowrap}
/* Narrow cards (two across): same look, a little less padding and tracking so "Select options" and "Add to cart" fit whole */
@media(max-width:699px){
	body.ic-chrome #page ul.products li.product:not(.ic-pc) :is(a.button,button.button){padding:.7rem .85rem!important;letter-spacing:.08em!important;font-size:.66rem!important}
	body.ic-chrome #page ul.products li.product:not(.ic-pc) :is(a.button,button.button):is(.loading,.added){padding-right:2.2rem!important}
}
