/* ==========================================================================
   Vacation Homes° — page components
   property detail · gallery/lightbox · designed forms · configurator · filters
   ========================================================================== */

/* ==========================================================================
   PROPERTY DETAIL — gallery grid
   ========================================================================== */
.pd-gallery {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr; gap: 10px;
  height: clamp(340px, 52vh, 560px);
  margin-top: calc(var(--header-h) + 24px);
}
.pd-gallery .g-item { position: relative; overflow: hidden; cursor: pointer; }
.pd-gallery .g-item:first-child { grid-row: span 2; border-radius: var(--r-3) 0 0 var(--r-3); }
[dir="rtl"] .pd-gallery .g-item:first-child { border-radius: 0 var(--r-3) var(--r-3) 0; }
.pd-gallery .g-item:nth-child(3) { border-top-right-radius: var(--r-3); }
.pd-gallery .g-item:nth-child(5) { border-bottom-right-radius: var(--r-3); }
[dir="rtl"] .pd-gallery .g-item:nth-child(3) { border-top-right-radius: 0; border-top-left-radius: var(--r-3); }
[dir="rtl"] .pd-gallery .g-item:nth-child(5) { border-bottom-right-radius: 0; border-bottom-left-radius: var(--r-3); }
.pd-gallery .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.pd-gallery .g-item:hover img { transform: scale(1.05); }
.pd-gallery .g-item::after { content: ''; position: absolute; inset: 0; background: rgba(20,23,22,0); transition: background var(--dur-fast); }
.pd-gallery .g-item:hover::after { background: rgba(20,23,22,0.12); }
.pd-gallery-more {
  position: absolute; bottom: 16px; inset-inline-end: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-full);
  background: rgba(247,245,239,0.95); color: var(--ink);
  font-size: var(--fs-body-s); font-weight: 600; box-shadow: var(--shadow-md);
}
.pd-gallery-more svg { width: 16px; height: 16px; }

/* detail layout */
.pd-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px,5vw,64px); align-items: start; margin-top: clamp(40px,6vw,64px); }
.pd-area-label { font-size: var(--fs-caption); color: var(--sage-dark); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.pd-title { font-family: var(--font-display); font-weight: 360; font-size: clamp(2rem,4vw,3rem); letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 20px; }
.pd-facts { display: flex; flex-wrap: wrap; gap: 24px; padding: 22px 0; border-block: 1px solid var(--border); margin-bottom: 32px; }
.pd-fact { display: flex; flex-direction: column; gap: 4px; }
.pd-fact .v { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; }
.pd-fact .k { font-size: var(--fs-caption); color: var(--fg-subtle); }
.pd-section { margin-bottom: 40px; }
.pd-section h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin-bottom: 16px; letter-spacing: -0.01em; }
.pd-section p { color: var(--fg-muted); line-height: 1.7; }

/* amenities grid */
.amenity-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.amenity-item { display: flex; align-items: center; gap: 12px; font-size: var(--fs-body-s); }
.amenity-item .ico { width: 38px; height: 38px; border-radius: var(--r-2); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.amenity-item .ico svg { width: 18px; height: 18px; }

/* ---- COLLAPSIBLE PANEL (additional characteristics) ---- */
.collapse { border: 1px solid var(--border); border-radius: var(--r-2); margin-bottom: 12px; overflow: hidden; background: var(--bg-elevated); }
.collapse-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 18px 22px; text-align: start;
  font-size: var(--fs-body); font-weight: 600; color: var(--fg);
  transition: background var(--dur-fast);
}
.collapse-head:hover { background: var(--bg-surface); }
.collapse-head .plus { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.collapse-head .plus::before, .collapse-head .plus::after { content: ''; position: absolute; background: var(--accent); border-radius: 2px; transition: transform var(--dur-med) var(--ease-out); }
.collapse-head .plus::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.collapse-head .plus::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.collapse.open .collapse-head .plus::after { transform: translateX(-50%) scaleY(0); }
.collapse-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-med) var(--ease-out); }
.collapse.open .collapse-body { grid-template-rows: 1fr; }
.collapse-body > div { overflow: hidden; }
.collapse-inner { padding: 0 22px 22px; color: var(--fg-muted); font-size: var(--fs-body-s); line-height: 1.7; }

