/* ==========================================================================
   Menu categories: eyebrow + stacked rows (pill photo / big title / star / arrow)
   Measured against the reference at 1532px: 60/120 section padding, rows 40px
   vertical padding with a 1px hairline, title Fraunces 80/300 uppercase.
   ========================================================================== */
.sv-menu-categories { padding: 60px 0 120px; }

/* Heading block: eyebrow only by default. 16px top pad lands the eyebrow 76px
   below the section edge like the reference (its widget wrapper + line leading). */
.sv-menu-categories .sv-heading { display: flex; flex-direction: column; align-items: center; padding-top: 16px; margin-bottom: 40px; }
.sv-menu-categories .sv-heading--left { align-items: flex-start; }

.sv-menu-categories__list { display: flex; flex-direction: column; }

/* Row: the whole thing is one link */
.sv-menu-categories__row {
	position: relative; display: flex; align-items: center;
	padding: 40px 0; border-bottom: 1px solid var(--sv-line);
	color: var(--sv-heading); overflow: hidden;
	transition: padding .4s ease-in-out;
}
.sv-menu-categories__row:hover, .sv-menu-categories__row:focus-visible { color: var(--sv-heading); outline: none; }

/* Hover backdrop: the row photo (focal point drifts up as it fades in) under a 40% black veil */
.sv-menu-categories__overlay {
	position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background-image: var(--sv-cat-img);
	background-size: cover; background-position: center 60%; background-repeat: no-repeat;
	opacity: 0; transition: background-position .9s var(--sv-ease), opacity .6s ease;
}
.sv-menu-categories__overlay::before { content: ""; position: absolute; inset: 0; background: #000; opacity: .4; }
.sv-menu-categories__row:hover .sv-menu-categories__overlay,
.sv-menu-categories__row:focus-visible .sv-menu-categories__overlay { opacity: 1; background-position: center 50%; }

/* Pill photo */
.sv-menu-categories__img {
	position: relative; z-index: 1; flex: 0 0 205px; width: 205px; height: 94px;
	border-radius: 300px; overflow: hidden;
}
.sv-menu-categories__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 300px; }

/* Right side: title, star, arrow */
.sv-menu-categories__data {
	position: relative; z-index: 1; flex: 1 1 auto; min-width: 0;
	display: flex; justify-content: flex-end; align-items: center; gap: 50px;
	transition: padding .4s ease-in-out;
}
.sv-menu-categories__title {
	margin: 0; font-family: var(--sv-heading-font); font-size: 80px; font-weight: 300; line-height: 1.2;
	letter-spacing: 0; text-transform: uppercase; text-align: right; color: var(--sv-heading);
}
.sv-menu-categories__star { display: flex; align-items: center; width: 14px; height: 14px; flex-shrink: 0; color: var(--sv-accent); }
.sv-menu-categories__star svg { width: 14px; height: 14px; fill: currentColor; }
.sv-menu-categories__btn {
	display: flex; justify-content: center; align-items: center; flex-shrink: 0;
	width: 100px; height: 100px; padding: 10px; border-radius: 50%;
	border: 1px solid var(--sv-line); color: var(--sv-accent);
	transition: .3s;
}
.sv-menu-categories__btn svg { width: 60px; height: 60px; display: block; }
.sv-menu-categories__row:hover .sv-menu-categories__btn,
.sv-menu-categories__row:focus-visible .sv-menu-categories__btn { border-color: var(--sv-accent); }

/*
 * Desktop hover: the row opens up, the pill collapses, the title glides left and the arrow turns up-right.
 * Everything here animates: the pill shrinks via flex-basis/opacity, and the title moves because the
 * spacer before it (::before) and the star after it trade flex-grow, instead of a text-align jump.
 */
