/* ── DahliaWorld · Clean Architectural Styles ── */
:root {
  --pure-black: #1a1a1a;
  --gray-800: #333333;
  --gray-700: #4d4d4d;
  --gray-600: #747779;
  --gray-500: #969499;
  --gray-400: #adb5bd;
  --gray-300: #dee2e6;
  --gray-200: #ebebeb;
  --gray-100: #f5f5f5;
  --gray-50: #fafafa;
  --white: #ffffff;
  --accent: #a1836c;
  --accent-dark: #7a6150;

  --bg: var(--white);
  --bg-card: var(--white);
  --bg-subtle: var(--gray-50);
  --text: var(--pure-black);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);
  --shadow: none;
  --shadow-hover: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 4px;
  --radius-sm: 3px;
  --radius-pill: 25px;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--pure-black);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
h1 { font-size: 2rem; font-weight: 600; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

a {
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--pure-black);
  text-decoration: none;
}

p { margin: 0.5rem 0; }

/* ── Main Layout ── */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ── Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.app-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.home-btn {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pure-black);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.home-btn:hover {
  color: var(--gray-600);
  text-decoration: none;
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.2s;
}
.nav-link:hover {
  background: var(--gray-100);
  color: var(--pure-black);
  text-decoration: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.2s;
  text-decoration: none;
  background: var(--gray-200);
  color: var(--pure-black);
  min-height: 33px;
  white-space: nowrap;
}
.btn:hover {
  background: var(--gray-300);
  text-decoration: none;
  color: var(--pure-black);
}

.btn-primary {
  background: var(--pure-black);
  border-color: var(--pure-black);
  color: var(--white);
  font-weight: 500;
}
.btn-primary:hover {
  background: var(--gray-800);
  border-color: var(--gray-800);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--pure-black);
  color: var(--pure-black);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--pure-black);
}

.btn-danger {
  background: transparent;
  border-color: transparent;
  color: #b33a3a;
}
.btn-danger:hover {
  background: #fef8f7;
  color: #8b2e2e;
  border-color: transparent;
}

.btn-sm {
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  min-height: 28px;
}

.btn-lg {
  padding: 0.65rem 1.8rem;
  font-size: 0.95rem;
  min-height: 40px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.card:hover {
  border-color: var(--gray-300);
}
.card h3 { margin-top: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.card-grid .card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

/* ── Flower Card ── */
.flower-card {
  overflow: hidden;
}
.flower-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 0.75rem;
  transition: opacity 0.3s;
}
.flower-card:hover .flower-card-img {
  opacity: 0.9;
}
.flower-card-type {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.flower-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  letter-spacing: 0.02em;
  border: 1px solid var(--gray-200);
}
.badge-accent {
  background: var(--gray-50);
  color: var(--accent-dark);
  border-color: var(--accent);
}
.badge-sage {
  background: #f3f5f1;
  color: #5c6d55;
  border-color: #c0ccb8;
}
.badge-color {
  background: #fef9f6;
  color: #8b6b55;
  border-color: #dcc8b8;
}

/* ── Forms ── */
form .field {
  margin-bottom: 1rem;
}
form label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
  color: var(--pure-black);
}
input, textarea, select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--pure-black);
}
textarea {
  min-height: 5rem;
  resize: vertical;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-header h1 { margin: 0; }

/* ── Actions ── */
.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ── Empty State ── */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.05rem;
  font-style: italic;
}

/* ── Content Card ── */
.content-card {
  padding: 2rem;
  line-height: 1.8;
  font-size: 1rem;
}
.content-card pre {
  font-family: var(--font-body);
  white-space: pre-wrap;
  line-height: 1.7;
}

/* ── Alert Cards ── */
.alert-error {
  background: #fef8f7;
  border: 1px solid #f5d5d0;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #8b3a2e;
}
.alert-success {
  background: #f5f9f4;
  border: 1px solid #d0e0c8;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #4a6b3a;
}

/* ── Text Utilities ── */
.text-secondary {
  color: var(--text-secondary);
}
.text-muted {
  color: var(--text-muted);
}

/* ── Intro Card ── */
.intro-card {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* ── Back Link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}
.back-link:hover { color: var(--pure-black); }

/* ── Audio ── */
.audio-player {
  width: 100%;
  margin-top: 0.5rem;
  border-radius: 30px;
}

