/* ============================================================
   CLOSETOR — PRODUCT PAGE (REVAMPED)
   Mobile-first. 90% mobile visitors.
   Design tokens inherited from styles.css
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --ink: #1d1a18;
  --ink-2: #3d3630;
  --muted: #706862;
  --paper: #fbf8f3;
  --surface: #ffffff;
  --gold: #cb9400;
  --gold-dark: #9f7200;
  --gold-soft: #f4ead2;
  --gold-border: #d8c7a2;
  --line: #e8ded2;
  --green: #1a7a4a;
  --green-soft: #e6f4ed;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 8px rgba(42,34,28,0.08);
  --shadow-md: 0 8px 28px rgba(42,34,28,0.12);
  --shadow-lg: 0 18px 48px rgba(42,34,28,0.16);
}

/* ── NOTICE BAR ─────────────────────────────────────────── */
.top-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--ink);
  color: #f8f2ea;
  font-size: 12px;
  font-weight: 700;
}
.top-notice a {
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,248,243,0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 56px;
  padding: 0 8px;
}
.brand {
  display: flex;
  justify-content: center;
}
.brand img { width: 100px; height: auto; }

.back-btn,
.nav-cart {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  touch-action: manipulation;
}
.back-btn:hover, .nav-cart:hover { background: var(--gold-soft); }

/* ── SKELETON ────────────────────────────────────────────── */
.skeleton-wrap {
  padding: 16px;
}
.skel {
  background: linear-gradient(90deg, #ede8e0 25%, #f5f0e8 50%, #ede8e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
.skel-gallery {
  width: 100%;
  aspect-ratio: 3/4;
  max-height: 420px;
  margin-bottom: 16px;
}
.skel-info { display: grid; gap: 10px; }
.skel-line { height: 18px; border-radius: 4px; }
.skel-w40 { width: 40%; }
.skel-w50 { width: 50%; }
.skel-w60 { width: 60%; }
.skel-w80 { width: 80%; }
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── PRODUCT SHELL ───────────────────────────────────────── */
.product-shell { padding-bottom: 100px; /* space for booking bar */ }

/* ── GALLERY ─────────────────────────────────────────────── */
.p-gallery {
  position: relative;
  user-select: none;
  touch-action: pan-y;
}

/* Main image slider */
.p-gallery-track {
  position: relative;
  overflow: hidden;
  background: #f8f3ec;
  border-bottom: 1px solid var(--gold-border);
}
.p-gallery-slides {
  display: flex;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.p-gallery-slide {
  flex: 0 0 100%;
  display: grid;
  place-items: center;
}
.p-gallery-slide img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  aspect-ratio: 4/5;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #f8f3ec;
}

/* Dot indicators */
.p-gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.p-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s, width 0.2s;
}
.p-gallery-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--gold);
}

/* Thumbnail strip */
.p-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.p-gallery-thumbs::-webkit-scrollbar { display: none; }
.p-gallery-thumb {
  flex: 0 0 72px;
  height: 90px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  background: #f4eee6;
  transition: border-color 0.15s, transform 0.15s;
  touch-action: manipulation;
}
.p-gallery-thumb.active,
.p-gallery-thumb:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.p-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── PRODUCT INFO CARD ───────────────────────────────────── */
.p-card {
  margin: 12px 12px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Code + event tag row */
.p-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.p-code {
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--ink);
}
.p-event-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-dark);
  white-space: nowrap;
  margin-top: 4px;
}

/* Price row */
.p-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--gold-soft) 0%, #fdf7e8 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.p-price-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.p-price-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}
.p-deposit {
  margin-left: auto;
  text-align: right;
}
.p-deposit span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.p-deposit strong {
  font-size: 14px;
  color: var(--ink-2);
}

/* Trust pills */
.p-trust-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.p-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--green-soft);
  border: 1px solid #b2dcc8;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--green);
}
.p-trust-pill svg { flex-shrink: 0; }

/* Details table */
.p-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0;
}
.p-detail-cell {
  padding: 9px 10px;
  background: var(--surface);
}
.p-detail-cell:nth-child(4n+1),
.p-detail-cell:nth-child(4n+2) {
  background: #faf5ed;
}
.p-detail-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.p-detail-value {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
}

/* ── MEASUREMENTS ────────────────────────────────────────── */
.p-section {
  margin: 10px 12px 0;
}
.p-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 6px;
}
.p-section-title {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
}
.p-section-hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.p-measurements {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 8px;
  scrollbar-width: none;
}
.p-measurements::-webkit-scrollbar { display: none; }

.p-meas-pill {
  flex: 0 0 90px;
  display: grid;
  gap: 2px;
  padding: 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  scroll-snap-align: start;
  text-align: center;
}
.p-meas-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.p-meas-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
}

