/* ==========================================================================
   DOCUMENTATION STANDARD
   This stylesheet is organised into labelled sections. Each component or
   related selector group has a simple comment explaining its purpose.
   All website rules are kept in this single documented stylesheet.
   ========================================================================== */

/*
  AYRA FLOWERS — SHARED STYLESHEET
  This file contains theme colours, layout, components, animations,
  responsive rules, and styles for the gallery, checkout and admin pages.
*/

/* Global colour variables and reusable design values. */
:root {
  --ivory: #f4eee3;
  --ivory-soft: #fbf6ed;
  --ink: #161412;
  --muted: #756d62;
  --line: rgba(22, 20, 18, 0.16);
  --rose: #d77a91;
  --plum: #8060e9;
  --sage: #95a883;
  --gold: #7a5d16;
  --forest: #111b16;
  --panel: rgba(255, 252, 246, 0.74);
  --shadow: 0 30px 90px rgba(20, 14, 10, 0.14);
  --radius: 28px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', Arial, sans-serif;
}

/* Style rule for: html[data-theme='dark']. */
html[data-theme='dark'] {
  --ivory: #10110f;
  --ivory-soft: #151713;
  --ink: #f2eadb;
  --muted: #b9ad99;
  --line: rgba(242, 234, 219, 0.15);
  --panel: rgba(24, 27, 22, 0.76);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

/* Base document behaviour. */
html {
  scroll-behavior: smooth;
}

/* Shared body typography, colours and page background. */
body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

/* Style rule for: body.is-loading. */
body.is-loading {
  overflow: hidden;
}

/* Style rule for: a. */
a {
  color: inherit;
  text-decoration: none;
}

button,
/* Style rule for: input. */
input {
  font: inherit;
}

/* Style rule for: button. */
button {
  cursor: pointer;
}

/* Style rule for: img. */
img {
  display: block;
  max-width: 100%;
}

/* Style rule for: ::selection. */
::selection {
  background: var(--plum);
  color: white;
}

/* Style rule for: #petalCanvas. */
#petalCanvas {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
}

/* Style rule for: .cursor. */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  pointer-events: none;
  mix-blend-mode: difference;
  color: white;
}

/* Hide mouse-only effects on phones and tablets. */
@media (hover: none), (pointer: coarse) {
  .cursor,
  #petalCanvas {
    display: none;
  }
}

/* Style rule for: .intro. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: var(--ivory);
  color: var(--ink);
}

/* Style rule for: .intro__panel. */
.intro__panel {
  width: min(560px, 86vw);
  min-height: 360px;
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 64px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* Style rule for: .intro__logo. */
.intro__logo {
  width: min(320px, 64vw);
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.12));
}

/* Style rule for: .intro__caption. */
.intro__caption {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.72rem;
}

/* Transparent homepage navigation. */
.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 54px);
  background: transparent;
  transition: color 0.25s ease, transform 0.3s ease;
}

/* Style rule for: .brand img. */
.brand img {
  width: 104px;
  height: auto;
}

/* Style rule for: .main-nav. */
.main-nav {
  justify-self: center;
  display: flex;
  gap: clamp(12px, 1.4vw, 26px);
  align-items: center;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Style rule for: .main-nav a. */
.main-nav a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}

/* Style rule for: .main-nav a::after. */
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: currentColor;
  transition: transform 0.35s ease;
}

/* Style rule for: .main-nav a:hover::after. */
.main-nav a:hover::after {
  transform: scaleX(1);
}

/* Style rule for: .header-actions. */
.header-actions {
  display: flex;
  gap: 10px;
  justify-self: end;
  align-items: center;
  white-space: nowrap;
}

.icon-button,
/* Style rule for: .basket-button. */
.basket-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

/* Style rule for: .basket-button strong. */
.basket-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-size: 0.75rem;
}

.section-dark,
/* Style rule for: .section-light. */
.section-light {
  position: relative;
  min-height: 100vh;
  padding: clamp(88px, 12vw, 160px) clamp(20px, 5vw, 72px);
}

/* Style rule for: .section-dark. */
.section-dark {
  color: var(--ivory-soft);
  background: var(--forest);
}

/* Style rule for: html[data-theme='dark'] .section-dark. */
html[data-theme='dark'] .section-dark {
  color: var(--ink);
  background: #080907;
}

/* Style rule for: .section-light. */
.section-light {
  background: var(--ivory);
  color: var(--ink);
}

/* Full-screen homepage hero. */
.hero {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 100svh;
}

/* Style rule for: .hero::before. */
.hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 72% 44%, rgba(215, 122, 145, 0.2), transparent 34%),
    radial-gradient(circle at 22% 70%, rgba(149, 168, 131, 0.18), transparent 36%);
  animation: backgroundBreath 9s ease-in-out infinite alternate;
}

/* Style rule for: .hero__backtext. */
.hero__backtext {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 0;
  opacity: 0.16;
  font-size: clamp(5rem, 18vw, 19rem);
  line-height: 0.78;
  font-weight: 900;
  letter-spacing: -0.1em;
  white-space: nowrap;
  color: var(--plum);
  pointer-events: none;
}

/* Style rule for: .hero__backtext span:first-child. */
.hero__backtext span:first-child {
  transform: translateX(-8vw);
}

/* Style rule for: .hero__backtext span:last-child. */
.hero__backtext span:last-child {
  transform: translateX(18vw);
}

/* Style rule for: .hero__copy. */
.hero__copy {
  position: relative;
  z-index: 2;
  width: min(720px, 92vw);
  text-align: center;
  margin-top: 5vh;
}

/* Style rule for: .eyebrow. */
.eyebrow {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
}

h1,
h2,
/* Style rule for: h3. */
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.045em;
}

/* Style rule for: h1. */
h1 {
  font-size: clamp(4rem, 10vw, 11.5rem);
  line-height: 0.82;
}

/* Style rule for: h2. */
h2 {
  font-size: clamp(3.1rem, 7vw, 8.2rem);
  line-height: 0.88;
}

/* Style rule for: h3. */
h3 {
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 0.9;
}

/* Style rule for: .hero__text. */
.hero__text {
  width: min(600px, 92vw);
  margin: 30px auto 0;
  color: rgba(244, 238, 227, 0.78);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.7;
}

/* Style rule for: .hero__actions. */
.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* Shared primary and secondary button styles. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

/* Style rule for: .button:hover. */
.button:hover {
  transform: translateY(-4px);
}

/* Style rule for: .button--primary. */
.button--primary {
  color: var(--forest);
  background: var(--ivory-soft);
}