/* ── Spacing ── */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }

/* ── Responsive ── */
@media (max-width: 640px) {
  main { padding: 0 1rem; margin: 1.2rem auto; }
  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 1.2rem; }
  h1 { font-size: 1.6rem; }
  .app-header { padding: 0 1rem; height: 64px; }
  .app-header nav { gap: 0; }
}

/* ══════════════════════════════════════
   Garden Presentation
   ══════════════════════════════════════ */

main:has(.garden-hero) {
  max-width: none;
  margin: 0;
  padding: 0;
}

.garden-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--pure-black);
}

.garden-carousel {
  border-radius: 0;
}

.garden-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8rem 2.5rem 3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  color: var(--white);
}

.garden-hero-location {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 0.6rem;
}

.garden-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--white);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 800px;
}

.garden-hero-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 2;
}

.garden-hero-close:hover {
  background: rgba(0,0,0,0.6);
  border-color: rgba(255,255,255,0.3);
}

.garden-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.garden-meta {
  display: flex;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.garden-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.garden-meta-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.garden-meta-value {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
}

.garden-description {
  margin-bottom: 2rem;
}

.garden-actions {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.garden-description p {
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--gray-700);
  margin: 0;
}

.garden-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: 2.5rem;
}

.garden-gallery-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

.garden-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.3s;
}

.garden-gallery-item:hover img {
  transform: scale(1.03);
}

.garden-section-line {
  width: 40px;
  height: 1px;
  background: var(--gray-400);
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .garden-hero {
    height: 55vh;
    min-height: 360px;
  }

  .garden-hero-overlay {
    padding: 5rem 1.5rem 2rem;
  }

  .garden-hero-close {
    top: 1rem;
    right: 1rem;
  }

  .garden-body {
    padding: 2rem 1rem 4rem;
  }

  .garden-meta {
    gap: 2rem;
  }

  .garden-description p {
    font-size: 1rem;
  }
}

/* ══════════════════════════════════════
   Garden Flowers List
   ══════════════════════════════════════ */

main:has(.gf-wrapper) {
  max-width: none;
  margin: 0;
  padding: 0;
  background: #faf8f4;
}

.gf-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2.5rem 5rem;
}

.gf-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.gf-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--pure-black);
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}

.gf-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--gray-500);
  margin: 0;
}

.gf-form-card {
  background: var(--white);
  border: 1px solid #ebe6db;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.gf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gf-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  text-decoration: none;
  color: var(--text);
  border: 1px solid #ebe6db;
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gf-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: var(--text);
}

.gf-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #f5f2ec;
}

.gf-card-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f2ec;
}

.gf-card-initial {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 300;
  color: #c4bfb2;
  text-transform: uppercase;
  user-select: none;
}

.gf-card-body {
  padding: 1.25rem 1.25rem 0.5rem;
  flex: 1;
}

.gf-card-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--pure-black);
  margin: 0 0 0.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.gf-card-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0.5rem 0 0;
}

.gf-card-actions {
  padding: 0.5rem 1.25rem 1.25rem;
  margin-top: auto;
}

.gf-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.gf-hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.gf-hero-carousel {
  border-radius: var(--radius);
  overflow: hidden;
}

.gf-hero-carousel :global(.carousel-main) {
  aspect-ratio: 21 / 9;
  max-height: 480px;
  min-height: 200px;
}

.gf-hero-carousel :global(.carousel-main-img) {
  object-fit: cover;
}

.gf-hero-carousel :global(.carousel-thumbs) {
  display: none;
}

.gf-hero-carousel :global(.carousel-arrow) {
  width: 32px;
  height: 32px;
}

.gf-hero-carousel :global(.carousel-counter) {
  display: none;
}

.gf-hero-overlay {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0 0;
}

.gf-hero-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--pure-black);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.gf-hero-subtitle {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--gray-500);
  margin: 0;
  letter-spacing: 0.03em;
}

@media (max-width: 768px) {
  .gf-wrapper {
    padding: 1rem 1rem 4rem;
  }

  .gf-title {
    font-size: 1.3rem;
  }

  .gf-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gf-hero {
    padding: 0 1rem;
  }

  .gf-hero-carousel :global(.carousel-main) {
    min-height: 160px;
    max-height: 320px;
  }

  .gf-hero-overlay {
    flex-direction: column;
    padding-top: 0.5rem;
  }
}

