/* AYATOP department landing pages (PS-04). Five compositions, one token set. */

.ak-department-landing #ak-dept-categories:focus,
.ak-department-landing #ak-dept-products:focus { outline: none; }

/* ---------- Hero shapes (text beside the photograph, never over it) ---------- */
.ak-dhero {
	display: grid;
	align-items: stretch;
	margin-top: var(--ak-space-4);
	background: var(--ak-color-canvas-primary);
}

.ak-dhero__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--ak-space-4);
	padding-block: var(--ak-space-7);
}

.ak-dhero__content > * { margin: 0; }
.ak-dhero__eyebrow { color: var(--ak-color-accent); font-size: var(--ak-type-label); font-weight: var(--ak-weight-medium); }

.ak-dhero__title {
	font-family: var(--ak-font-display);
	font-size: var(--ak-type-h1);
	font-weight: var(--ak-weight-regular);
	line-height: var(--ak-leading-tight);
	text-wrap: balance;
}

.ak-dhero__actions { display: flex; flex-wrap: wrap; gap: var(--ak-space-3); margin-top: var(--ak-space-2); }

.ak-dhero__media { background: var(--ak-color-canvas-secondary); }
.ak-dhero__media picture,
.ak-dhero__image { display: block; width: 100%; height: 100%; }
.ak-dhero__image { object-fit: cover; }

/* Fashion: image-led split, portrait photograph on the right */
.ak-dhero--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ak-dhero--split .ak-dhero__title { font-size: var(--ak-type-display); }
.ak-dhero--split .ak-dhero__media { min-height: clamp(28rem, 78vh, 50rem); }
.ak-dhero--split .ak-dhero__content {
	padding-inline-start: max(var(--ak-page-gutter), calc((100% - var(--ak-width-max)) / 2 + var(--ak-page-gutter)));
	padding-inline-end: var(--ak-space-6);
}

/* Accessories: heading and actions on one line above a wide, product-focused image */
.ak-dhero--wide { grid-template-columns: minmax(0, 1fr); }
.ak-dhero--wide .ak-dhero__content {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	padding: var(--ak-space-6) var(--ak-page-gutter);
	max-width: var(--ak-width-max);
	width: 100%;
	margin-inline: auto;
}
.ak-dhero--wide .ak-dhero__media { order: 2; aspect-ratio: 21 / 8; }

/* Beauty: framed product-in-room feel on the secondary canvas */
.ak-dhero--soft { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--ak-color-canvas-secondary); }
.ak-dhero--soft .ak-dhero__media { order: -1; padding: var(--ak-space-6); background: transparent; min-height: 28rem; }
.ak-dhero--soft .ak-dhero__image { border: var(--ak-border-width) solid var(--ak-color-border-subtle); }
.ak-dhero--soft .ak-dhero__content { padding-inline: clamp(var(--ak-space-5), 5vw, var(--ak-space-9)); }

/* Home and Living: large interior, solid text panel that only touches the image edge */
.ak-dhero--panel { grid-template-columns: minmax(0, 1fr); background: transparent; }
.ak-dhero--panel .ak-dhero__media { order: 1; aspect-ratio: 21 / 9; min-height: 22rem; }
.ak-dhero--panel .ak-dhero__content {
	order: 2;
	position: relative;
	z-index: 1;
	width: min(36rem, calc(100% - 2 * var(--ak-page-gutter)));
	margin: -2.5rem 0 0 max(var(--ak-page-gutter), calc((100% - var(--ak-width-max)) / 2 + var(--ak-page-gutter)));
	padding: var(--ak-space-6);
	background: var(--ak-color-surface-default);
	border: var(--ak-border-width) solid var(--ak-color-border-subtle);
}