/* Style rule for: .button--ghost. */
.button--ghost {
  color: inherit;
  background: transparent;
}

/* Style rule for: .hero-flower-stage. */
.hero-flower-stage {
  position: absolute;
  z-index: 1;
  width: min(50vw, 680px);
  aspect-ratio: 1;
  right: 2vw;
  top: 48%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* Style rule for: .hero-orbit. */
.hero-orbit {
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(244, 238, 227, 0.18);
  border-radius: 43% 57% 52% 48% / 48% 44% 56% 52%;
}

/* Style rule for: .hero-orbit--two. */
.hero-orbit--two {
  inset: 24%;
  transform: rotate(40deg);
}

/* Style rule for: .hero-flower--main. */
.hero-flower--main {
  width: min(34vw, 440px);
  filter: drop-shadow(0 44px 70px rgba(0, 0, 0, 0.34));
}

/* Style rule for: .hero-flower--small. */
.hero-flower--small {
  position: absolute;
  width: min(11vw, 150px);
  filter: blur(0.2px) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.24));
}

/* Style rule for: .hero-flower--small.one. */
.hero-flower--small.one {
  left: 2%;
  bottom: 24%;
}

/* Style rule for: .hero-flower--small.two. */
.hero-flower--small.two {
  right: 4%;
  top: 17%;
}

/* Style rule for: .scroll-hint. */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: rgba(244, 238, 227, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
}

/* Style rule for: .scroll-hint span. */
.scroll-hint span {
  width: 1px;
  height: 52px;
  background: currentColor;
  transform-origin: top;
  animation: scrollLine 1.4s ease-in-out infinite;
}

/* Style rule for: .marquee-section. */
.marquee-section {
  overflow: hidden;
  min-height: 62vh;
  display: grid;
  align-items: center;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

/* Style rule for: .marquee-track. */
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(30px, 6vw, 100px);
  width: max-content;
  will-change: transform;
}

/* Style rule for: .marquee-track span. */
.marquee-track span {
  white-space: nowrap;
  font-size: clamp(5rem, 15vw, 18rem);
  line-height: 0.78;
  font-weight: 900;
  letter-spacing: -0.09em;
  color: var(--plum);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.06);
}

/* Style rule for: .marquee-track img. */
.marquee-track img {
  width: clamp(180px, 22vw, 420px);
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.18));
}

/* Style rule for: .section-label. */
.section-label {
  position: absolute;
  top: 120px;
  left: clamp(20px, 5vw, 72px);
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* Style rule for: .experience__grid. */
.experience__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}

/* Style rule for: .statement-card. */
.statement-card {
  max-width: 620px;
  padding-top: 80px;
}

.statement-card p:last-child,
.condolences__text p,
.surprise-card p,
/* Style rule for: .contact-card p. */
.contact-card p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Style rule for: .image-stack. */
.image-stack {
  position: relative;
  min-height: 650px;
}

/* Style rule for: .stack-image. */
.stack-image {
  position: absolute;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

/* Style rule for: .stack-image--large. */
.stack-image--large {
  right: 0;
  top: 0;
  width: 72%;
}

/* Style rule for: .stack-image--small. */
.stack-image--small {
  left: 0;
  bottom: 0;
  width: 48%;
}

/* Style rule for: .section-heading. */
.section-heading {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin-bottom: clamp(42px, 7vw, 100px);
}

/* Style rule for: .section-heading--split. */
.section-heading--split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

/* Style rule for: .collection-strip. */
.collection-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Style rule for: .collection-card. */
.collection-card {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.2);
}

/* Style rule for: .collection-card img. */
.collection-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 60px 30px 180px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Style rule for: .collection-card:hover img. */
.collection-card:hover img {
  transform: scale(1.08) rotate(-2deg);
}

/* Style rule for: .collection-card div. */
.collection-card div {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

/* Style rule for: .collection-card span. */
.collection-card span {
  color: var(--gold);
  font-weight: 900;
}

/* Style rule for: .collection-card p. */
.collection-card p {
  margin: 12px 0 18px;
  color: rgba(244, 238, 227, 0.72);
}

.collection-card button,
/* Style rule for: .surprise-card button. */
.surprise-card button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--forest);
  background: var(--ivory-soft);
  font-weight: 900;
}

/* Style rule for: .filter-row. */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Style rule for: .filter. */
.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  background: transparent;
  transition: transform 0.25s ease, background 0.25s ease;
}

.filter.is-active,
/* Style rule for: .filter:hover. */
.filter:hover {
  background: var(--ink);
  color: var(--ivory);
  transform: translateY(-2px);
}

/* Style rule for: .product-grid. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Style rule for: .product-tile. */
.product-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  min-height: 380px;
  padding: 22px;
  background: var(--ivory-soft);
  box-shadow: 0 24px 70px rgba(20, 14, 10, 0.08);
}

/* Style rule for: .product-tile img. */
.product-tile img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Style rule for: .product-tile:hover img. */
.product-tile:hover img {
  transform: translateY(-12px) scale(1.05) rotate(2deg);
}

/* Style rule for: .product-tile h3. */
.product-tile h3 {
  margin-top: 12px;
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

/* Style rule for: .product-tile footer. */
.product-tile footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

/* Style rule for: .product-tile button. */
.product-tile button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  padding: 10px 14px;
  font-weight: 800;
}

/* Style rule for: .condolences. */
.condolences {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
}

/* Style rule for: .condolences img. */
.condolences img {
  width: min(540px, 90vw);
  justify-self: center;
  filter: drop-shadow(0 45px 70px rgba(0, 0, 0, 0.42));
}

/* Style rule for: .surprise-deck. */
.surprise-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Style rule for: .surprise-card. */
.surprise-card {
  min-height: 560px;
  display: grid;
  align-content: space-between;
  border-radius: 36px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--ivory-soft);
  box-shadow: var(--shadow);
}

/* Style rule for: .surprise-card img. */
.surprise-card img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Style rule for: .surprise-card:hover img. */
.surprise-card:hover img {
  transform: scale(1.08) rotate(-3deg);
}

/* Style rule for: .surprise-card button. */
.surprise-card button {
  color: var(--ivory);
  background: var(--ink);
}

/* Interactive bouquet builder layout. */
.builder-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(30px, 7vw, 100px);
  align-items: center;
}

/* Style rule for: .builder-stage. */
.builder-stage {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 42px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.06);
}

/* Style rule for: .bouquet-preview. */
.bouquet-preview {
  min-height: 480px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
}

