/* ==========================================================================
   Alice Academy — full-width PDP sections below the buy box.

   Three stacked bands, all drawn from template-parts/product/related.php:
   the information accordions, the related-products grid, and the content
   tiles. Everything here is built out of the tokens in theme.css — warm
   neutral grounds with rose as the single accent, one typeface, no hardcoded
   hex.

   Grid, section heading, card and button styles come from theme.css; this
   file only adds what those do not already cover.
   ========================================================================== */

/* --------------------------------------------------------------- rhythm */

/* Three sections in a row would otherwise stack three full section
   paddings. Halve them, and beat `.aa-section--tight` on specificity so the
   result does not depend on stylesheet order. */
.aa-pdpsec.aa-section {
	padding-block: calc(var(--aa-section) * .5);
}

/* The accordions follow the buy box directly, so they only need a rule
   above them, not a second helping of space. */
.aa-pdpsec--info.aa-section {
	padding-block-start: calc(var(--aa-section) * .4);
}

/* ---------------------------------------------------------- accordions */

.aa-info {
	display: grid;
	gap: .5rem;
}

.aa-info__item {
	border: 1px solid var(--aa-hairline);
	border-radius: var(--aa-radius);
	background: var(--aa-surface);
	overflow: hidden;
	scroll-margin-top: calc(var(--aa-header-h) + 1rem);
}

.aa-info__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 52px;
	padding: .9rem 1.1rem;
	background: var(--aa-surface-muted);
	color: var(--aa-ink);
	cursor: pointer;
	list-style: none;
	font-size: var(--aa-fs-xs);
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

/* Safari still paints the disclosure triangle without this. */
.aa-info__head::-webkit-details-marker { display: none; }

.aa-info__head:hover { background: var(--aa-surface-strong); }
.aa-info__head:hover .aa-info__label { color: var(--aa-rose); }

.aa-info__head:focus-visible {
	outline: 2px solid var(--aa-ink);
	outline-offset: -2px;
}

.aa-info__label { min-width: 0; }

.aa-info__chev {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--aa-muted);
	transition: transform .2s var(--aa-ease);
}
.aa-info__chev svg { width: 16px; height: 16px; }

.aa-info__item[open] > .aa-info__head .aa-info__chev { transform: rotate(90deg); }

.aa-info__body {
	padding: 1.1rem;
	max-width: var(--aa-max-text);
}

.aa-info__list {
	display: grid;
	gap: .55rem;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--aa-muted);
	font-size: var(--aa-fs-sm);
	line-height: 1.65;
}

.aa-info__list li {
	position: relative;
	padding-inline-start: 1.1rem;
}

/* A short rule instead of a bullet — quieter, and it stays monochrome. */
.aa-info__list li::before {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: .78em;
	width: 6px;
	height: 1px;
	background: var(--aa-sand);
}

/* --------------------------------------------------------- content tiles */

.aa-tiles {
	display: grid;
	gap: .75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.aa-tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

.aa-tile {
	display: flex;
	flex-direction: column;
	gap: .4rem;
	padding: 1.5rem 1.25rem;
	background: var(--aa-surface-muted);
	border-radius: var(--aa-radius);
}

.aa-tile__ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: .5rem;
	border: 1px solid var(--aa-hairline);
	border-radius: 50%;
	background: var(--aa-surface);
	color: var(--aa-rose);
}
.aa-tile__ico svg { width: 18px; height: 18px; }

.aa-tile__title {
	margin: 0;
	color: var(--aa-ink);
	font-size: var(--aa-fs-xs);
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.aa-tile__text {
	margin: 0;
	color: var(--aa-muted);
	font-size: var(--aa-fs-sm);
	line-height: 1.65;
}

.aa-tile__link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: .4rem;
	min-height: 44px;            /* touch target */
	margin-block-start: auto;
	padding-block-start: .9rem;
	color: var(--aa-ink);
	font-size: var(--aa-fs-xs);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.aa-tile__link:hover {
	color: var(--aa-rose);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

.aa-tile__link:focus-visible {
	outline: 2px solid var(--aa-ink);
	outline-offset: 3px;
}

.aa-tile__arrow {
	display: inline-flex;
	transition: transform .18s var(--aa-ease);
}
.aa-tile__arrow svg { width: 14px; height: 14px; }

.aa-tile__link:hover .aa-tile__arrow { transform: translateX(3px); }

/* ------------------------------------------------------------ preferences */

@media (prefers-reduced-motion: reduce) {
	.aa-info__chev,
	.aa-tile__arrow {
		transition: none;
	}
	.aa-tile__link:hover .aa-tile__arrow { transform: none; }
}

/* ------------------------------------------- inside the summary column now

   These accordions were built to sit full width below both columns, so the
   part wraps its contents in `.aa-wrap` and pads like a page section. Rendered
   inside the buying column that gutter applies a second time, leaving them
   narrower than the description panel directly above. Strip both so all three
   panels share one edge. */

.aa-pdp__summary .aa-pdpsec {
	padding-block: 0;
}

.aa-pdp__summary .aa-pdpsec > .aa-wrap {
	max-width: none;
	padding-inline: 0;
	margin-inline: 0;
}

/* Sit directly under the description rather than a section's worth away. */
.aa-pdp__summary .aa-pdpsec--info { margin-top: .75rem; }

/* Match the description panel's own rhythm. */
.aa-pdp__summary .aa-info + .aa-info { margin-top: .5rem; }


/* --------------------------------------------------------- product promise
 * A ringed icon per claim (cruelty-free, dermatologist-tested, made for every
 * skin tone). Rose is the single brand accent, so every ring shares it rather
 * than splitting into a sticker-sheet of hues — the row reads as one set.
 */
.aa-freefrom__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
	/*
	 * A real minimum matters: `minmax(0, 1fr)` with auto-fit resolves to as
	 * many zero-width tracks as the row will hold, which laid out dozens of
	 * empty columns and let the cards overflow their own grid.
	 */
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
	.aa-freefrom__list { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
}

.aa-freefrom__item {
	position: static;
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--aa-hairline);
	border-radius: var(--aa-radius);
	background: var(--aa-surface);
}

.aa-freefrom__ring {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 2px solid currentColor;
	background: var(--aa-ff-bg, var(--aa-surface-muted));
	color: var(--aa-ff-fg, var(--aa-rose));
}

.aa-freefrom__ring svg { width: 22px; height: 22px; }

.aa-freefrom__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.aa-freefrom__label {
	font-size: var(--aa-fs-sm);
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--aa-ink);
}

.aa-freefrom__note {
	font-size: var(--aa-fs-xs);
	color: var(--aa-muted);
}

/* Every tone resolves to the one rose accent on a warm-neutral ground; the
   modifier classes stay so the markup/filter contract is unchanged. */
.aa-freefrom__item--gold,
.aa-freefrom__item--green,
.aa-freefrom__item--blue { --aa-ff-fg: var(--aa-rose); --aa-ff-bg: var(--aa-surface-muted); }

/* -------------------------------------------- "Complete the Look" heading
 * Eyebrow + accent word for the related-products section. Scoped so it never
 * clashes with a global .aa-sechead definition in theme.css. */
.aa-pdpsec--rel .aa-sechead__eyebrow {
	margin: 0 0 .4rem;
	font-size: var(--aa-fs-xs);
	font-weight: 800;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--aa-rose);
}
.aa-pdpsec--rel .aa-sechead__title .aa-accent { color: var(--aa-rose); }