@media (min-width: 1200px) {
	.sv-menu-categories__row, .sv-menu-categories__data { transition: padding .6s var(--sv-ease); }
	.sv-menu-categories__img { transition: flex-basis .6s var(--sv-ease), width .6s var(--sv-ease), opacity .4s ease, transform .6s var(--sv-ease); transform-origin: left center; }
	.sv-menu-categories__data { justify-content: flex-start; gap: 0; }
	.sv-menu-categories__data::before { content: ""; flex: 1 1 0; transition: flex-grow .6s var(--sv-ease); }
	.sv-menu-categories__title { flex: 0 0 auto; }
	.sv-menu-categories__star { flex: 0 0 14px; justify-content: center; margin: 0 50px; transition: flex-grow .6s var(--sv-ease); }
	.sv-menu-categories__btn { transition: background .4s ease, border-color .4s ease, color .4s ease, transform .6s var(--sv-ease); }

	.sv-menu-categories__row:hover,
	.sv-menu-categories__row:focus-visible { padding: 80px 0; }
	.sv-menu-categories__row:hover .sv-menu-categories__img,
	.sv-menu-categories__row:focus-visible .sv-menu-categories__img { flex-basis: 0; width: 0; opacity: 0; transform: scale(.85); }
	.sv-menu-categories__row:hover .sv-menu-categories__data,
	.sv-menu-categories__row:focus-visible .sv-menu-categories__data { padding: 0 40px; }
	.sv-menu-categories__row:hover .sv-menu-categories__data::before,
	.sv-menu-categories__row:focus-visible .sv-menu-categories__data::before { flex-grow: 0; }
	.sv-menu-categories__row:hover .sv-menu-categories__star,
	.sv-menu-categories__row:focus-visible .sv-menu-categories__star { flex-grow: 1; }
	.sv-menu-categories__row:hover .sv-menu-categories__btn,
	.sv-menu-categories__row:focus-visible .sv-menu-categories__btn { background: var(--sv-accent); border-color: var(--sv-accent); color: #000; transform: rotate(315deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.sv-menu-categories__title { font-size: 48px; }
}

@media (max-width: 767px) {
	.sv-menu-categories__row { flex-direction: column; align-items: flex-start; gap: 20px; }
	.sv-menu-categories__img { flex-basis: auto; width: 240px; max-width: 100%; height: 110px; }
	.sv-menu-categories__data { width: 100%; justify-content: space-between; gap: 16px; }
	.sv-menu-categories__title { flex: 1 1 auto; min-width: 0; font-size: clamp(28px, 9.5vw, 36px); text-align: left; }
	.sv-menu-categories__star { display: none; }
	.sv-menu-categories__btn { width: 60px; height: 60px; padding: 6px; }
	.sv-menu-categories__btn svg { width: 36px; height: 36px; }
}

/* ---------- Phones: compact rows (pill photo · title · arrow on one line) instead of tall stacks ---------- */
@media (max-width: 767px) {
	.sv-menu-categories { padding: 48px 0 72px; }
	.sv-menu-categories .sv-heading { margin-bottom: 24px; }
	.sv-menu-categories__row { flex-direction: row; align-items: center; gap: 16px; padding: 18px 0; }
	.sv-menu-categories__img { flex: 0 0 92px; width: 92px; height: 56px; }
	.sv-menu-categories__data { flex: 1 1 auto; justify-content: space-between; gap: 12px; }
	.sv-menu-categories__title { font-size: clamp(20px, 6.2vw, 28px); line-height: 1.1; letter-spacing: .02em; white-space: nowrap; }
	.sv-menu-categories .sv-eyebrow { font-size: 11px; letter-spacing: .22em; }
	.sv-menu-categories__btn { width: 44px; height: 44px; padding: 0; }
	.sv-menu-categories__btn svg { width: 22px; height: 22px; }
	.sv-menu-categories__row:active .sv-menu-categories__btn { background: var(--sv-accent); border-color: var(--sv-accent); color: #000; }
	.sv-menu-categories__row:active .sv-menu-categories__img img { transform: scale(1.06); }
	.sv-menu-categories__img img { transition: transform .4s var(--sv-ease); }
}