/* ══════════════════════════════════════
   Flower Detail (Zetas-style)
   ══════════════════════════════════════ */

main:has(.fd-layout) {
  max-width: none;
  margin: 0;
  padding: 0;
  background: #faf8f4;
}

main:has(.fd-layout) .fd-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

main:has(.fd-layout) .card {
  background: var(--white);
}

.fd-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2.5rem 0.5rem;
}

.fd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}

.fd-back:hover {
  color: var(--pure-black);
  text-decoration: none;
}

/* ── Two-column Layout ── */

.fd-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 2rem 2.5rem 5rem;
  align-items: start;
}

.fd-gallery-col {
  position: sticky;
  top: 95px;
}

.fd-carousel {
  border-radius: 2px;
  overflow: hidden;
  background: #f5f2ec;
}

.fd-carousel :global(.carousel-main) {
  background: #f5f2ec;
}

.fd-carousel :global(.carousel-thumbs) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
  background: #faf8f4;
  border-top: 1px solid #ebe6db;
  overflow-x: visible;
}

.fd-carousel :global(.carousel-thumb) {
  width: auto;
  height: auto;
  aspect-ratio: 1;
  border-radius: 2px;
  opacity: 0.6;
}

.fd-carousel :global(.carousel-thumb:hover) {
  opacity: 0.85;
}

.fd-carousel :global(.carousel-thumb.active) {
  border-color: var(--pure-black);
  opacity: 1;
}

/* ── Info Column ── */

.fd-info-col {
  padding-top: 0.5rem;
}

.fd-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  color: var(--pure-black);
  margin: 0 0 0.15rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.fd-classification {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  font-style: italic;
  color: var(--gray-500);
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
}

.fd-color-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: #f5f2ec;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.fd-section-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pure-black);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ebe6db;
}

.fd-specs {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.6rem 1.5rem;
  margin-bottom: 1.5rem;
}

.fd-specs-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
}

.fd-specs-value {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
}

.fd-desc {
  margin-bottom: 1.5rem;
}

.fd-desc p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--gray-700);
  margin: 0 0 1rem;
}

.fd-desc p:last-child {
  margin-bottom: 0;
}

.fd-desc-empty {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.fd-section-toggle {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ebe6db;
}

.fd-section-tab {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.fd-section-tab:hover {
  color: var(--pure-black);
}

.fd-section-tab.active {
  color: var(--pure-black);
  font-weight: 600;
}

.fd-section-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pure-black);
}

.fd-actions-row {
  margin-bottom: 2rem;
}

.fd-breadcrumb {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-500);
  text-transform: none;
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
}

.fd-breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
}

.fd-breadcrumb a:hover {
  color: var(--pure-black);
}

.fd-breadcrumb-sep {
  margin: 0 0.4rem;
  color: var(--gray-400);
}

.fd-status {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 1.2rem;
}

.fd-meta {
  border-top: 1px solid #ebe6db;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.fd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.fd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fd-meta-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.fd-meta-value {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--gray-700);
}

/* ── Edit Panel ── */

.fd-edit-panel {
  border-top: 1px solid #ebe6db;
  padding-top: 1.5rem;
}

.fd-edit-divider {
  width: 100%;
  height: 1px;
  background: #ebe6db;
  margin: 1.5rem 0;
}

.fd-gallery-heading {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--pure-black);
  margin: 0 0 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fd-add-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.fd-add-file {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0;
  font-family: var(--font-body);
  font-size: 0.82rem;
  border: 1px solid #ebe6db;
  border-radius: var(--radius);
  background: var(--white);
}

.fd-add-file:focus {
  outline: none;
  border-color: var(--pure-black);
}

.fd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.fd-gallery-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f2ec;
  border-radius: 2px;
}

.fd-gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fd-gallery-remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
}

.fd-gallery-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}

.fd-gallery-remove-btn:hover {
  background: rgba(180,30,30,0.8);
}

