
/* ============================================================================
 * Wineries megamenu - "L'Atlante" editorial atlas
 *
 * Adapted from the Claude Design prototype (Wineries Megamenu Redesign v2.html).
 * All custom rules live here so the layout is independent of Tailwind's JIT
 * (which doesn't compile col-span-3 or lg:col-span-N by default in this repo).
 *
 * Selector prefixes:
 *   .wmp-*     mega panel chrome (head, body grid)
 *   .wrg-*     regions list (zone groups + rows)
 *   .watlas-*  inline Italy SVG map + tooltip + legend
 *   .wsoon-*   "Plan a tour" coming-soon teaser (replaces the old .wtours-* list)
 *   .wcellar-* "Cellar of the month" editorial card
 * ============================================================================ */

.mega-panel[data-section="wineries"] {
  background: var(--color-surface-container-lowest);
  box-shadow: var(--shadow-ambient-lg);
  border-bottom: 1px solid rgba(209, 194, 209, 0.18);
}

.wmp-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 32px;
}

/* ── Top strip ── */
.wmp-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(86, 19, 113, 0.10);
  margin-bottom: 22px;
}

.wmp-eyebrow {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wmp-eyebrow::after {
  content: "";
  height: 1px;
  width: 38px;
  background: var(--color-primary);
  opacity: 0.35;
}

.wmp-title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0;
}
.wmp-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-on-surface);
}

.wmp-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-on-surface-variant);
  margin: 6px 0 0;
  max-width: 60ch;
  line-height: 1.5;
}
.wmp-sub b {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-weight: 600;
  color: var(--color-on-surface);
}

.wmp-stats {
  display: flex;
  gap: 26px;
  align-items: flex-end;
}
.wmp-stat {
  text-align: right;
}
.wmp-stat-num {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 28px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
.wmp-stat-lbl {
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  font-weight: 600;
  margin-top: 6px;
}

/* ── Body grid ── */
.wmp-body {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 0.95fr;
  gap: 44px;
  align-items: start;
}

/* Section heads */
.wmp-secthd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 16px;
}
.wmp-secthd h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-on-surface);
  letter-spacing: -0.01em;
  margin: 0;
}
.wmp-secthd-meta {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  font-weight: 600;
}

/* ── Regions list ── */
.wrg-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
}
.wrg-zone-hd {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  padding: 14px 0 6px;
}
.wrg-zone-hd em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0.7;
}
.wrg-zone-hd::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(86, 19, 113, 0.18), transparent 90%);
}
.wrg-zone:first-of-type .wrg-zone-hd {
  padding-top: 0;
}

.wrg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-on-surface);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  position: relative;
}
.wrg-row-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.78;
  filter: saturate(0.85);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
}
.wrg-row-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  flex: 1;
}
.wrg-row-count {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 14px;
  color: var(--color-on-surface-variant);
  font-weight: 500;
  min-width: 24px;
  text-align: right;
}
.wrg-row:hover,
.wrg-row:focus-visible,
.wrg-row.is-hover {
  background: var(--color-primary-tint-5);
  color: var(--color-primary);
  outline: none;
}
.wrg-row:hover .wrg-row-icon,
.wrg-row:focus-visible .wrg-row-icon,
.wrg-row.is-hover .wrg-row-icon {
  opacity: 1;
  filter: saturate(1);
  transform: scale(1.08);
}
.wrg-row:hover .wrg-row-count,
.wrg-row:focus-visible .wrg-row-count,
.wrg-row.is-hover .wrg-row-count {
  color: var(--color-primary);
}
.wrg-row[data-empty="1"] {
  opacity: 0.55;
  pointer-events: none;
}

.wrg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(86, 19, 113, 0.10);
  gap: 12px;
  flex-wrap: wrap;
}
.wrg-all {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--dur-fast) var(--ease-out);
}
.wrg-all:hover,
.wrg-all:focus-visible {
  gap: 10px;
  outline: none;
}
.wrg-bookable {
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-on-surface-variant);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wrg-bookable b {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Atlas (Italy map) ── */
.watlas {
  position: relative;
}
.watlas-frame {
  background: linear-gradient(180deg, var(--color-surface-container-low) 0%, var(--color-surface-container-lowest) 100%);
  border-radius: var(--radius-xl);
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
}
.watlas-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(260px 200px at 30% 35%, rgba(86, 19, 113, 0.05), transparent 70%),
    radial-gradient(280px 220px at 75% 70%, rgba(86, 19, 113, 0.04), transparent 70%);
  pointer-events: none;
}

.watlas-tag {
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-on-surface-variant);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  position: relative;
}
.watlas-tag em {
  font-style: italic;
  font-family: var(--font-display);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
}