/* Style rule for: .bouquet-preview span. */
.bouquet-preview span {
  color: rgba(244, 238, 227, 0.7);
}

/* Style rule for: .bouquet-preview img. */
.bouquet-preview img {
  position: absolute;
  width: 44%;
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.35));
}

/* Style rule for: .builder-total. */
.builder-total {
  display: flex;
  justify-content: space-between;
  margin: 22px 0;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Style rule for: .flower-picker. */
.flower-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Style rule for: .flower-choice. */
.flower-choice {
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 24px;
  overflow: hidden;
}

/* Style rule for: .flower-choice img. */
.flower-choice img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

/* Style rule for: .flower-choice:hover img. */
.flower-choice:hover img {
  transform: scale(1.12) rotate(5deg);
}

/* Style rule for: .flower-choice span. */
.flower-choice span {
  display: block;
  margin-top: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Style rule for: .editorial-split. */
.editorial-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}

/* Style rule for: .editorial-split img. */
.editorial-split img {
  width: min(560px, 100%);
  justify-self: center;
  filter: drop-shadow(0 35px 45px rgba(0, 0, 0, 0.12));
}

/* Style rule for: .contact. */
.contact {
  display: grid;
  place-items: center;
  min-height: 80vh;
}

/* Style rule for: .contact-card. */
.contact-card {
  width: min(820px, 92vw);
  padding: clamp(30px, 6vw, 76px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 48px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

/* Style rule for: .contact-card form. */
.contact-card form {
  display: grid;
  gap: 16px;
  margin-top: 38px;
}

/* Style rule for: .contact-card label. */
.contact-card label {
  display: grid;
  gap: 8px;
  color: rgba(244, 238, 227, 0.78);
}

/* Style rule for: .contact-card input. */
.contact-card input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 16px;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
}

/* Style rule for: .basket-panel. */
.basket-panel {
  position: fixed;
  z-index: 2000;
  top: 0;
  right: 0;
  width: min(480px, 94vw);
  height: 100svh;
  padding: 28px;
  transform: translateX(110%);
  background: var(--ivory-soft);
  color: var(--ink);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.22);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Style rule for: .basket-panel.is-open. */
.basket-panel.is-open {
  transform: translateX(0);
}

.basket-panel__head,
.basket-panel__foot,
/* Style rule for: .basket-item. */
.basket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.basket-panel__head button,
/* Style rule for: .basket-item button. */
.basket-item button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  width: 38px;
  height: 38px;
}

/* Style rule for: .basket-items. */
.basket-items {
  display: grid;
  gap: 12px;
  margin: 32px 0;
  max-height: 58vh;
  overflow: auto;
}

/* Style rule for: .basket-item. */
.basket-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

@keyframes backgroundBreath {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.08) rotate(3deg); }
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.25); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Style rule for: @media (max-width: 1180px). */
@media (max-width: 1180px) {
/* Style rule for: .site-header. */
  .site-header {
    grid-template-columns: auto auto;
  }

/* Style rule for: .main-nav. */
  .main-nav {
    display: none;
  }

  .product-grid,
  .collection-strip,
/* Style rule for: .surprise-deck. */
  .surprise-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Style rule for: @media (max-width: 780px). */
@media (max-width: 780px) {
  .section-dark,
/* Style rule for: .section-light. */
  .section-light {
    padding: 96px 18px;
  }

/* Style rule for: .brand img. */
  .brand img {
    width: 82px;
  }

/* Style rule for: .header-actions. */
  .header-actions {
    gap: 6px;
  }

  .icon-button,
/* Style rule for: .basket-button. */
  .basket-button {
    padding: 9px 10px;
    font-size: 0.75rem;
  }

/* Style rule for: .hero-flower-stage. */
  .hero-flower-stage {
    width: 92vw;
    right: auto;
    top: 38%;
    opacity: 0.5;
  }

/* Style rule for: .hero__copy. */
  .hero__copy {
    margin-top: 24vh;
  }

  .experience__grid,
  .condolences,
  .builder-layout,
/* Style rule for: .editorial-split. */
  .editorial-split {
    grid-template-columns: 1fr;
  }

/* Style rule for: .image-stack. */
  .image-stack {
    min-height: 430px;
  }

/* Style rule for: .section-heading--split. */
  .section-heading--split {
    display: grid;
  }

  .product-grid,
  .collection-strip,
  .surprise-deck,
/* Style rule for: .flower-picker. */
  .flower-picker {
    grid-template-columns: 1fr;
  }

/* Style rule for: .collection-card. */
  .collection-card {
    min-height: 500px;
  }
}

/* V2 contrast/pass fixes: readable controls in both themes without turning the nav into a heavy bar. */
:root {
  --control-bg: rgba(255, 252, 246, 0.9);
  --control-text: #161412;
  --control-border: rgba(22, 20, 18, 0.22);
  --control-invert-bg: #161412;
  --control-invert-text: #fbf6ed;
  --glass-strong: rgba(255, 252, 246, 0.82);
}

/* Style rule for: html[data-theme='dark']. */
html[data-theme='dark'] {
  --control-bg: rgba(17, 19, 15, 0.9);
  --control-text: #f2eadb;
  --control-border: rgba(242, 234, 219, 0.24);
  --control-invert-bg: #f2eadb;
  --control-invert-text: #111310;
  --glass-strong: rgba(17, 19, 15, 0.82);
}

/* Style rule for: .site-header. */
.site-header {
  color: var(--control-text);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.22);
}

/* Style rule for: .site-header::before. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 10px clamp(10px, 2vw, 26px);
  z-index: -1;
  opacity: 0.42;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
}

/* Style rule for: .brand. */
.brand {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  padding: 4px 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

/* Style rule for: .brand img. */
.brand img {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
}

/* Style rule for: html[data-theme='light'] .brand img. */
html[data-theme='light'] .brand img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) contrast(1.08) saturate(1.08);
}

.icon-button,
.basket-button,
.filter,
.product-tile button,
.collection-card button,
/* Style rule for: .surprise-card button. */
.surprise-card button {
  border-color: var(--control-border);
  background: var(--control-bg);
  color: var(--control-text);
  text-shadow: none;
}

/* Style rule for: .basket-button strong. */
.basket-button strong {
  background: var(--control-invert-bg);
  color: var(--control-invert-text);
}

.button--primary,
.filter.is-active,
.filter:hover,
.surprise-card button:hover,
.product-tile button:hover,
/* Style rule for: .collection-card button:hover. */
.collection-card button:hover {
  background: var(--control-invert-bg);
  color: var(--control-invert-text);
  border-color: var(--control-invert-bg);
}

