/* Alfa Home Editor 1.1.0: hero split layout + furniture, browse, uses, supply sections.
   Loaded only on the plugin homepage and only when one of these shows. Theme tokens from global.css. */

/* Shared heading row */
.alfa-nx-head { display: flex; align-items: end; justify-content: space-between; gap: clamp(24px, 5vw, 64px); margin-bottom: clamp(30px, 4.5vw, 52px); }
.alfa-nx-head h2 { max-width: 760px; margin: 0; font-size: var(--alfa-h2); font-weight: 500; line-height: 1.25; }
.alfa-nx-head__side { display: grid; justify-items: start; gap: 16px; max-width: 430px; }
.alfa-nx-head__side p { margin: 0; color: var(--color-muted); }
.alfa-fx ul, .alfa-bx ul, .alfa-ux ul { margin: 0; padding: 0; list-style: none; }
.alfa-fx img, .alfa-bx img, .alfa-ux img { width: 100%; height: 100%; object-fit: cover; }

/* Marble furniture */
.alfa-fx { background: var(--alfa-stone); }
.alfa-fx__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.alfa-fx__tile { display: grid; gap: 12px; }
.alfa-fx__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7e2d9; }
.alfa-fx__media img { transition: transform .5s cubic-bezier(.23, 1, .32, 1); }
.alfa-fx__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.alfa-fx__name span { color: var(--alfa-gold); transition: transform .22s ease; }
.alfa-fx__custom { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: clamp(26px, 3.5vw, 40px); padding: 20px 24px; border: 1px solid var(--color-border); background: var(--alfa-paper); }
.alfa-fx__custom-copy { display: grid; gap: 4px; }
.alfa-fx__custom h3 { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.alfa-fx__custom p { margin: 0; font-size: 1.02rem; color: #4f4e48; }
.alfa-fx__custom .button { flex: none; }

/* Browse by colour and origin */
.alfa-bx { background: var(--alfa-paper); }
.alfa-bx__group + .alfa-bx__group { margin-top: clamp(28px, 3.5vw, 44px); }
.alfa-bx__group-title { margin: 0 0 16px; font-size: 1.15rem; font-weight: 700; }
.alfa-bx__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 18px 14px; }
.alfa-bx__chip { display: grid; gap: 8px; }
.alfa-bx__swatch { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: #e7e2d9; box-shadow: inset 0 0 0 1px rgba(23, 24, 21, .08); }
.alfa-bx__swatch img { transition: transform .5s cubic-bezier(.23, 1, .32, 1); }
.alfa-bx__name { font-size: .95rem; font-weight: 600; line-height: 1.4; }

/* Uses */
.alfa-ux { color: #f6f2e9; background: var(--alfa-charcoal); }
.alfa-ux .eyebrow { color: var(--alfa-gold-on-dark); }
.alfa-ux .alfa-nx-head__side p { color: #bdb9ae; }
.alfa-ux__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.alfa-ux__card { display: grid; align-content: start; gap: 10px; }
.alfa-ux__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 6px; background: #2b2c28; }
.alfa-ux__media img { transition: transform .5s cubic-bezier(.23, 1, .32, 1); }
.alfa-ux__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.25rem; font-weight: 700; }
.alfa-ux__name span { color: var(--alfa-gold-on-dark); }
.alfa-ux__text { color: #bdb9ae; }
.alfa-ux__action { margin-top: clamp(30px, 4vw, 46px); }

/* Supply outside Riyadh */
.alfa-sx { padding-block: var(--alfa-section-y-compact); background: #efe8db; }
.alfa-sx__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; }
.alfa-sx h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 700; line-height: 1.3; }
.alfa-sx p { max-width: 760px; margin: 0; color: #4f4e48; }
.alfa-sx .button { flex: none; }

@media (hover: hover) and (pointer: fine) {
	.alfa-fx__tile:hover img, .alfa-bx__chip:hover img, .alfa-ux__card:hover img { transform: scale(1.04); }
	.alfa-fx__tile:hover .alfa-fx__name span { transform: translateX(-4px); }
	html[dir="ltr"] .alfa-fx__tile:hover .alfa-fx__name span { transform: translateX(4px); }
	.alfa-bx__chip:hover .alfa-bx__name, .alfa-fx__tile:hover .alfa-fx__name { color: var(--alfa-gold); }
}

/* Hero, alternative layout: slabs | furniture */
.alfa-hero--split { position: relative; overflow: hidden; color: #f6f2e9; background: #000; }
.alfa-hero--split::after { position: absolute; z-index: 2; inset: 0 0 auto; height: 120px; content: ''; pointer-events: none; background: linear-gradient(rgba(8, 10, 8, .6), transparent); }
.alfa-split { display: grid; grid-template-columns: 1fr 1fr; }
.alfa-split__panel { position: relative; height: 100vh; height: 100dvh; min-height: 620px; max-height: 1100px; overflow: hidden; }
.alfa-split__panel + .alfa-split__panel { border-inline-start: 1px solid rgba(246, 242, 233, .16); }
/* The posters are 4:5 frames on black with the slab / room in the top part (--split-edge = where it ends);
   the box is sized so that edge sits above the copy, the rest of the panel stays black. */
.alfa-split__panel--slabs { --split-edge: .718; }
.alfa-split__panel--furniture { --split-edge: .56; }
.alfa-split__media { position: absolute; inset: 0 0 auto; height: min(100%, calc((100% - 290px) / var(--split-edge, .7))); }
.alfa-split__media img { width: 100%; height: 100%; object-fit: contain; object-position: center top; }
.alfa-split__panel::after { position: absolute; inset: 0; content: ''; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .9) 0, rgba(0, 0, 0, .55) 26%, transparent 48%); }
.alfa-split__copy { position: absolute; z-index: 1; inset-inline: clamp(22px, 3.5vw, 56px); bottom: clamp(44px, 7vh, 80px); display: grid; justify-items: center; gap: 12px; text-align: center; }
.alfa-split__copy h2 { max-width: 24ch; margin: 0; font-size: clamp(1.5rem, 2.3vw, 2.4rem); font-weight: 800; line-height: 1.25; }
.alfa-split__copy p { max-width: 44ch; margin: 0; color: #cfcabe; }
.alfa-hero--split .alfa-hero__cta { margin-top: 6px; }

@media (max-width: 1024px) {
	.alfa-fx__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.alfa-nx-head, .alfa-sx__inner, .alfa-fx__custom { flex-direction: column; align-items: flex-start; }
	/* Rows scroll sideways inside the section; the page itself never scrolls sideways. */
	.alfa-fx__grid, .alfa-bx__grid, .alfa-ux__grid { grid-template-columns: none; grid-auto-flow: column; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 10px; }
	.alfa-fx__grid { grid-auto-columns: 74%; }
	.alfa-bx__grid { grid-auto-columns: 34%; }
	.alfa-ux__grid { grid-auto-columns: 80%; }
	.alfa-fx__grid > li, .alfa-bx__grid > li, .alfa-ux__grid > li { scroll-snap-align: start; }
	.alfa-fx__custom { padding: 18px; }
	.alfa-split { grid-template-columns: 1fr; padding-top: 72px; }
	.alfa-split__panel { height: auto; min-height: 0; max-height: none; }
	.alfa-split__panel + .alfa-split__panel { border-inline-start: 0; border-top: 1px solid rgba(246, 242, 233, .16); }
	.alfa-split__media { position: relative; height: auto; aspect-ratio: 1; }
	.alfa-split__media img { object-fit: cover; }
	.alfa-split__panel::after { display: none; }
	.alfa-split__copy { position: relative; inset: auto; padding: 4px 20px 34px; margin-top: -24px; }
	.alfa-split__copy h2 { font-size: 1.5rem; }
	.alfa-split__copy p { font-size: .98rem; }
	.alfa-hero--split .alfa-hero__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.alfa-fx img, .alfa-bx img, .alfa-ux img { transition: none; }
}