/* sticky booking rail */
.pd-rail { position: sticky; top: calc(var(--header-h) + 20px); }
.pd-book-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-3); padding: 28px; box-shadow: var(--shadow-md); }
.pd-book-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.pd-book-price .p { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; }
.pd-book-price .cur { font-size: 0.9rem; color: var(--gold); font-weight: 700; }
.pd-book-price .per { font-size: 0.85rem; color: var(--fg-subtle); }
.pd-book-rating { display: flex; align-items: center; gap: 6px; font-size: var(--fs-body-s); color: var(--fg-muted); margin-bottom: 24px; }
.pd-book-rating svg { width: 15px; height: 15px; color: var(--gold); }
.pd-perf { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border-radius: var(--r-2); overflow: hidden; margin: 24px 0; }
.pd-perf .cell { background: var(--bg-surface); padding: 16px 12px; text-align: center; }
.pd-perf .cell .n { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; }
.pd-perf .cell .l { font-size: 0.68rem; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20,23,22,0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-med), visibility var(--dur-med);
  backdrop-filter: blur(6px);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img { max-width: 90vw; max-height: 84vh; border-radius: var(--r-2); box-shadow: var(--shadow-deep); }
.lightbox-close, .lightbox-nav { position: absolute; background: rgba(247,245,239,0.12); color: var(--cream); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background var(--dur-fast); }
.lightbox-close { top: 24px; inset-inline-end: 24px; width: 48px; height: 48px; }
.lightbox-close:hover { background: rgba(247,245,239,0.24); }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; }
.lightbox-nav svg, .lightbox-close svg { width: 22px; height: 22px; }
.lightbox-nav:hover { background: rgba(247,245,239,0.24); }
.lightbox-prev { inset-inline-start: 24px; }
.lightbox-next { inset-inline-end: 24px; }
[dir="rtl"] .lightbox-prev svg, [dir="rtl"] .lightbox-next svg { transform: scaleX(-1); }
.lightbox-counter { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: rgba(247,245,239,0.7); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.1em; }

/* ==========================================================================
   DESIGNED FORMS — multi-step contact
   ========================================================================== */
.form-shell { max-width: 720px; margin: 0 auto; }
.form-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 40px; }
.form-progress .dot { flex: 1; height: 4px; border-radius: 2px; background: var(--stone-2); overflow: hidden; position: relative; }
.form-progress .dot::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: inline-start; transition: transform var(--dur-med) var(--ease-out); }
.form-progress .dot.done::after { transform: scaleX(1); }
.form-progress .dot.active::after { transform: scaleX(0.5); }

.form-step { display: none; animation: fadeStep var(--dur-med) var(--ease-out); }
.form-step.active { display: block; }
@keyframes fadeStep { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.form-step .step-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold); letter-spacing: 0.1em; margin-bottom: 12px; }
.form-step h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem,3vw,2.2rem); letter-spacing: -0.02em; margin-bottom: 28px; }

/* choice tiles */
.choice-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.choice-grid.cols-3 { grid-template-columns: repeat(3,1fr); }
.choice {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 22px; border-radius: var(--r-3); cursor: pointer;
  background: var(--bg-elevated); border: 1.5px solid var(--border);
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.choice:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice .c-ico { width: 40px; height: 40px; border-radius: var(--r-2); background: var(--bg-surface); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.choice.selected .c-ico { background: var(--accent); color: var(--cream); }
.choice .c-ico svg { width: 20px; height: 20px; }
.choice .c-title { font-weight: 600; font-size: var(--fs-body-s); }
.choice .c-sub { font-size: var(--fs-caption); color: var(--fg-subtle); }
.choice .c-check { position: absolute; top: 16px; inset-inline-end: 16px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; transition: all var(--dur-fast); }
.choice.selected .c-check { background: var(--accent); border-color: var(--accent); }
.choice .c-check svg { width: 12px; height: 12px; color: var(--cream); opacity: 0; transition: opacity var(--dur-fast); }
.choice.selected .c-check svg { opacity: 1; }

/* text inputs */
.vinput-group { margin-bottom: 20px; }
.vinput-group label { display: block; font-size: var(--fs-caption); font-weight: 600; color: var(--fg-muted); margin-bottom: 8px; }
.vinput {
  width: 100%; padding: 15px 18px;
  background: var(--bg-elevated); border: 1.5px solid var(--border);
  border-radius: var(--r-2); font-size: var(--fs-body);
  color: var(--fg); transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.vinput::placeholder { color: var(--fg-subtle); }
.vinput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.vinput { resize: vertical; min-height: 120px; }

.form-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; }

/* summary review */
.form-summary { background: var(--bg-surface); border-radius: var(--r-3); padding: 26px; margin-bottom: 24px; }
.form-summary h3 { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-subtle); margin-bottom: 16px; }
.form-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }
.form-summary dt { font-size: var(--fs-body-s); color: var(--fg-subtle); }
.form-summary dd { font-size: var(--fs-body-s); font-weight: 600; text-align: end; }

