/* ======================================================================
   ENHANCED EXPERIENCES GRID — CSS v2.1.0
   Calia Farm design system
   ====================================================================== */

:root {
  --egg-green:      #0B4C18;
  --egg-green-mid:  #1a6b2a;
  --egg-green-lt:   #e8f5e9;
  --egg-gold:       #B88F47;
  --egg-gold-dark:  #96722e;
  --egg-navy:       #1D3557;
  --egg-bg:         #F8F7F4;
  --egg-surface:    #FFFFFF;
  --egg-border:     #E8E4DC;
  --egg-muted:      #888888;
  --egg-r-md:       12px;
  --egg-r-lg:       16px;
  --egg-r-xl:       20px;
  --egg-r-pill:     999px;
  --egg-shadow-sm:  0 2px 10px rgba(0,0,0,0.08);
  --egg-shadow-md:  0 6px 24px rgba(0,0,0,0.11);
  --egg-shadow-lg:  0 12px 40px rgba(0,0,0,0.15);
  --egg-ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --egg-font-body:  'Lato', 'Open Sans', -apple-system, sans-serif;
  --egg-font-head:  'Playfair Display', Georgia, serif;
}

.exp-grid-container *,
.exp-grid-container *::before,
.exp-grid-container *::after { box-sizing: border-box; }

/* ── Container ─────────────────────────────────────────────────── */
.exp-grid-container {
  max-width: 1400px;
  margin: 20px auto;
  padding: 16px;
  font-family: var(--egg-font-body);
}

/* ── Header ────────────────────────────────────────────────────── */
.exp-grid-header {
  text-align: center;
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--egg-green) 0%, #1a7028 100%);
  padding: 32px 20px;
  border-radius: var(--egg-r-xl);
  color: white;
  box-shadow: var(--egg-shadow-md);
}

.stay-dates-display {
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
}

.stay-dates-display strong {
  font-family: var(--egg-font-head);
  font-size: 20px;
  display: block;
  margin-top: 4px;
}

/* ── Loading ────────────────────────────────────────────────────── */
.exp-grid-loading {
  text-align: center;
  padding: 60px 20px;
  background: var(--egg-surface);
  border-radius: var(--egg-r-xl);
  box-shadow: var(--egg-shadow-sm);
}

.exp-grid-loading p { color: var(--egg-muted); font-size: 15px; margin: 0; }

.exp-grid-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--egg-border);
  border-top-color: var(--egg-green);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: egg-spin 0.8s linear infinite;
}

@keyframes egg-spin { to { transform: rotate(360deg); } }

/* ── Grid ───────────────────────────────────────────────────────── */
#exp-grid-content { padding: 0; }

.experiences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

/* ── Card ───────────────────────────────────────────────────────── */
.exp-showcase-card {
  background: var(--egg-surface);
  border-radius: var(--egg-r-xl);
  overflow: hidden;
  box-shadow: var(--egg-shadow-sm);
  border: 2px solid transparent;
  transition: transform 0.3s var(--egg-ease),
              box-shadow 0.3s var(--egg-ease),
              border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.exp-showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--egg-shadow-lg);
  border-color: var(--egg-gold);
}

/* ── Hero image wrap ────────────────────────────────────────────── */
.exp-img-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  cursor: zoom-in;
  background: #dddbd5;
  flex-shrink: 0;
  line-height: 0;
}

.exp-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s var(--egg-ease);
}

.exp-showcase-card:hover .exp-img-wrap img { transform: scale(1.05); }

/* Placeholder when no image */
.egg-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e5de 0%, #d5d2ca 100%);
  font-size: 56px;
}

/* Gradient overlay: name + badge */
.exp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0)    28%,
    rgba(0,0,0,0.38) 60%,
    rgba(0,0,0,0.78) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  pointer-events: none;
}

.egg-badge {
  display: inline-block;
  background: var(--egg-gold);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--egg-r-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 7px;
  align-self: flex-start;
}

.exp-hero-title {
  font-family: var(--egg-font-head);
  font-size: 22px;
  font-weight: 700;
  color: white!important;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* Photo hint — top-right */
.egg-photo-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--egg-r-pill);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.exp-showcase-card:hover .egg-photo-hint { opacity: 1; }
@media (max-width: 767px) { .egg-photo-hint { opacity: 1 !important; } }

/* Loading overlay */
.egg-img-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.exp-img-wrap.loading .egg-img-loading-overlay { opacity: 1; }

.egg-img-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: egg-spin 0.7s linear infinite;
}

