/*
 * 2026 redesign: product card, section heads with rail arrows, rails and the store status pill.
 * Shared by the home page and the other redesigned pages (listings, product page, cart, search, 404, store).
 * Spec: docs/design/homepage-2026-10/home.html (.n-card, .n-quick, .n-shead, .n-rail). Tokens: aw-base.css.
 */

/* ---------------------------------------------------------------- section head + rails */
.aw-shead {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 30px;
	margin-bottom: 30px;
}
.aw-shead__title {
	margin: 0;
	font-size: clamp(70px, 8.9vw, 128px);
}
.aw-arrows {
	display: flex;
	flex: none;
	gap: 8px;
	align-items: center;
}
.aw-arrows__all { margin-right: 18px; white-space: nowrap; }
.aw-ui button.aw-arrows__btn {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0;
	padding: 0;
	border: 2px solid var(--aw-ink);
	border-radius: 0;
	background: var(--aw-paper);
	color: var(--aw-ink);
	cursor: pointer;
	transition: opacity .15s;
}
.aw-ui button.aw-arrows__btn--next { background: var(--aw-ink); color: var(--aw-paper); }
.aw-ui button.aw-arrows__btn[disabled] { opacity: .3; cursor: default; }
.aw-arrows__btn .aw-ico { width: 20px; height: 20px; stroke-width: 2.4; }

.aw-rail {
	display: flex;
	gap: 12px;
	margin: 0 calc(-1 * var(--aw-gutter)) 0 0;
	padding: 0 var(--aw-gutter) 0 0;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	scrollbar-width: none;
}
.aw-rail::-webkit-scrollbar { display: none; }
/* The theme's recently viewed section (filled by its script) only wraps our .aw-woo-rail, which has its own spacing. */
#js-recently-container:has(.aw-woo-rail) { max-width: none; margin: 0; padding: 0; }
/* Often one or two items: keep the card size instead of stretching across the row. */
.aw-woo-rail.recently .aw-rail > li { flex-grow: 0; }
/* Old theme markup still cached in the visitor's localStorage: hidden for that one view, the AJAX refresh stores the rail. */
body.aw-p #js-recently-container:not(:has(.aw-woo-rail)) { display: none; }
/*
 * Items keep their width as a minimum and grow to share any free space: a rail with too few items to scroll
 * fills its row instead of leaving a gap on the right. A rail that overflows has no free space, so nothing grows.
 * Cards inside an <li> (shop rails) grow with it.
 */
.aw-rail > * { scroll-snap-align: start; flex: 1 0 auto; margin: 0; }
.aw-rail > li:not(.aw-line) { display: flex; }
.aw-rail > li:not(.aw-line) > * { flex: 1 0 auto; }
/* Nothing to scroll: the arrows and progress bar have nothing to say (space kept, no layout shift). */
.is-static > .aw-shead .aw-arrows__btn,
.is-static .aw-arrows .aw-arrows__btn,
.is-static .aw-progress { visibility: hidden; }
.aw-progress {
	position: relative;
	height: 3px;
	margin-top: 28px;
	background: var(--aw-hair);
}
.aw-progress i {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 30%;
	background: var(--aw-ink);
	transition: left .15s linear, width .15s linear;
}

/* ---------------------------------------------------------------- product card */
.aw-card { display: grid; gap: 12px; align-content: start; width: 316px; }
.aw-card__media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--aw-floor); }
.aw-card__img-link { position: absolute; inset: 0; display: block; }
.aw-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 25%;
	transition: opacity .25s ease;
}
/* Two classes: Smush's lazy-load fade prints `.lazyloaded { opacity: 1; transition: ... }` inline, which beat a
   single-class rule and left the hover photo on top of the main one once it had loaded. */