/* Fit check */
.p-fit-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
.p-fit-question {
  flex: 1 1 100%;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 2px;
}
.p-fit-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s, background 0.15s;
}
.p-fit-label:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
  font-weight: 800;
}
.p-fit-label input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ── DATE PICKER ─────────────────────────────────────────── */
.p-date-card {
  margin: 10px 12px 0;
  padding: 14px;
  background: linear-gradient(160deg, rgba(203,148,0,0.1) 0%, #fdf8ef 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.p-date-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}
.p-date-input-wrap {
  position: relative;
}
.p-date-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 42px;
  background: var(--surface);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  box-sizing: border-box;
  touch-action: manipulation;
}
.p-date-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(203,148,0,0.15);
}
.p-date-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-dark);
  pointer-events: none;
}
.p-date-result {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
}
.p-date-result.show { display: grid; gap: 4px; }
.p-date-result-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.p-date-result-row span { color: var(--muted); font-weight: 700; }
.p-date-result-row strong { color: var(--ink); font-weight: 800; }

/* ── RENT NOW BUTTON ─────────────────────────────────────── */
.p-actions {
  margin: 12px 12px 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-gold {
  width: 100%;
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 16px rgba(203,148,0,0.35);
}
.btn-gold:hover { background: var(--gold-dark); box-shadow: 0 6px 20px rgba(203,148,0,0.45); }
.btn-ghost {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  min-height: 44px;
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover { background: #1ebe5d; }
.btn-map {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-map:hover { background: var(--gold-soft); }

.p-city-help {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #b00020;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ── OUTLET CARD ─────────────────────────────────────────── */
.p-outlet {
  margin: 12px 12px 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.p-outlet-eyebrow {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.p-outlet-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 4px;
}
.p-outlet-address {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  margin: 0 0 12px;
  line-height: 1.5;
}
.p-outlet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.p-outlet-actions .btn {
  min-height: 44px;
  font-size: 13px;
}

/* ── RENTAL STEPS ────────────────────────────────────────── */
.p-how-it-works {
  margin: 12px 12px 0;
  padding: 14px;
  background: linear-gradient(160deg, rgba(203,148,0,0.08) 0%, #fdfaf5 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
}
.p-how-title {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.p-steps {
  display: grid;
  gap: 10px;
}
.p-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.p-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--gold);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}
.p-step-body strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.p-step-body p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}

/* ── FAQs ────────────────────────────────────────────────── */
.p-faqs {
  margin: 12px 12px 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.p-faqs-title {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  list-style: none;
  touch-action: manipulation;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--gold-dark);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.6;
}

/* ── SUGGESTIONS ─────────────────────────────────────────── */
.p-suggestions {
  margin: 16px 12px 0;
}
.p-suggestions-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 12px;
}
.p-sugg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.p-sugg-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s, transform 0.15s;
  touch-action: manipulation;
}
.p-sugg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.p-sugg-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}
.p-sugg-info {
  padding: 8px 8px 10px;
}
.p-sugg-code {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
}
.p-sugg-price {
  font-size: 11px;
  font-weight: 750;
  color: var(--gold-dark);
  margin-top: 2px;
}

/* ── STICKY BOOKING BAR ──────────────────────────────────── */
.booking-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,254,252,0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(28,24,20,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.booking-bar[hidden] { display: none; }
.booking-bar.hidden { display: none !important; }
.booking-bar-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.booking-bar-code {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booking-bar-price {
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
}
.booking-bar-btn {
  flex-shrink: 0;
  min-width: 130px;
  min-height: 46px;
  font-size: 14px;
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.p-empty {
  display: grid;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
}
.p-empty h1 { font-size: 20px; margin: 0; }
.p-empty p { color: var(--muted); margin: 0; }

/* ── DESKTOP ─────────────────────────────────────────────── */
@media (min-width: 760px) {
  .product-shell { padding-bottom: 0; }
  .booking-bar { display: none !important; }

  .nav {
    grid-template-columns: 56px 1fr 56px;
    min-height: 66px;
    padding: 0 40px;
  }
  .brand img { width: 116px; }

  /* Full-width two-column layout */
  .p-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    padding: 32px 40px 60px;
    box-sizing: border-box;
    align-items: start;
  }
  .p-col-left { position: sticky; top: 80px; }
  .p-col-right { display: grid; gap: 14px; }

  /* Override mobile margins/padding on desktop */
  .p-card,
  .p-section,
  .p-date-card,
  .p-actions,
  .p-outlet,
  .p-how-it-works,
  .p-faqs,
  .p-suggestions {
    margin-left: 0;
    margin-right: 0;
  }

  /* Full dress visible on desktop */
  .p-gallery-slide img {
    max-height: calc(100vh - 120px);
  }
  .p-gallery-thumb {
    flex: 0 0 88px;
    height: 110px;
  }

  /* Bigger Rent button on desktop */
  .p-actions .btn-gold {
    min-height: 56px;
    font-size: 16px;
  }
}

@media (min-width: 1060px) {
  .p-layout {
    padding: 40px max(40px, calc((100vw - 1400px) / 2)) 60px;
  }
  .nav {
    padding-inline: max(40px, calc((100vw - 1400px) / 2));
  }
}

@media (min-width: 1400px) {
  .p-layout {
    padding-inline: max(60px, calc((100vw - 1440px) / 2));
  }
  .top-notice,
  .nav {
    padding-inline: max(60px, calc((100vw - 1440px) / 2));
  }
}