/* Style rule for: .button--ghost. */
.button--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  backdrop-filter: blur(10px);
}

.product-tile,
/* Style rule for: .surprise-card. */
.surprise-card {
  color: var(--ink);
  background: var(--ivory-soft);
}

/* Style rule for: .product-tile footer strong. */
.product-tile footer strong {
  color: var(--ink);
}

.builder-stage,
.flower-choice,
.bouquet-preview,
/* Style rule for: .contact-card. */
.contact-card {
  border-color: var(--control-border);
  background: rgba(255, 255, 255, 0.075);
}

html[data-theme='light'] .builder-stage,
html[data-theme='light'] .flower-choice,
html[data-theme='light'] .bouquet-preview,
/* Style rule for: html[data-theme='light'] .contact-card. */
html[data-theme='light'] .contact-card {
  background: rgba(255, 252, 246, 0.78);
}

/* Style rule for: .flower-choice. */
.flower-choice {
  position: relative;
  color: inherit;
}

/* Style rule for: .flower-choice::after. */
.flower-choice::after {
  content: '+';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--control-invert-text);
  background: var(--control-invert-bg);
  font-weight: 900;
}

/* Style rule for: .bouquet-preview. */
.bouquet-preview {
  isolation: isolate;
}

/* Style rule for: .bouquet-preview img. */
.bouquet-preview img {
  width: 30%;
  max-height: 260px;
  transform-origin: 50% 82%;
}

/* Style rule for: .bouquet-preview::before. */
.bouquet-preview::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: 210px;
  height: 90px;
  transform: translateX(-50%) rotate(-4deg);
  border-radius: 50% 50% 24px 24px;
  background: linear-gradient(135deg, rgba(215,122,145,0.22), rgba(201,167,90,0.22));
  filter: blur(0.2px);
  opacity: 0.8;
  z-index: 0;
}

/* Style rule for: .bouquet-preview span. */
.bouquet-preview span {
  position: relative;
  z-index: 2;
  color: inherit;
  opacity: 0.72;
}

/* Style rule for: @media (max-width: 780px). */
@media (max-width: 780px) {
  .site-header::before { inset: 8px 10px; opacity: 0.72; }
  .brand img { width: 82px; }
  .bouquet-preview img { width: 38%; }
}


/* V3 theme correction: transparent navigation, stronger contrast, cleaner builder controls. */
:root {
  --ivory: #f3ecdf;
  --ivory-soft: #fffaf1;
  --ink: #17130f;
  --muted: #64594d;
  --line: rgba(23, 19, 15, 0.2);
  --forest: #111915;
  --panel: rgba(255, 250, 241, 0.84);
  --control-bg: rgba(255, 250, 241, 0.88);
  --control-text: #17130f;
  --control-border: rgba(23, 19, 15, 0.24);
  --control-invert-bg: #17130f;
  --control-invert-text: #fffaf1;
}

/* Style rule for: html[data-theme='dark']. */
html[data-theme='dark'] {
  --ivory: #0f110f;
  --ivory-soft: #171a16;
  --ink: #f5ecdc;
  --muted: #c7b9a4;
  --line: rgba(245, 236, 220, 0.18);
  --forest: #090b09;
  --panel: rgba(23, 26, 22, 0.86);
  --control-bg: rgba(245, 236, 220, 0.1);
  --control-text: #f5ecdc;
  --control-border: rgba(245, 236, 220, 0.3);
  --control-invert-bg: #f5ecdc;
  --control-invert-text: #0f110f;
}

/* Style rule for: .site-header. */
.site-header {
  background: transparent !important;
  color: var(--control-text);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.2);
}

/* Style rule for: .site-header::before. */
.site-header::before {
  display: none !important;
}

/* Style rule for: .brand. */
.brand {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Style rule for: .brand img. */
.brand img {
  width: 112px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 16px rgba(255, 250, 241, 0.55));
}

/* Style rule for: html[data-theme='dark'] .brand img. */
html[data-theme='dark'] .brand img {
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 18px rgba(245, 236, 220, 0.18));
}

/* Style rule for: .main-nav a. */
.main-nav a {
  color: var(--control-text);
  text-shadow: 0 2px 16px rgba(0,0,0,.22);
}

.icon-button,
/* Style rule for: .basket-button. */
.basket-button {
  background: var(--control-bg) !important;
  border: 1px solid var(--control-border) !important;
  color: var(--control-text) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

.button,
.filter,
.product-tile button,
.collection-card button,
.surprise-card button,
.builder-remove,
/* Style rule for: .builder-clear. */
.builder-clear {
  border: 1px solid var(--control-border) !important;
}

.button--primary,
.product-tile button,
.collection-card button,
/* Style rule for: .surprise-card button. */
.surprise-card button {
  background: var(--control-invert-bg) !important;
  color: var(--control-invert-text) !important;
}

.button--ghost,
/* Style rule for: .filter. */
.filter {
  background: var(--control-bg) !important;
  color: var(--control-text) !important;
}

.filter.is-active,
/* Style rule for: .filter:hover. */
.filter:hover {
  background: var(--control-invert-bg) !important;
  color: var(--control-invert-text) !important;
}

/* Style rule for: html[data-theme='dark'] .section-light. */
html[data-theme='dark'] .section-light {
  background: #11130f;
  color: var(--ink);
}

/* Style rule for: html[data-theme='dark'] .marquee-section. */
html[data-theme='dark'] .marquee-section {
  background: #11130f;
}

html[data-theme='dark'] .product-tile,
/* Style rule for: html[data-theme='dark'] .surprise-card. */
html[data-theme='dark'] .surprise-card {
  background: #171a16;
  color: var(--ink);
}

html[data-theme='dark'] .product-tile footer strong,
html[data-theme='dark'] .surprise-card p,
html[data-theme='dark'] .statement-card p:last-child,
/* Style rule for: html[data-theme='dark'] .contact-card p. */
html[data-theme='dark'] .contact-card p {
  color: var(--muted);
}

/* Style rule for: html[data-theme='light'] .section-dark. */
html[data-theme='light'] .section-dark {
  background: #111915;
  color: #fffaf1;
}

html[data-theme='light'] .section-dark .hero__text,
html[data-theme='light'] .section-dark .collection-card p,
/* Style rule for: html[data-theme='light'] .section-dark .contact-card label. */
html[data-theme='light'] .section-dark .contact-card label {
  color: rgba(255, 250, 241, 0.78);
}

.builder-stage,
.flower-choice,
.bouquet-preview,
/* Style rule for: .contact-card. */
.contact-card {
  border-color: rgba(255, 250, 241, 0.18) !important;
  background: rgba(255, 250, 241, 0.075) !important;
}

html[data-theme='dark'] .builder-stage,
html[data-theme='dark'] .flower-choice,
html[data-theme='dark'] .bouquet-preview,
/* Style rule for: html[data-theme='dark'] .contact-card. */
html[data-theme='dark'] .contact-card {
  border-color: rgba(245, 236, 220, 0.18) !important;
  background: rgba(245, 236, 220, 0.07) !important;
}

/* Style rule for: .builder-selected. */
.builder-selected {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
}

/* Style rule for: .builder-selected__empty. */
.builder-selected__empty {
  margin: 0;
  color: currentColor;
  opacity: 0.66;
  font-size: 0.95rem;
}

/* Style rule for: .builder-selected__item. */
.builder-selected__item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 250, 241, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 241, 0.08);
}