.watlas-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 708;
  display: block;
  position: relative;
}
.watlas-svg .map-region {
  fill: rgba(86, 19, 113, 0.10);
  stroke: var(--color-surface-container-lowest);
  stroke-width: 2;
  cursor: pointer;
  transition: fill var(--dur-fast) var(--ease-out);
}
.watlas-svg .map-region:hover,
.watlas-svg .map-region.is-hover {
  fill: var(--color-primary);
}

.watlas-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--color-tertiary);
  color: #fff;
  padding: 8px 12px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 120ms var(--ease-out);
  white-space: nowrap;
  z-index: 5;
}
.watlas-tooltip.is-on {
  opacity: 1;
}
.watlas-tooltip b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  display: block;
}
.watlas-tooltip span {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-top: 2px;
}
.watlas-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
  height: 9px;
  background: var(--color-tertiary);
}

.watlas-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 0 4px;
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  font-weight: 600;
}
.watlas-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.watlas-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(86, 19, 113, 0.10);
}
.watlas-legend i.full {
  background: var(--color-primary);
}

/* ── Plan a tour · Coming soon teaser ── */
.wsoon {
  position: relative;
  margin: 0 -2px 14px;
  padding: 22px 22px 20px;
  border-radius: 14px;
  background:
    radial-gradient(120% 80% at 80% 20%, rgba(86, 19, 113, 0.10), transparent 60%),
    linear-gradient(160deg, #fdfaf3 0%, #f0e8d9 100%);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(86, 19, 113, 0.08);
}
.wsoon-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #f3d08a 0%, #d68a3a 55%, #6a3a1a 100%);
}
.wsoon-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.wsoon-stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(252, 249, 244, 0.94);
  backdrop-filter: blur(6px);
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wsoon-stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: wsoon-pulse 2s var(--ease-out) infinite;
}
@keyframes wsoon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) {
  .wsoon-stamp::before { animation: none; }
}
.wsoon-eyebrow {
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.wsoon-eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--color-primary);
  opacity: 0.5;
}
.wsoon-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  margin: 0 0 8px;
}
.wsoon-desc {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--color-on-surface);
  margin: 0 0 14px;
}
.wsoon-bullets {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.wsoon-bullets li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-on-surface);
}
.wsoon-bullets li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 6px;
}
.wsoon-bullets b {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-primary);
  font-weight: 600;
}
.wsoon-form {
  display: flex;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px dashed rgba(86, 19, 113, 0.16);
}
.wsoon-form-input {
  flex: 1;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(86, 19, 113, 0.15);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--color-on-surface);
  min-width: 0;
}
.wsoon-form-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.wsoon-form-input:read-only {
  background: rgba(86, 19, 113, 0.06);
  color: var(--color-primary);
  font-weight: 600;
}
.wsoon-form-btn {
  background: var(--gradient-cta);
  color: #fff;
  border: 0;
  padding: 0 14px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(86, 19, 113, 0.18);
  transition: transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.wsoon-form-btn:hover:not(:disabled) { transform: translateY(-1px); }
.wsoon-form-btn:disabled {
  background: var(--color-success);
  cursor: default;
  box-shadow: none;
}
.wsoon-foot {
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-on-surface-variant);
}
.wsoon-foot a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wsoon-foot[data-state="error"]   { color: #a83f39; }
.wsoon-foot[data-state="success"] { color: var(--color-success); }

/* ── Cellar of the month ── */
.wcellar {
  background: #1c1c19;
  color: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  margin-top: 20px;
  text-decoration: none;
  display: block;
}
.wcellar-img {
  position: absolute;
  inset: 0;
}
.wcellar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.wcellar-img--fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}
.wcellar-img--fallback .wcellar-img-asset {
  width: 96px;
  height: 96px;
  object-fit: contain;
  opacity: 0.78;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
}
.wcellar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wcellar-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 28, 25, 0.45) 0%, rgba(28, 28, 25, 0.10) 30%, rgba(28, 28, 25, 0.85) 100%);
}
.wcellar-body {
  position: relative;
  padding: 14px 16px 16px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wcellar-eyebrow {
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wcellar-eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: rgba(255, 255, 255, 0.55);
}
.wcellar-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wcellar-region {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}
.wcellar-name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.wcellar-name em {
  font-style: italic;
  font-weight: 400;
}
.wcellar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}
.wcellar-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wcellar-tag {
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 8px;
  border-radius: 999px;
}
.wcellar-cta {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  transition: gap var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.wcellar:hover .wcellar-cta,
.wcellar:focus-visible .wcellar-cta {
  border-color: #fff;
  gap: 10px;
}
.wcellar:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Narrow-desktop fallback: collapse three-col grid to two when the panel
 * has to live inside a 1024-1199px viewport (uncommon but possible). */
@media (max-width: 1199px) {
  .wmp-body {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .wmp-body .watlas {
    grid-column: 1 / -1;
    order: 3;
  }
}
