/* Indulgence Classic Child 1.3.0: product card and Add to Cart button.

   WHY THIS FILE EXISTS (full analysis: docs/ADD-TO-CART-ROOT-CAUSE-1.3.0.md)
   Verified in the 1.2.0 source: ic-woocommerce.css styled every card button with one broad rule, body.ic-chrome :is(.woocommerce a.button, ...,
   .woocommerce #respond input#submit, ...). An :is() list takes the specificity of its most specific argument (two IDs here), so that rule
   out-ranked every later card-specific rule, including the 1.2.0 "#page" fix (one ID), and forced padding .95rem 1.8rem, .16em tracking and
   nowrap-style sizing onto cards of any width. The card markup itself belonged to Woostify, whose own loop rules (not available to inspect
   here) then decided display, height and clipping. 1.3.0 renders the card from woocommerce/content-product.php with theme-owned class
   names (.ic-pc, .ic-pc__btn), excludes .ic-pc__btn from the broad rule, and sets the button's intrinsic size here with enough
   specificity (":not(#_):not(#__)" adds two ID-level units; it is a specificity device, limited to the card and button) that a generic
   parent rule cannot shrink it.
   Everything is scoped to body.ic-chrome (so it is inert when the Indulgence chrome is switched off). */

/* ---------- Grid (shop, categories, search, related, upsells, [products]) ---------- */
body.ic-chrome ul.products:not(#_):not(#__){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2rem 10px;width:auto;max-width:none;margin:0 0 2.5rem;padding:0;list-style:none;float:none}
@media(min-width:700px){body.ic-chrome ul.products:not(#_):not(#__){grid-template-columns:repeat(3,minmax(0,1fr));gap:2.6rem 16px}}
@media(min-width:1100px){body.ic-chrome ul.products:not(#_):not(#__){grid-template-columns:repeat(4,minmax(0,1fr));gap:3rem 20px}}
body.ic-chrome ul.products:not(#_):not(#__)::before,body.ic-chrome ul.products:not(#_):not(#__)::after{display:none;content:none}

/* ---------- Card ---------- */
body.ic-chrome .ic-pc:not(#_):not(#__){position:relative;display:flex;flex-direction:column;min-width:0;width:auto;max-width:none;height:auto;margin:0;padding:0;float:none;border:0;background:none;box-shadow:none;text-align:left;font-family:var(--ic-f);overflow:visible}
body.ic-chrome .ic-pc__media:not(#_):not(#__){position:relative;display:block;overflow:hidden;aspect-ratio:4/5;margin:0;background:var(--ic-grey)}
body.ic-chrome .ic-pc__link:not(#_):not(#__){display:block;width:100%;height:100%;margin:0;padding:0;border:0;text-decoration:none}
body.ic-chrome .ic-pc__img:not(#_):not(#__){display:block;width:100%;height:100%;max-width:none;margin:0;object-fit:cover;object-position:top;aspect-ratio:auto;transition:transform 1.3s cubic-bezier(.2,.6,.2,1)}
@media(hover:hover){body.ic-chrome .ic-pc:hover .ic-pc__img:not(#_):not(#__){transform:scale(1.045)}}
body.ic-chrome .ic-pc__badge:not(#_):not(#__){position:absolute;top:.7rem;left:.7rem;z-index:2;margin:0;padding:.4rem .6rem;min-width:0;min-height:0;border-radius:0;background:var(--ic-ink);color:#fff;font:400 .58rem/1 var(--ic-f);letter-spacing:.16em;text-transform:uppercase}
body.ic-chrome .ic-pc__info:not(#_):not(#__){display:flex;flex-direction:column;gap:.2rem;flex:1 1 auto;margin:0;padding:.9rem 0 0}
body.ic-chrome .ic-pc__title:not(#_):not(#__){margin:0;padding:0;font:400 .76rem/1.45 var(--ic-f);letter-spacing:.1em;text-transform:uppercase;text-align:left;color:var(--ic-ink)}
body.ic-chrome .ic-pc__title a:not(#_):not(#__){color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;text-decoration:none}
body.ic-chrome .ic-pc__title a:hover:not(#_):not(#__){text-decoration:underline;text-underline-offset:5px}
body.ic-chrome .ic-pc__price:not(#_):not(#__){display:block;margin:0;font:300 .82rem/1.4 var(--ic-f);letter-spacing:.04em;color:var(--ic-mute);text-align:left}
body.ic-chrome .ic-pc__price del:not(#_):not(#__){opacity:.7}
body.ic-chrome .ic-pc__price ins:not(#_):not(#__){text-decoration:none;color:var(--ic-ink)}

/* ---------- Call to action area: always the last row, so buttons align whatever the title length ---------- */
body.ic-chrome .ic-pc__cta:not(#_):not(#__){display:flex;flex-direction:column;align-items:stretch;gap:.5rem;margin:1rem 0 0;padding:0;min-width:0}

/* ---------- The button: intrinsic size is set here and cannot be shrunk by a parent rule ---------- */
body.ic-chrome .ic-pc a.ic-pc__btn:not(#_):not(#__){
	position:relative;display:flex;align-items:center;justify-content:center;
	box-sizing:border-box;float:none;flex:0 0 auto;
	width:100%;min-width:0;max-width:100%;height:auto;min-height:46px;
	margin:0;padding:.8rem 1rem;
	overflow:visible;clip:auto;transform:none;opacity:1;visibility:visible;
	border:1px solid var(--ic-ink);border-radius:0;background:transparent;box-shadow:none;
	color:var(--ic-ink);font:400 .68rem/1.3 var(--ic-f);letter-spacing:.14em;text-transform:uppercase;text-align:center;text-indent:0;text-decoration:none;white-space:normal;
	cursor:pointer;-webkit-tap-highlight-color:transparent;
	transition:background-color .35s ease,color .35s ease,border-color .35s ease,letter-spacing .35s ease;
}
body.ic-chrome .ic-pc a.ic-pc__btn .ic-pc__btn-label:not(#_):not(#__){display:inline;position:static;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-indent:0;opacity:1;visibility:visible}
@media(hover:hover){body.ic-chrome .ic-pc a.ic-pc__btn:hover:not(#_):not(#__){background:var(--ic-ink);color:#fff;letter-spacing:.17em}}
body.ic-chrome .ic-pc a.ic-pc__btn:focus-visible:not(#_):not(#__){background:var(--ic-ink);color:#fff}

/* WooCommerce adds .loading and .added through add-to-cart.js. Its own icons use an icon font that may not be loaded,
   so the states are drawn in CSS and the label gets room on the right so the icon never overlaps it. */
body.ic-chrome .ic-pc a.ic-pc__btn:is(.loading,.added):not(#_):not(#__){padding-right:2.6rem;padding-left:2.6rem}
body.ic-chrome .ic-pc a.ic-pc__btn.loading:not(#_):not(#__){pointer-events:none}
body.ic-chrome .ic-pc a.ic-pc__btn.loading .ic-pc__btn-label:not(#_):not(#__){opacity:.55}
body.ic-chrome .ic-pc a.ic-pc__btn:is(.loading,.added):not(#_):not(#__)::after{
	content:"";position:absolute;top:50%;right:1rem;bottom:auto;left:auto;display:block;box-sizing:border-box;margin:0;padding:0;
	font:inherit;line-height:0;vertical-align:baseline;border-radius:0;background:none;
}
body.ic-chrome .ic-pc a.ic-pc__btn.loading:not(#_):not(#__)::after{width:14px;height:14px;margin-top:-7px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ic-pc-spin .8s linear infinite}
body.ic-chrome .ic-pc a.ic-pc__btn.added:not(#_):not(#__)::after{width:6px;height:11px;margin-top:-8px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);animation:none}
@keyframes ic-pc-spin{to{transform:rotate(360deg)}}

/* "View cart" link WooCommerce inserts after the button on AJAX success */
body.ic-chrome .ic-pc a.added_to_cart:not(#_):not(#__){display:block;margin:0;padding:.2rem 0;font:400 .64rem/1.3 var(--ic-f);letter-spacing:.14em;text-transform:uppercase;text-align:center;color:var(--ic-ink);text-decoration:underline;text-underline-offset:4px;background:none;border:0}

/* ---------- Narrow screens: two cards across ---------- */
@media(max-width:699px){
	body.ic-chrome .ic-pc a.ic-pc__btn:not(#_):not(#__){min-height:44px;padding:.7rem .35rem;font-size:.6rem;letter-spacing:.08em}
	body.ic-chrome .ic-pc a.ic-pc__btn:is(.loading,.added):not(#_):not(#__){padding-right:1.9rem;padding-left:1.9rem}
	body.ic-chrome .ic-pc a.ic-pc__btn:is(.loading,.added):not(#_):not(#__)::after{right:.6rem}
	body.ic-chrome .ic-pc__title:not(#_):not(#__){font-size:.7rem;letter-spacing:.08em}
}

/* ---------- Homepage placements ---------- */
.ic-grid>.ic-pc{min-width:0}
.ic-hx-newrail>.ic-pc{flex:0 0 calc((100% - 10px) / 2.25);min-width:0;scroll-snap-align:start}
@media(min-width:700px){.ic-hx-newrail>.ic-pc{flex-basis:calc((100% - 28px) / 3.2)}}
@media(min-width:1100px){.ic-hx-newrail>.ic-pc{flex-basis:calc((100% - 42px) / 4)}}

@media(prefers-reduced-motion:reduce){
	body.ic-chrome .ic-pc__img:not(#_):not(#__){transition:none}
	body.ic-chrome .ic-pc:hover .ic-pc__img:not(#_):not(#__){transform:none}
	body.ic-chrome .ic-pc a.ic-pc__btn:not(#_):not(#__){transition:none}
	body.ic-chrome .ic-pc a.ic-pc__btn.loading:not(#_):not(#__)::after{animation-duration:2s}
}