/* Style rule for: .builder-selected__item img. */
.builder-selected__item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.builder-selected__item strong,
/* Style rule for: .builder-selected__item span. */
.builder-selected__item span {
  display: block;
}

/* Style rule for: .builder-selected__item span. */
.builder-selected__item span {
  opacity: 0.72;
  font-size: 0.86rem;
}

.builder-remove,
/* Style rule for: .builder-clear. */
.builder-clear {
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--control-text);
  font-weight: 900;
}

/* Style rule for: .builder-remove. */
.builder-remove {
  width: 38px;
  height: 38px;
}

/* Style rule for: .builder-clear. */
.builder-clear {
  width: fit-content;
  padding: 10px 16px;
  margin-bottom: 16px;
}

/* Style rule for: .bouquet-preview img. */
.bouquet-preview img {
  width: 27%;
  max-height: 230px;
}

/* Style rule for: @media (max-width: 780px). */
@media (max-width: 780px) {
  .brand img { width: 86px; }
  .bouquet-preview img { width: 35%; }
  .builder-selected__item { grid-template-columns: 44px 1fr auto; }
}

/* V4 hero/header contrast correction. The header stays transparent, but changes text color based on the section underneath it. */
.site-header.header-on-dark {
  color: #fffaf1 !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

/* Style rule for: .site-header.header-on-dark .main-nav a. */
.site-header.header-on-dark .main-nav a {
  color: #fffaf1 !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.site-header.header-on-dark .icon-button,
/* Style rule for: .site-header.header-on-dark .basket-button. */
.site-header.header-on-dark .basket-button {
  background: rgba(255, 250, 241, 0.13) !important;
  border-color: rgba(255, 250, 241, 0.42) !important;
  color: #fffaf1 !important;
}

/* Style rule for: .site-header.header-on-dark .basket-button strong. */
.site-header.header-on-dark .basket-button strong {
  background: #fffaf1 !important;
  color: #111915 !important;
}

/* Style rule for: .site-header.header-on-dark .brand img. */
.site-header.header-on-dark .brand img {
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.74)) drop-shadow(0 0 20px rgba(255, 250, 241, 0.24));
}

.hero .button--primary,
html[data-theme='light'] .hero .button--primary,
/* Style rule for: html[data-theme='dark'] .hero .button--primary. */
html[data-theme='dark'] .hero .button--primary {
  background: #fffaf1 !important;
  color: #111915 !important;
  border-color: #fffaf1 !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

/* Style rule for: .hero .button--primary:hover. */
.hero .button--primary:hover {
  background: #f4df9f !important;
  border-color: #f4df9f !important;
  color: #111915 !important;
}

/* V5 final header readability fix: default light header text is dark, but sections with dark backgrounds force ivory text. */
html[data-theme='light'] .site-header:not(.header-on-dark),
/* Style rule for: html[data-theme='light'] .site-header:not(.header-on-dark) .main-nav a. */
html[data-theme='light'] .site-header:not(.header-on-dark) .main-nav a {
  color: #2b221b !important;
  text-shadow: 0 1px 14px rgba(255, 250, 241, 0.55);
}

html[data-theme='light'] .site-header.header-on-dark,
html[data-theme='light'] .site-header.header-on-dark .main-nav a,
html[data-theme='dark'] .site-header.header-on-dark,
/* Style rule for: html[data-theme='dark'] .site-header.header-on-dark .main-nav a. */
html[data-theme='dark'] .site-header.header-on-dark .main-nav a {
  color: #fffaf1 !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.56);
}

html[data-theme='light'] .site-header.header-on-dark .main-nav a::after,
/* Style rule for: html[data-theme='dark'] .site-header.header-on-dark .main-nav a::after. */
html[data-theme='dark'] .site-header.header-on-dark .main-nav a::after {
  background: #fffaf1 !important;
}

/* Separate gallery, checkout and admin pages. */
.inner-page {
  min-height: 100vh;
  background: var(--ivory);
  color: var(--ink);
}

/* Navigation used by gallery and checkout pages. */
.inner-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

/* Style rule for: .inner-header nav. */
.inner-header nav {
  justify-self: center;
  display: flex;
  gap: 24px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* Style rule for: .inner-header [aria-current='page']. */
.inner-header [aria-current='page'] {
  border-bottom: 1px solid currentColor;
}

/* Give the compact gallery header controls clear pointer feedback. */
.inner-header .icon-button,
.inner-header .basket-button {
  min-height: 0;
  padding: 10px 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.inner-header .icon-button:hover,
.inner-header .basket-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(20, 14, 10, 0.16);
}

/* Style rule for: .inner-hero. */
.inner-hero {
  padding: clamp(110px, 14vw, 190px) clamp(20px, 7vw, 110px) 70px;
  text-align: center;
}

/* Style rule for: .inner-hero--compact. */
.inner-hero--compact {
  padding-bottom: 36px;
}

/* Style rule for: .inner-hero h1. */
.inner-hero h1 {
  max-width: 1000px;
  margin: 12px auto;
  font: 600 clamp(3rem, 7vw, 7rem)/0.92 var(--font-serif);
}

/* Style rule for: .inner-hero > p:last-child. */
.inner-hero > p:last-child {
  max-width: 650px;
  margin: 22px auto 0;
  color: var(--muted);
}

/* Style rule for: .gallery-actions. */
.gallery-actions {
  display: flex;
  justify-content: flex-end;
  margin: 24px 0 34px;
}

/* Style rule for: .gallery-shop. */
.gallery-shop {
  padding: 20px clamp(20px, 5vw, 72px) 120px;
}

/* Style rule for: .full-gallery-grid. */
.full-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
}

/* Style rule for: .gallery-product. */
.gallery-product {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Lift gallery cards slightly to make browsing feel responsive. */
.gallery-product:hover {
  transform: translateY(-8px);
  box-shadow: 0 34px 90px rgba(20, 14, 10, 0.18);
}

/* Style rule for: .gallery-product img. */
.gallery-product img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.45s ease;
}

/* Gently enlarge the product image with its card. */
.gallery-product:hover img {
  transform: scale(1.035);
}

/* Style rule for: .gallery-product > div. */
.gallery-product > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  padding: 22px;
}