@media (max-width: 768px) {
  .fd-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 1rem 4rem;
  }

  .fd-header {
    padding: 1rem 1rem 0.5rem;
  }

  .fd-gallery-col {
    position: static;
    top: auto;
  }

  .fd-title {
    font-size: 1.5rem;
  }

  .fd-specs {
    grid-template-columns: 1fr 2fr;
    gap: 0.4rem 1rem;
  }

  .fd-section-toggle {
    gap: 1rem;
  }
}

.fd-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--gray-100);
}

.fd-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6rem 2rem 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 3;
  pointer-events: none;
}

.fd-hero-overlay .fd-edit-btn {
  pointer-events: auto;
}

.fd-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--white);
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
}

.fd-hero-color {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  margin: 0 0 1rem;
  letter-spacing: 0.03em;
}

.fd-edit-btn {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
}
.fd-edit-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}

.fd-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.fd-description p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray-700);
  margin: 0;
}

.fd-section-line {
  width: 40px;
  height: 1px;
  background: var(--gray-400);
  margin: 2.5rem 0;
}

.fd-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.fd-gallery-header h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--pure-black);
  margin: 0;
}

.fd-add-image {
  display: flex;
  gap: 0.4rem;
}

.fd-add-image-input {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.82rem;
  min-width: 200px;
  max-width: 220px;
}

.fd-add-image-input:focus {
  outline: none;
  border-color: var(--pure-black);
}

input[type="file"] {
  padding: 0.5rem 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.fd-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.fd-gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-100);
}

.fd-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.fd-gallery-item:hover img {
  transform: scale(1.05);
}

.fd-gallery-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
}

.fd-gallery-remove-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}

.fd-gallery-remove-btn:hover {
  background: rgba(180,30,30,0.8);
}

.fd-gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  background: var(--white);
}

@media (max-width: 640px) {
  .fd-hero {
    height: 45vh;
    min-height: 300px;
  }

  .fd-hero-overlay {
    padding: 4rem 1.5rem 2rem;
  }

  .fd-body {
    padding: 2rem 1rem 4rem;
  }

  .fd-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .fd-add-image {
    width: 100%;
  }

  .fd-add-image-input {
    flex: 1;
    min-width: 0;
  }
}

/* ══════════════════════════════════════
   Image Carousel
   ══════════════════════════════════════ */

.carousel {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
}

.carousel-main {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--pure-black);
}

.carousel-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.4s ease;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pure-black);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.25s;
  z-index: 2;
  padding: 0;
}

.carousel-arrow:hover {
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transform: translateY(-50%) scale(1.06);
}

.carousel-arrow-left { left: 1rem; }
.carousel-arrow-right { right: 1rem; }

.carousel-counter {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  z-index: 2;
}

.carousel-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  background: var(--white);
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.carousel-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--gray-100);
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.55;
}

.carousel-thumb:hover {
  opacity: 0.85;
}

.carousel-thumb.active {
  border-color: var(--pure-black);
  opacity: 1;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .carousel-arrow {
    width: 34px;
    height: 34px;
  }

  .carousel-arrow-left { left: 0.6rem; }
  .carousel-arrow-right { right: 0.6rem; }

  .carousel-thumb {
    width: 56px;
    height: 42px;
  }

  .carousel-thumbs {
    padding: 0.5rem;
    gap: 0.35rem;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ── Selection ── */
::selection {
  background: var(--gray-200);
  color: var(--pure-black);
}

/* ══════════════════════════════════════
   Home Page
   ══════════════════════════════════════ */

main:has(.home-hero) {
  max-width: none;
  margin: 0;
  padding: 0;
}

main:has(.home-hero) .alert-error {
  max-width: 820px;
  margin: 2rem auto;
}

/* ── Animations ── */
@keyframes hero-fade-in {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(6px); opacity: 0.8; }
}

/* ── Hero Carousel ── */
.home-hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 75px);
  min-height: 500px;
  overflow: hidden;
  background: var(--pure-black);
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  animation: hero-fade-in 0.9s ease;
}

.home-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10rem 2rem 3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  color: var(--white);
  text-align: center;
}

.home-hero-brand {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  z-index: 2;
}

.home-hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin: 0 0 0.6rem;
}

.home-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--white);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-hero-year {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

.home-hero-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.home-hero-tags .badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}

/* ── Hero Dots ── */
.home-hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  z-index: 2;
}

.home-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.home-hero-dot:hover {
  border-color: rgba(255,255,255,0.8);
}