.aw-card .aw-card__img { transition: opacity .25s ease, transform .7s var(--aw-ease); transition-delay: 0s; }
.aw-card .aw-card__img--hover { opacity: 0; }
.aw-card__badge {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 6px 8px;
	background: var(--aw-ink);
	color: var(--aw-paper);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .03em;
	line-height: 1;
	pointer-events: none;
}
.aw-card__badge--line { background: var(--aw-paper); color: var(--aw-ink); }
/* Promotion "-X%": orange with black text (white on this orange is below 4.5:1 at 12px). */
.aw-card__badge--sale { background: var(--aw-promo); }
.aw-ui button.aw-card__heart {
	position: absolute;
	right: 12px;
	top: 12px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--aw-paper);
	color: var(--aw-ink);
	cursor: pointer;
}
.aw-card__heart-ico { width: 19px; height: 19px; }
.aw-card__heart.c-wishlist__btn--added .aw-card__heart-ico { fill: currentColor; }
.aw-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.aw-card__name { margin: 0; font-family: var(--aw-font-text); font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.aw-card__name a { color: var(--aw-ink); }
.aw-card__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.aw-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.aw-card { position: relative; }
.aw-card__media > :not(.aw-card__img-link),
.aw-sw,
.aw-card__notify { position: relative; z-index: 1; }
.aw-card__media > .aw-card__badge,
.aw-card__media > .aw-card__heart,
.aw-card__media > .aw-quick { position: absolute; }
.aw-card__price { font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aw-card__price del { margin-right: 6px; color: var(--aw-mute); font-weight: 600; }

.aw-sw { display: flex; align-items: center; gap: 0; margin: 0 0 0 -4px; padding: 0; list-style: none; color: var(--aw-mute); font-size: 13px; font-weight: 700; }
.aw-sw li { margin: 0; }
/* 24px hit area (WCAG 2.5.8) around the 16px dot from the mockup. */
.aw-sw__dot {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
}
.aw-sw__dot::before {
	content: "";
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--sw);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}
.aw-sw__dot.is-on::before { box-shadow: 0 0 0 2px var(--aw-paper), 0 0 0 3.5px var(--aw-ink); }
.aw-sw__dot:focus-visible { outline: 2px solid var(--aw-ink); outline-offset: 1px; }
.aw-sw__more { padding-left: 4px; }
.aw-sw__more a { color: var(--aw-mute); }

.aw-quick {
	left: 10px;
	right: 10px;
	bottom: 10px;
	display: grid;
	gap: 8px;
	padding: 12px;
	background: var(--aw-paper);
	transform: translateY(calc(100% + 12px));
	transition: transform .22s var(--aw-ease);
}
.aw-quick small { color: var(--aw-mute); font-size: 12px; font-weight: 700; }
.aw-sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.aw-ui button.aw-size {
	display: grid;
	place-items: center;
	height: 38px;
	margin: 0;
	padding: 0 4px;
	border: 1.5px solid var(--aw-ink);
	border-radius: 0;
	background: var(--aw-paper);
	color: var(--aw-ink);
	font: 800 13px/1 var(--aw-font-text);
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}
.aw-ui button.aw-size:hover,
.aw-ui button.aw-size.is-on { background: var(--aw-ink); color: var(--aw-paper); }
.aw-ui button.aw-size[disabled] {
	border-color: var(--aw-off-line);
	background: var(--aw-paper);
	color: var(--aw-off-text);
	text-decoration: line-through;
	cursor: not-allowed;
}
.aw-ui button.aw-size.is-busy { opacity: .5; cursor: progress; }
.aw-ui button.aw-size--wide { width: 100%; }

@media (hover: hover) and (min-width: 1190px) {
	.aw-card:hover .aw-card__img--hover,
	.aw-card:focus-within .aw-card__img--hover { opacity: 1; }
	.aw-card:hover .aw-quick,
	.aw-card:focus-within .aw-quick { transform: none; }
}
@media (hover: none), (max-width: 1189px) {
	.aw-quick { display: none; }
}

.aw-card.is-out .aw-card__img { filter: grayscale(1); }
.aw-card.is-out .aw-card__img-link::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .45); }
.aw-card.is-out .aw-card__price { color: var(--aw-mute); text-decoration: line-through; }
.aw-card__notify { justify-self: start; color: var(--aw-ink); font-size: 14px; font-weight: 700; text-decoration: underline !important; text-underline-offset: 4px; }

/* In a grid (listings, search, wishlist, cross-sells) the card fills its cell. */
.aw-grid .aw-card,
.aw-card--fluid { width: auto; min-width: 0; }

/* ---------------------------------------------------------------- store status pill + hours */
.aw-open {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 33px;
	margin: 0;
	padding: 7px 12px;
	background: var(--aw-paper);
	font-size: 14px;
	font-weight: 700;
	visibility: hidden;
}
.aw-open.is-ready { visibility: visible; }
.aw-open i { width: 9px; height: 9px; border-radius: 50%; background: var(--aw-mute); }
.aw-open.is-open i { background: var(--aw-open); }
.aw-hours { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 0; font-size: 16px; }
.aw-hours dt { color: var(--aw-mute-floor); font-weight: 400; }
.aw-hours dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 767px) {
	.aw-shead { margin-bottom: 16px; }
	.aw-shead__title { font-size: 70px; }
	.aw-arrows { display: none; }
	/* Full bleed on both sides: scrolled cards run to the screen edges, the first card still starts at the gutter. */
	.aw-rail { gap: 8px; margin: 0 calc(-1 * var(--aw-gutter)); padding: 0 var(--aw-gutter); scroll-padding-left: var(--aw-gutter); }
	.aw-progress { display: none; }
	.aw-card { width: 172px; gap: 8px; }
	.aw-card__name { font-size: 13px; }
	.aw-card__price { font-size: 14px; }
	.aw-ui button.aw-card__heart { width: 30px; height: 30px; right: 8px; top: 8px; }
	.aw-card__heart-ico { width: 16px; height: 16px; }
	.aw-card__badge { left: 8px; top: 8px; font-size: 10px; }
	.aw-grid .aw-card,
	.aw-card--fluid { width: auto; }
}

/* ---------------------------------------------------------------- hover motion (pointer devices only) */
.aw-ui button.aw-arrows__btn { transition: background-color .2s, color .2s, opacity .15s; }
.aw-arrows__btn .aw-ico { transition: transform .25s var(--aw-ease); }
.aw-card__img { transition: opacity .25s ease, transform .7s var(--aw-ease); }
.aw-ui button.aw-card__heart { transition: background-color .2s, color .2s, transform .25s var(--aw-ease); }
.aw-sw__dot::before { transition: transform .2s var(--aw-ease); }
.aw-card__name a {
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
	transition: background-size .3s var(--aw-ease);
}
.aw-ui button.aw-size { transition: background-color .15s, color .15s; }

@media (hover: hover) {
	.aw-ui button.aw-arrows__btn:not([disabled]):hover { background: var(--aw-ink); color: var(--aw-paper); }
	.aw-ui button.aw-arrows__btn--next:not([disabled]):hover { background: var(--aw-paper); color: var(--aw-ink); }
	.aw-arrows__btn--next:not([disabled]):hover .aw-ico { transform: translateX(3px); }
	.aw-arrows__btn--prev:not([disabled]):hover .aw-ico { transform: translateX(-3px); }
	.aw-card:hover .aw-card__img { transform: scale(1.045); }
	.aw-ui button.aw-card__heart:hover { background: var(--aw-ink); color: var(--aw-paper); transform: scale(1.1); }
	.aw-sw__dot:hover::before { transform: scale(1.2); }
	.aw-card__name a:hover { text-decoration: none; background-size: 100% 1.5px; }
}