/* ── Card body ──────────────────────────────────────────────────── */
.exp-showcase-body {
  padding: 18px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Price row */
.egg-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.egg-price-from   { font-size: 12px; color: var(--egg-muted); }
.egg-price-amount { font-family: var(--egg-font-head); font-size: 26px; font-weight: 700; color: var(--egg-green); line-height: 1; }
.egg-price-per    { font-size: 13px; color: var(--egg-muted); }
.egg-price-child  { font-size: 12px; color: var(--egg-muted); background: #f5f3ef; padding: 2px 8px; border-radius: var(--egg-r-pill); margin-left: auto; }

/* Description */
.egg-desc-wrap { margin-bottom: 14px; }

.egg-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.65;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.egg-desc.egg-expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.egg-read-more {
  background: none;
  border: none;
  color: var(--egg-green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--egg-font-body);
}

.egg-read-arrow { display: inline-block; transition: transform 0.2s; }

/* Date pills section */
.egg-dates-section { margin-bottom: 14px; }

.egg-dates-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--egg-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.egg-pills-wrap { position: relative; }

.dates-pills.egg-pills-scroll {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 4px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dates-pills.egg-pills-scroll::-webkit-scrollbar { display: none; }

.egg-pills-fade {
  position: absolute;
  top: 0; right: 0;
  width: 32px;
  height: calc(100% - 10px);
  background: linear-gradient(to right, transparent, var(--egg-surface));
  pointer-events: none;
}

/* Date pill — 3 lines */
.date-pill.egg-date-pill {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 9px 12px !important;
  min-width: 56px !important;
  border: 2px solid var(--egg-border) !important;
  border-radius: var(--egg-r-md) !important;
  background: var(--egg-surface) !important;
  cursor: pointer;
  transition: all 0.2s var(--egg-ease) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
  -webkit-tap-highlight-color: transparent;
  /* Override original .date-pill styles */
  color: inherit !important;
  transform: none !important;
}

.date-pill.egg-date-pill:hover {
  border-color: var(--egg-green-mid) !important;
  background: var(--egg-green-lt) !important;
  transform: translateY(-2px) !important;
}

.date-pill.egg-date-pill.selected {
  border-color: var(--egg-green) !important;
  background: var(--egg-green) !important;
  box-shadow: 0 4px 12px rgba(11,76,24,0.3) !important;
  transform: translateY(-2px) !important;
}

.pill-day {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--egg-muted);
  line-height: 1;
}

.egg-date-pill.selected .pill-day { color: rgba(255,255,255,0.72); }

.pill-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--egg-navy);
  line-height: 1;
}

.egg-date-pill.selected .pill-num { color: white; }

.pill-mon {
  font-size: 9px;
  font-weight: 600;
  color: var(--egg-muted);
  line-height: 1;
}

.egg-date-pill.selected .pill-mon { color: rgba(255,255,255,0.72); }

.egg-no-dates { font-size: 13px; color: var(--egg-muted); margin: 0; font-style: italic; }

/* Guests */
.exp-guests-selector {
  background: var(--egg-bg);
  border-radius: var(--egg-r-md);
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--egg-border);
}

.egg-guests-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--egg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

.guests-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) { .guests-row { flex-direction: row; gap: 12px; } }

.guest-input-group { flex: 1; }

.guest-input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--egg-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.number-input-compact {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--egg-border);
}

.number-input-compact button {
  background: var(--egg-green);
  color: white;
  border: none;
  width: 36px;
  height: 38px;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.number-input-compact button:hover  { background: var(--egg-green-mid); }
.number-input-compact button:active { transform: scale(0.9); }

.number-input-compact input {
  flex: 1;
  text-align: center;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--egg-navy);
  min-width: 0;
  background: white;
  -moz-appearance: textfield;
}

.number-input-compact input::-webkit-outer-spin-button,
.number-input-compact input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* CTA button */
.btn-select-experience {
  width: 100%;
  padding: 13px 16px;
  background: var(--egg-border);
  color: #999;
  border: none;
  border-radius: var(--egg-r-md);
  font-size: 14px;
  font-weight: 700;
  cursor: not-allowed;
  transition: all 0.3s var(--egg-ease);
  font-family: var(--egg-font-body);
  margin-top: auto;
  -webkit-tap-highlight-color: transparent;
}

.btn-select-experience.active {
  background: var(--egg-gold);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(184,143,71,0.32);
  animation: egg-btn-arrive 0.4s var(--egg-ease), egg-btn-pulse 2s ease-in-out 0.5s 3;
}

@keyframes egg-btn-arrive {
  from { transform: scale(0.9); opacity: 0.7; }
  to   { transform: scale(1);   opacity: 1; }
}

@keyframes egg-btn-pulse {
  0%,100% { box-shadow: 0 4px 16px rgba(184,143,71,0.3); }
  50%     { box-shadow: 0 4px 28px rgba(184,143,71,0.65), 0 0 0 4px rgba(184,143,71,0.16); transform: translateY(-1px); }
}