.home-hero-dot.active {
  background: var(--white);
  border-color: var(--white);
  width: 20px;
  border-radius: 3px;
}

/* ── Hero Scroll Indicator ── */
.home-hero-scroll {
  position: absolute;
  bottom: 3rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  transition: color 0.3s;
}

.home-hero-scroll:hover {
  color: rgba(255,255,255,0.9);
}

.home-hero-scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}

.home-hero-scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--white);
  animation: scroll-bounce 2s ease-in-out infinite;
}

/* ── Intro Section ── */
.home-intro {
  padding: 5rem 1.5rem 2rem;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.home-intro h2 {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--pure-black);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.home-intro p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.7;
}

.home-intro-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gray-400);
  margin: 2rem auto 0;
}

/* ── Explore Grid ── */
.home-explore {
  padding: 4rem 1.5rem 5rem;
  border-top: 1px solid var(--border);
}

.home-explore-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.home-explore-header h2 {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--pure-black);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.home-explore-header p {
  font-size: 0.95rem;
  color: var(--gray-500);
  font-weight: 300;
}

.home-explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  max-width: 960px;
  margin: 0 auto;
  background: var(--border);
  border: 1px solid var(--border);
}

.home-explore-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.5rem 2rem;
  background: var(--white);
  text-decoration: none;
  color: var(--text);
  transition: background 0.3s;
  position: relative;
}

.home-explore-card:hover {
  background: var(--gray-50);
  text-decoration: none;
  color: var(--text);
}

.home-explore-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.8rem;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.home-explore-card:hover .home-explore-icon {
  opacity: 0.9;
}

.home-explore-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pure-black);
  margin: 0 0 0.5rem;
}

.home-explore-card p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  flex: 1;
}

.home-explore-link {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.home-explore-card:hover .home-explore-link {
  color: var(--pure-black);
  gap: 0.6rem;
}

/* ── Search Section ── */
.home-search-section {
  padding: 4rem 1.5rem 5rem;
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-search-section-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.home-search-section h2 {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--pure-black);
  margin-bottom: 1.5rem;
}

.home-search {
  display: flex;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color 0.2s;
}

.home-search:focus-within {
  border-color: var(--pure-black);
}

.home-search input {
  flex: 1;
  border: none;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  background: transparent;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.home-search input::placeholder {
  color: var(--gray-500);
  font-weight: 300;
}

.home-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  border: none;
  background: transparent;
  color: var(--gray-500);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-family: var(--font-heading);
}

.home-search-btn:hover {
  color: var(--pure-black);
  background: var(--gray-100);
}

.home-search-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Search Results ── */
.home-results {
  padding: 3rem 1.5rem 5rem;
  max-width: 900px;
  margin: 0 auto;
}

.home-results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.home-results-header h2 {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--pure-black);
}

.home-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.home-result-card {
  display: block;
  padding: 1.5rem;
  background: var(--white);
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}

.home-result-card:hover {
  background: var(--gray-50);
  text-decoration: none;
  color: var(--text);
}

.home-result-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pure-black);
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.home-result-card p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-results-footer {
  text-align: center;
  margin-top: 2rem;
}

/* ── Home Page · Responsive ── */
@media (max-width: 768px) {
  .home-hero {
    height: calc(100vh - 64px);
    min-height: 400px;
  }

  .home-hero-overlay {
    padding: 6rem 1.5rem 2.5rem;
  }

  .home-hero-brand {
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1rem;
  }

  .home-hero-title {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
  }

  .home-hero-scroll {
    right: 1rem;
    bottom: 2.5rem;
  }

  .home-intro {
    padding: 3rem 1rem 1.5rem;
  }

  .home-intro h2 {
    font-size: 1.35rem;
  }

  .home-explore,
  .home-search-section {
    padding: 3rem 1rem 4rem;
  }

  .home-explore-grid {
    grid-template-columns: 1fr;
  }

  .home-explore-card {
    padding: 1.8rem 1.5rem;
  }

  .home-results {
    padding: 2rem 1rem 4rem;
  }

  .home-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .home-hero-scroll {
    display: none;
  }

  .home-hero-overlay {
    padding: 5rem 1rem 2rem;
  }

  .app-header {
    padding: 0 0.75rem;
  }

  .nav-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}