/* success state */
.form-success { text-align: center; padding: 40px 0; }
.form-success .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.form-success .tick svg { width: 34px; height: 34px; }
.form-success h2 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; margin-bottom: 12px; }
.form-success p { color: var(--fg-muted); max-width: 42ch; margin: 0 auto; }

/* ==========================================================================
   FURNISHING CONFIGURATOR
   ========================================================================== */
.furnish-config { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0; background: var(--bg-elevated); border-radius: var(--r-4); overflow: hidden; box-shadow: var(--shadow-lift); border: 1px solid var(--border); }
.furnish-controls { padding: clamp(28px,4vw,48px); }
.furnish-result { padding: clamp(28px,4vw,48px); background: linear-gradient(165deg,var(--olive-deep),var(--obsidian)); color: var(--cream); display: flex; flex-direction: column; }
.furnish-result .r-label { font-size: var(--fs-caption); color: rgba(247,245,239,0.6); margin-bottom: 12px; }
.furnish-result .r-budget { font-family: var(--font-display); font-weight: 360; font-size: clamp(2.4rem,4.5vw,3.4rem); line-height: 1; letter-spacing: -0.03em; margin-bottom: 8px; }
.furnish-result .r-budget .cur { font-size: 0.5em; color: var(--gold); vertical-align: 0.4em; margin-inline-end: 6px; }
.furnish-result .r-range { font-size: var(--fs-body-s); color: rgba(247,245,239,0.66); margin-bottom: 30px; }
.furnish-breakdown { display: flex; flex-direction: column; gap: 1px; background: rgba(247,245,239,0.12); border-radius: var(--r-2); overflow: hidden; margin-bottom: 26px; }
.furnish-line { display: flex; align-items: center; justify-content: space-between; background: rgba(20,23,22,0.32); padding: 14px 18px; font-size: var(--fs-body-s); }
.furnish-line .lv { font-family: var(--font-mono); color: var(--gold-soft); }

/* style swatch selector */
.style-swatches { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.style-swatch { position: relative; aspect-ratio: 1; border-radius: var(--r-2); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color var(--dur-fast), transform var(--dur-fast); }
.style-swatch:hover { transform: translateY(-2px); }
.style-swatch img { width: 100%; height: 100%; object-fit: cover; }
.style-swatch .s-name { position: absolute; inset: auto 0 0 0; padding: 20px 10px 8px; background: linear-gradient(transparent, rgba(20,23,22,0.85)); color: var(--cream); font-size: 0.75rem; font-weight: 600; text-align: center; }
.style-swatch.selected { border-color: var(--gold); }
.style-swatch.selected::after { content: '✓'; position: absolute; top: 8px; inset-inline-end: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--obsidian); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }

/* ==========================================================================
   PROPERTY FILTERS
   ========================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 40px; }
.filter-chip { padding: 10px 18px; border-radius: var(--r-full); background: var(--bg-elevated); border: 1px solid var(--border); font-size: var(--fs-body-s); font-weight: 500; color: var(--fg-muted); cursor: pointer; transition: all var(--dur-fast); }
.filter-chip:hover { border-color: var(--border-strong); color: var(--fg); }
.filter-chip.active { background: var(--accent); color: var(--cream); border-color: var(--accent); }
.filter-bar .spacer { flex: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .pd-layout { grid-template-columns: 1fr; }
  .pd-rail { position: static; }
  .furnish-config { grid-template-columns: 1fr; }
  .pd-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 400px; }
  .pd-gallery .g-item:first-child { grid-column: span 2; grid-row: span 1; border-radius: var(--r-3) var(--r-3) 0 0; }
  .pd-gallery .g-item:nth-child(4), .pd-gallery .g-item:nth-child(5) { display: none; }
}
@media (max-width: 640px) {
  .choice-grid, .choice-grid.cols-3 { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: 1fr; }
  .style-swatches { grid-template-columns: repeat(2,1fr); }
  .pd-gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 300px; }
  .pd-gallery .g-item:not(:first-child) { display: none; }
  .pd-gallery .g-item:first-child { border-radius: var(--r-3); }
}