.gallery-product h2,
/* Style rule for: .gallery-product p. */
.gallery-product p {
  margin: 0;
}

/* Style rule for: .gallery-product h2. */
.gallery-product h2 {
  font: 600 2rem/1 var(--font-serif);
}

/* Style rule for: .gallery-product button. */
.gallery-product button {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 800;
}

/* Style rule for: .checkout-page. */
.checkout-page {
  padding-bottom: 100px;
}

/* Two-column guest checkout layout. */
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.65fr);
  gap: 42px;
  width: min(1260px, calc(100% - 40px));
  margin: 0 auto;
  align-items: start;
}

.checkout-form,
.order-summary,
.admin-login,
.order-card,
/* Style rule for: .admin-stats article. */
.admin-stats article {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.checkout-form,
/* Style rule for: .order-summary. */
.order-summary {
  border-radius: 32px;
  padding: clamp(24px, 4vw, 48px);
}

/* Style rule for: .checkout-form fieldset. */
.checkout-form fieldset {
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

.checkout-form legend,
/* Style rule for: .order-summary h2. */
.order-summary h2 {
  margin-bottom: 22px;
  font: 600 2rem/1 var(--font-serif);
}

/* Style rule for: .form-grid. */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Style rule for: .form-grid .full-width. */
.form-grid .full-width {
  grid-column: 1 / -1;
}

/* Style rule for: .checkout-form label. */
.checkout-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.checkout-form input,
.checkout-form textarea,
.order-card select,
/* Style rule for: .admin-login input. */
.admin-login input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--ivory);
}

/* Explain the fresh-product delivery area beside the enquiry fields. */
.delivery-notice {
  margin: 0;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ivory) 65%, transparent);
  color: var(--muted);
  line-height: 1.6;
}

/* Explain that either contact field can satisfy the enquiry requirement. */
.contact-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Style rule for: .checkout-message. */
.checkout-message {
  color: var(--muted);
  line-height: 1.6;
}

/* Style rule for: .checkout-submit. */
.checkout-submit {
  width: 100%;
  justify-content: center;
  margin-top: 24px;
}

/* Style rule for: .checkout-submit:disabled. */
.checkout-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Style rule for: .order-summary. */
.order-summary {
  position: sticky;
  top: 120px;
}

.checkout-item,
/* Style rule for: .summary-total. */
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

/* Style rule for: .summary-total. */
.summary-total {
  margin: 18px 0;
  font-size: 1.2rem;
}

/* Administration login and dashboard layout. */
.admin-page main {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 60px 0 100px;
}

/* Style rule for: .admin-login. */
.admin-login {
  width: min(480px, 100%);
  margin: 8vh auto 0;
  padding: 42px;
  border-radius: 32px;
  text-align: center;
}

/* Style rule for: .admin-login img. */
.admin-login img {
  width: 150px;
  margin: 0 auto;
}

/* Style rule for: .admin-login form. */
.admin-login form {
  display: grid;
  gap: 18px;
  text-align: left;
}

/* Style rule for: .admin-topbar. */
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
}

/* Style rule for: .admin-topbar h1. */
.admin-topbar h1 {
  margin: 0;
  font: 600 4.5rem/1 var(--font-serif);
}

/* Style rule for: .admin-topbar > div:last-child. */
.admin-topbar > div:last-child {
  display: flex;
  gap: 10px;
}

/* Style rule for: .admin-stats. */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}

/* Style rule for: .admin-stats article. */
.admin-stats article {
  display: grid;
  gap: 10px;
  padding: 26px;
  border-radius: 24px;
}

/* Style rule for: .admin-stats strong. */
.admin-stats strong {
  font-size: 2rem;
}

/* Style rule for: .orders-list. */
.orders-list {
  display: grid;
  gap: 22px;
}

/* Style rule for: .order-card. */
.order-card {
  padding: 28px;
  border-radius: 28px;
}

.order-card header,
/* Style rule for: .order-card footer. */
.order-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.order-card h2,
.order-card header span,
/* Style rule for: .order-card p. */
.order-card p {
  margin: 0;
}

/* Style rule for: .order-card h2. */
.order-card h2 {
  font: 600 2rem/1 var(--font-serif);
}

/* Style rule for: .order-meta. */
.order-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 24px 0;
}

/* Style rule for: .order-card footer button. */
.order-card footer button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #6f2b31;
  color: white;
}

.admin-whatsapp {
  margin-left: auto;
  text-decoration: none;
}

/* Style rule for: .empty-admin. */
.empty-admin {
  padding: 60px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 28px;
}

/* Style rule for: @media (max-width: 900px). */
@media (max-width: 900px) {
  .inner-header { grid-template-columns: auto 1fr; }
  .inner-header nav { display: none; }
  .full-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .admin-stats { grid-template-columns: 1fr; }
}

/* Style rule for: @media (max-width: 620px). */
@media (max-width: 620px) {
  .full-gallery-grid,
  .form-grid,
  .order-meta { grid-template-columns: 1fr; }
  .form-grid .full-width { grid-column: auto; }
  .admin-topbar,
  .order-card header,
  .order-card footer { align-items: flex-start; flex-direction: column; }
}

/* Shared footer used on every page. */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  background: var(--ivory-soft);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem 1.2rem;
}

.site-footer__links a,
.cookie-banner a,
.legal-section a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25rem;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.site-footer__links a:hover,
.cookie-banner a:hover,
.legal-section a:hover {
  color: var(--rose);
  text-decoration-color: currentColor;
}

/* Essential-storage notice shown until the visitor acknowledges it. */
.cookie-banner {
  position: fixed;
  z-index: 12000;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: min(560px, calc(100% - 2rem));
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  background: var(--ivory-soft);
  box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.75rem;
}

/* Bilingual legal-document hub. */
.legal-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.legal-tabs .button {
  border: 1px solid var(--line);
  background: var(--panel);
}

.legal-sections {
  display: grid;
  gap: 1rem;
}