/* Pets: friendly and compact, content first */
.ak-dhero--compact { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ak-dhero--compact .ak-dhero__media { min-height: 20rem; }
.ak-dhero--compact .ak-dhero__content {
	padding-inline-start: max(var(--ak-page-gutter), calc((100% - var(--ak-width-max)) / 2 + var(--ak-page-gutter)));
	padding-inline-end: var(--ak-space-6);
	padding-block: var(--ak-space-6);
}

.ak-dhero--text-only { grid-template-columns: minmax(0, 1fr); }
.ak-dhero--text-only .ak-dhero__content { padding-inline: var(--ak-page-gutter); max-width: var(--ak-width-max); margin-inline: auto; width: 100%; }

@media (max-width: 63.999rem) {
	.ak-dhero--split,
	.ak-dhero--soft,
	.ak-dhero--compact { grid-template-columns: minmax(0, 1fr); }

	.ak-dhero .ak-dhero__media,
	.ak-dhero--soft .ak-dhero__media,
	.ak-dhero--split .ak-dhero__media,
	.ak-dhero--wide .ak-dhero__media,
	.ak-dhero--panel .ak-dhero__media { order: -1; min-height: 0; aspect-ratio: 4 / 5; max-height: 68vh; padding: 0; }

	.ak-dhero .ak-dhero__content,
	.ak-dhero--split .ak-dhero__content,
	.ak-dhero--compact .ak-dhero__content,
	.ak-dhero--soft .ak-dhero__content { padding: var(--ak-space-6) var(--ak-page-gutter) var(--ak-space-6); }

	.ak-dhero--wide .ak-dhero__content { flex-direction: column; align-items: flex-start; }
	.ak-dhero--panel .ak-dhero__content { width: 100%; margin: 0; border-inline: 0; }
	.ak-dhero--split .ak-dhero__title { font-size: var(--ak-type-h1); }
}

/* ---------- Introduction ---------- */
.ak-dintro { padding-block: var(--ak-space-7) 0; }
.ak-dintro__text { margin: 0; max-width: var(--ak-measure-reading); font-size: var(--ak-type-body-large); line-height: var(--ak-leading-serif-body); }

.ak-dintro--statement .ak-dintro__text {
	max-width: 46rem;
	margin-inline-start: clamp(0rem, 8vw, 7rem);
	font-family: var(--ak-font-display);
	font-size: var(--ak-type-h2);
	line-height: 1.3;
	text-wrap: balance;
}

/* ---------- Shop by category ---------- */
.ak-dcats {
	display: grid;
	gap: var(--ak-space-5) var(--ak-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ak-dcats__item { min-width: 0; display: flex; }

.ak-dcat {
	display: grid;
	flex: 1;
	align-content: start;
	gap: var(--ak-space-3);
	color: var(--ak-color-text-primary);
	text-decoration: none;
}

.ak-dcat:hover { text-decoration: none; color: var(--ak-color-text-primary); }
.ak-dcat:hover .ak-dcat__name { text-decoration: underline; text-underline-offset: 0.2em; }

.ak-dcat__media { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ak-color-canvas-secondary); }
.ak-dcat__media img { width: 100%; height: 100%; object-fit: cover; }
.ak-dcat__name { font-family: var(--ak-font-display); font-size: var(--ak-type-h4); line-height: 1.25; }

@media (min-width: 48rem) {
	.ak-dcats--portrait { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
	.ak-dcats--square { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
	.ak-dcats--chips { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
	.ak-dcats--mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.ak-dcats--mosaic .ak-dcats__item { grid-column: span 4; }
	.ak-dcats--mosaic .ak-dcats__item:first-child { grid-column: span 6; grid-row: span 2; }
	.ak-dcats--mosaic .ak-dcats__item:nth-child(2),
	.ak-dcats--mosaic .ak-dcats__item:nth-child(3) { grid-column: span 3; }
	.ak-dcats--mosaic .ak-dcats__item:first-child .ak-dcat { grid-template-rows: 1fr auto; }
	.ak-dcats--mosaic .ak-dcats__item:first-child .ak-dcat__media { aspect-ratio: auto; min-height: 22rem; }
	.ak-dcats--mosaic.ak-dcats--n1 .ak-dcats__item,
	.ak-dcats--mosaic.ak-dcats--n2 .ak-dcats__item { grid-column: span 6; grid-row: auto; }
}

.ak-dcats--square .ak-dcat__media { aspect-ratio: 1 / 1; }
.ak-dcats--chips .ak-dcat__media { aspect-ratio: 4 / 3; }
.ak-dcats--mosaic .ak-dcat__media { aspect-ratio: 4 / 3; }

/* Quick links (Beauty and Pets): type or need first, picture second */
.ak-dchips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ak-space-2);
	margin: 0 0 var(--ak-space-5);
	padding: 0;
	list-style: none;
}

.ak-dchip {
	display: inline-flex;
	align-items: center;
	min-height: var(--ak-target-min);
	padding: 0 var(--ak-space-4);
	border: var(--ak-border-width) solid var(--ak-color-border-strong);
	border-radius: var(--ak-radius-control);
	background: var(--ak-color-surface-default);
	color: var(--ak-color-text-primary);
	text-decoration: none;
}

.ak-dchip:hover { border-color: var(--ak-color-interactive-primary); border-width: var(--ak-border-width-emphasis); text-decoration: none; color: var(--ak-color-text-primary); }

/* Department splits sit on the page rhythm */
.ak-split--dept { margin-top: var(--ak-space-section); }
.ak-department-landing .ak-footer { margin-top: var(--ak-space-section); }

/* ---------- Fashion: hero description ---------- */
.ak-dhero__intro { max-width: 30rem; color: var(--ak-color-text-secondary); font-size: var(--ak-type-body-large); line-height: var(--ak-leading-body); }

/* ---------- Shop listing on the landing page (count, sort, grid, numbered pages) ---------- */
.ak-dlisting:focus { outline: none; }
.ak-dlisting__head { margin-bottom: var(--ak-space-5); }
.ak-dlisting__head h2 { margin: 0; font-family: var(--ak-font-display); font-size: var(--ak-type-h2); font-weight: var(--ak-weight-regular); }
.ak-dlisting__sub { margin: var(--ak-space-2) 0 0; color: var(--ak-color-text-secondary); font-size: var(--ak-type-body-large); }

/* One category on its own spans the row instead of sitting in half of it; empty picture slots stay tonal. */
@media (max-width: 47.999rem) {
	.ak-dcats--n1 .ak-dcats__item { grid-column: 1 / -1; }
	.ak-dcats--n1 .ak-dcat__media { aspect-ratio: 4 / 3; }
}
.ak-dcat__media:empty { min-height: 6rem; }
.ak-dcat__media img { transition: none; }

/* Fashion editorial (plan section 8): a wide picture, then heading, line and button underneath. */
.ak-split--stack { display: block; background: transparent; }
.ak-split--stack .ak-split__media { order: 0; min-height: 0; aspect-ratio: 21 / 9; }
.ak-split--stack .ak-split__content { display: block; max-width: 40rem; padding: var(--ak-space-5) var(--ak-page-gutter) 0; margin-inline: auto 0; }
.ak-split--stack .ak-split__content > * + * { margin-top: var(--ak-space-3); }
@media (min-width: 64rem) {
	.ak-split--stack .ak-split__media { order: 0; min-height: 0; }
	.ak-split--stack .ak-split__content { padding-inline: 0; margin-inline: max(var(--ak-page-gutter), calc((100% - var(--ak-width-max)) / 2 + var(--ak-page-gutter))); max-width: none; }
}
@media (max-width: 63.999rem) {
	.ak-split--stack .ak-split__media { order: 0; aspect-ratio: 4 / 3; }
}


/* Fashion category tiles: all portrait (3:4), set by .ak-dcat__media above. */
.ak-dcats--portrait { align-items: start; }

/* Editorial without a picture yet: a calm text band, same words, same button. */
.ak-split--textonly .ak-split__media { display: none; }
.ak-split--textonly { background: var(--ak-color-canvas-secondary); }
.ak-split--textonly .ak-split__content { max-width: var(--ak-width-max); margin-inline: auto; padding: var(--ak-space-7) var(--ak-page-gutter); }