.btn-select-experience.active:hover  { background: var(--egg-gold-dark); transform: translateY(-1px); }
.btn-select-experience.active:active { transform: scale(0.97); }
.btn-select-experience.added         { background: var(--egg-green) !important; color: white; cursor: default; animation: none; }

/* ── Gallery lightbox ───────────────────────────────────────────── */
.egg-gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 100000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.egg-gallery-open { overflow: hidden; }

.egg-gallery-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 50%;
  color: white;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 11;
}

.egg-gallery-close:hover { background: rgba(255,255,255,0.28); transform: rotate(90deg); }

.egg-gallery-title {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.88);
  font-family: var(--egg-font-head);
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  pointer-events: none;
}

.egg-gallery-main {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 52px 8px;
  min-height: 0;
}

.egg-gallery-img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  display: block;
}

.egg-gallery-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.16);
  border: 1.5px solid rgba(255,255,255,0.32);
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5;
  user-select: none;
}

.egg-gallery-nav:hover { background: rgba(255,255,255,0.32); }
.egg-prev { left: 4px; }
.egg-next { right: 4px; }

.egg-gallery-counter {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  letter-spacing: 1px;
  pointer-events: none;
}

.egg-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 20px;
  overflow-x: auto;
  max-width: 920px;
  width: 100%;
  flex-shrink: 0;
  scrollbar-width: none;
}

.egg-gallery-thumbs::-webkit-scrollbar { display: none; }

.egg-thumb {
  width: 62px; height: 62px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.44;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.egg-thumb:hover { opacity: 0.76; }
.egg-thumb.active { opacity: 1; border-color: var(--egg-gold); }

@media (max-width: 767px) {
  .egg-gallery-main { padding: 56px 44px 8px; }
  .egg-gallery-img  { max-height: calc(100vh - 220px); }
  .egg-gallery-nav  { width: 38px; height: 38px; font-size: 22px; }
  .egg-prev { left: 3px; }
  .egg-next { right: 3px; }
  .egg-thumb { width: 52px; height: 52px; }
}

/* ── Skip section ───────────────────────────────────────────────── */
.exp-grid-skip {
  text-align: center;
  padding: 32px 20px;
  border-top: 2px solid var(--egg-border);
  margin-top: 32px;
}

.exp-grid-skip p { color: var(--egg-muted); font-size: 15px; margin: 0 0 16px; }

.btn-skip-experiences {
  padding: 12px 28px;
  border-radius: var(--egg-r-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--egg-border);
  background: transparent;
  color: var(--egg-muted);
  transition: all 0.2s;
  font-family: var(--egg-font-body);
}

.btn-skip-experiences:hover { border-color: var(--egg-navy); color: var(--egg-navy); }

/* ── Empty state ────────────────────────────────────────────────── */
.exp-grid-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--egg-surface);
  border-radius: var(--egg-r-xl);
  box-shadow: var(--egg-shadow-sm);
}

.empty-icon { font-size: 60px; display: block; margin-bottom: 16px; }

.exp-grid-empty h3 { margin: 0 0 12px; color: var(--egg-navy); font-size: 22px; font-family: var(--egg-font-head); }

.exp-grid-empty p { color: var(--egg-muted); font-size: 15px; margin: 0 0 24px; line-height: 1.6; }

.btn-continue-empty {
  background: var(--egg-gold);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: var(--egg-r-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--egg-font-body);
}

.btn-continue-empty:hover { background: var(--egg-gold-dark); }

/* ── Toast ──────────────────────────────────────────────────────── */
@keyframes egg-slide-in { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.booking-toast {
  position: fixed;
  top: 20px; right: 20px;
  background: var(--egg-green);
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: var(--egg-shadow-md);
  z-index: 10000;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: egg-slide-in 0.3s var(--egg-ease);
  font-size: 14px;
}

.booking-toast.error { background: #c0392b; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .experiences-grid { grid-template-columns: 1fr; gap: 20px; }
  .exp-img-wrap { height: 200px; }
  .exp-hero-title { font-size: 19px; }
  .exp-showcase-body { padding: 14px 16px 18px; }
}

@media (min-width: 900px) {
  .exp-grid-container { margin: 40px auto; padding: 20px; }
  .exp-grid-header { padding: 40px 30px; margin-bottom: 40px; }
  .stay-dates-display { font-size: 18px; }
  .exp-img-wrap { height: 260px; }
}

@media (min-width: 1200px) {
  .experiences-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Accessibility ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.btn-select-experience:focus-visible,
.btn-continue-empty:focus-visible,
.btn-skip-experiences:focus-visible,
.egg-date-pill:focus-visible,
.number-input-compact button:focus-visible { outline: 3px solid var(--egg-gold); outline-offset: 2px; }