.legal-section {
  scroll-margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  background: var(--panel);
}

.legal-section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.legal-section p {
  max-width: 78ch;
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.legal-section--warning {
  border-color: color-mix(in srgb, var(--gold) 60%, var(--line));
}

@media (max-width: 760px) {
  .site-footer,
  .cookie-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__links {
    justify-content: flex-start;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Keep the admin login title inside its card on every screen size. */
.admin-login h1 {
  max-width: 100%;
  margin: 18px auto 30px;
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 0.88;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Give the admin card enough room without letting it become too wide. */
.admin-login {
  width: min(560px, 100%);
  overflow: hidden;
}

/* Style rule for: @media (max-width: 620px). */
@media (max-width: 620px) {
/* Style rule for: .admin-login. */
  .admin-login {
    padding: 30px 22px;
  }

/* Style rule for: .admin-login h1. */
  .admin-login h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }
}

/* Give every homepage button the same lift feedback used by gallery controls. */
body[data-i18n-title='pageTitleHome'] button,
body[data-i18n-title='pageTitleHome'] .button {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

body[data-i18n-title='pageTitleHome'] button:not(:disabled):hover,
body[data-i18n-title='pageTitleHome'] .button:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(20, 14, 10, 0.16);
}

/* Keep the complete desktop navigation on one line at common laptop widths. */
@media (min-width: 1181px) and (max-width: 1700px) {
  .site-header {
    gap: clamp(8px, 1vw, 16px);
    padding: 18px clamp(12px, 1.5vw, 24px);
  }

  .brand img {
    width: clamp(72px, 6vw, 92px);
  }

  .main-nav {
    gap: clamp(6px, 0.65vw, 10px);
    font-size: clamp(0.56rem, 0.62vw, 0.66rem);
    letter-spacing: 0.05em;
  }

  .header-actions {
    gap: 6px;
  }

  .icon-button,
  .basket-button {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  .basket-button strong {
    margin-left: 4px;
  }
}


/* Language controls added to the internal pages and admin screen. */
.inner-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Style rule for: .admin-language-toggle. */
.admin-language-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 24%, transparent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
}

/* Keep the administration heading fully inside the login card. */
.admin-login h1 {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  font-size: clamp(2.75rem, 5vw, 5.5rem);
  line-height: 0.86;
  overflow-wrap: normal;
  word-break: normal;
}

/* Style rule for: @media (max-width: 700px). */
@media (max-width: 700px) {
  /* Stack internal navigation controls cleanly on small screens. */
  .inner-header-actions {
    gap: 0.4rem;
  }

/* Style rule for: .admin-login h1. */
  .admin-login h1 {
    font-size: clamp(2.4rem, 15vw, 4.2rem);
  }
}
/* ==========================================================================
   AYRA ADDITIONS
   Every rule in this file is documented directly above the selector.
   ========================================================================== */

/* Keep internal page controls grouped with equal spacing. */
.inner-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* Place the two condolence actions next to each other and allow wrapping. */
.condolence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Give the funeral page a quieter background in light mode. */
html[data-theme='light'] .funeral-page {
  background: #eee9e0;
  color: #211d19;
}

/* Give the funeral page a deep neutral background in dark mode. */
html[data-theme='dark'] .funeral-page {
  background: #151716;
  color: #f5f0e8;
}

/* Limit the funeral introduction width for calm, readable typography. */
.funeral-hero {
  max-width: 1050px;
}

/* Add more space below the funeral filter controls. */
.funeral-shop .filter-row {
  margin-bottom: 2rem;
}

/* Use a subtle neutral card background for funeral products in light mode. */
html[data-theme='light'] .funeral-product {
  background: #f8f5ef;
  border-color: rgba(33, 29, 25, 0.12);
}

/* Use a subtle dark card background for funeral products in dark mode. */
html[data-theme='dark'] .funeral-product {
  background: #202321;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Keep funeral product images visually restrained and consistent. */
.funeral-product img {
  filter: saturate(0.88) contrast(0.98);
}

/* Position the administration language and theme controls together. */
.admin-global-controls {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 30;
  display: flex;
  gap: 0.65rem;
}

/* Improve internal page surfaces when dark mode is active. */
html[data-theme='dark'] .inner-page {
  background: #141615;
  color: #f7f2ea;
}

/* Keep the internal header readable in dark mode. */
html[data-theme='dark'] .inner-header {
  background: rgba(20, 22, 21, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Use light navigation text in dark mode. */
html[data-theme='dark'] .inner-header a {
  color: #f7f2ea;
}

/* Keep form and dashboard surfaces distinct in dark mode. */
html[data-theme='dark'] .checkout-form,
html[data-theme='dark'] .order-summary,
html[data-theme='dark'] .admin-login,
html[data-theme='dark'] .admin-stats article,
/* Style rule for: html[data-theme='dark'] .order-card. */
html[data-theme='dark'] .order-card {
  background: #202321;
  color: #f7f2ea;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Make text inputs readable against dark form surfaces. */
html[data-theme='dark'] .checkout-form input,
html[data-theme='dark'] .checkout-form textarea,
html[data-theme='dark'] .admin-login input,
/* Style rule for: html[data-theme='dark'] .order-card select. */
html[data-theme='dark'] .order-card select {
  background: #141615;
  color: #f7f2ea;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Make gallery cards readable in dark mode. */
html[data-theme='dark'] .gallery-product {
  background: #202321;
  color: #f7f2ea;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Keep gallery product prices and supporting copy visible in dark mode. */
html[data-theme='dark'] .gallery-product p,
/* Style rule for: html[data-theme='dark'] .inner-hero > p. */
html[data-theme='dark'] .inner-hero > p {
  color: rgba(247, 242, 234, 0.72);
}

/* Let the internal navigation wrap safely on narrower desktop widths. */
.inner-header nav {
  flex-wrap: wrap;
}

/* Stack internal navigation controls cleanly on small screens. */
@media (max-width: 760px) {
/* Style rule for: .inner-header-actions. */
  .inner-header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Stack the condolence action buttons on very small screens. */
@media (max-width: 520px) {
/* Style rule for: .condolence-actions. */
  .condolence-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   ADMIN PRODUCT MANAGEMENT
   These rules style the editable product catalogue inside the dashboard.
   ========================================================================== */

/* Arrange the dashboard action buttons in one flexible row. */
.admin-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Display the orders and products dashboard tabs in one row. */
.admin-tabs {
  display: flex;
  gap: 0.65rem;
  margin: 1.5rem 0;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(32, 25, 21, 0.14);
}

/* Style one administration tab as a compact rounded control. */
.admin-tab {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Mark the currently selected administration tab. */
.admin-tab.is-active {
  background: var(--ink, #201915);
  color: var(--ivory, #fbf7ef);
}

/* Keep hidden administration views completely removed from the layout. */
.admin-view[hidden] {
  display: none !important;
}

/* Arrange search and product action controls above the editor. */
.product-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Let the product search field use the remaining toolbar width. */
.product-admin-toolbar input {
  flex: 1 1 260px;
  min-height: 46px;
  border: 1px solid rgba(32, 25, 21, 0.18);
  border-radius: 999px;
  padding: 0 1rem;
  background: var(--cream, #efe3d0);
  color: inherit;
  font: inherit;
}

/* Create the product list and editor two-column layout. */
.product-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 1.25rem;
  align-items: start;
}

/* Create a scrollable product list beside the editor. */
.product-admin-list {
  display: grid;
  gap: 0.65rem;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

/* Style one editable product item in the sidebar. */
.product-admin-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  border: 1px solid rgba(32, 25, 21, 0.14);
  border-radius: 18px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.45);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

/* Highlight the product currently opened in the editor. */
.product-admin-item.is-active {
  border-color: var(--gold, #b99b62);
  box-shadow: 0 0 0 2px rgba(185, 155, 98, 0.16);
}

/* Keep product thumbnails square and neatly cropped. */
.product-admin-item img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.55);
}

/* Stack product name and supporting data vertically. */
.product-admin-item span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

/* Prevent long product names from breaking the sidebar width. */
.product-admin-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Use smaller muted text for price and category details. */
.product-admin-item small {
  opacity: 0.68;
}

/* Show product visibility as a compact status label. */
.product-admin-item em {
  font-size: 0.72rem;
  font-style: normal;
  opacity: 0.72;
}

/* Style the product editor as a clear dashboard panel. */
.product-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border: 1px solid rgba(32, 25, 21, 0.14);
  border-radius: 26px;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.55);
}

/* Stack every product editor label and its field. */
.product-editor label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Make text areas and long controls use the complete editor width. */
.product-editor label:has(textarea),
.product-editor label:has(input[type='file']),
/* Style rule for: .product-editor label:has(input[type='text'][id='productImage']). */
.product-editor label:has(input[type='text'][id='productImage']) {
  grid-column: 1 / -1;
}

/* Give all product editor fields a shared visual style. */
.product-editor input,
.product-editor textarea,
/* Style rule for: .product-editor select. */
.product-editor select {
  width: 100%;
  border: 1px solid rgba(32, 25, 21, 0.18);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: var(--ivory, #fbf7ef);
  color: inherit;
  font: inherit;
}

/* Allow product descriptions to be resized only vertically. */
.product-editor textarea {
  resize: vertical;
}

/* Display the selected product image in a large preview area. */
.product-editor__preview {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
  overflow: hidden;
}

/* Keep the product preview visible without cropping transparent images. */
.product-editor__preview img {
  width: min(100%, 420px);
  height: 280px;
  object-fit: contain;
}

/* Keep the availability checkbox and label on one line. */
.product-editor__checkbox {
  grid-column: 1 / -1;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 0.65rem !important;
}

/* Prevent the availability checkbox from stretching. */
.product-editor__checkbox input {
  width: auto;
}

/* Reserve one line for product editor feedback messages. */
.product-editor__message {
  grid-column: 1 / -1;
  min-height: 1.4em;
  margin: 0;
  font-weight: 700;
}

/* Arrange product save and delete controls together. */
.product-editor__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Add readable space between a gallery description and price. */
.gallery-product__description {
  margin: 0.55rem 0 0.8rem;
  opacity: 0.72;
  line-height: 1.55;
}

/* Keep the gallery price visually stronger than the description. */
.gallery-product__price {
  font-weight: 800;
  opacity: 1 !important;
}

/* Use darker panels for product management in dark mode. */
html[data-theme='dark'] .product-editor,
/* Style rule for: html[data-theme='dark'] .product-admin-item. */
html[data-theme='dark'] .product-admin-item {
  background: #202321;
  border-color: rgba(255, 255, 255, 0.13);
}

/* Use dark inputs inside the product dashboard in dark mode. */
html[data-theme='dark'] .product-editor input,
html[data-theme='dark'] .product-editor textarea,
html[data-theme='dark'] .product-editor select,
/* Style rule for: html[data-theme='dark'] .product-admin-toolbar input. */
html[data-theme='dark'] .product-admin-toolbar input {
  background: #141615;
  color: #f7f2ea;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Keep the active tab readable in dark mode. */
html[data-theme='dark'] .admin-tab.is-active {
  background: #f7f2ea;
  color: #141615;
}

/* Stack the product administration layout on tablets. */
@media (max-width: 960px) {
/* Style rule for: .product-admin-layout. */
  .product-admin-layout {
    grid-template-columns: 1fr;
  }

  /* Limit the product list height after it moves above the editor. */
  .product-admin-list {
    max-height: 360px;
  }
}

/* Use one form column on narrow mobile screens. */
@media (max-width: 620px) {
/* Style rule for: .product-editor. */
  .product-editor {
    grid-template-columns: 1fr;
  }

  /* Make every editor label occupy the single mobile column. */
  .product-editor label {
    grid-column: 1;
  }

  /* Keep product actions full-width and easy to tap on mobile. */
  .product-editor__actions {
    grid-column: 1;
    flex-direction: column;
  }
}

/* Keep gallery cards compact enough to browse comfortably on phones. */
@media (max-width: 620px) {
  .gallery-shop {
    padding: 12px 20px 72px;
  }

  .full-gallery-grid {
    justify-items: center;
    gap: 20px;
    margin-top: 24px;
  }

  .gallery-shop .filter-row {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
    justify-content: center;
    gap: 8px;
  }

  .gallery-shop .filter {
    min-height: 44px;
    max-width: 100%;
    padding: 9px 12px;
    font-size: 0.76rem;
    letter-spacing: 0;
  }

  .gallery-product {
    width: min(100%, 380px);
    border-radius: 24px;
  }

  .gallery-product img {
    aspect-ratio: 1;
    object-position: center 42%;
  }

  .gallery-product > div {
    gap: 6px 12px;
    padding: 16px;
  }

  .gallery-product h2 {
    font-size: clamp(1.55rem, 8vw, 1.85rem);
  }

  .gallery-product__description {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .gallery-product button {
    min-height: 44px;
    padding: 10px 16px;
  }
}
