/* Customer product detail — Rentomojo-style public page (guests + logged-in) */
:root {
  --pd-red: #e23737;
  --pd-red-dk: #c62828;
  --pd-bg: #f5f5f7;
  --pd-card: #fff;
  --pd-text: #111827;
  --pd-muted: #6b7280;
  --pd-border: #e5e7eb;
  --pd-r: 14px;
  --pd-r-lg: 20px;
  /* Aliases for existing booking form / calendar inline styles */
  --ui-accent: var(--pd-red);
  --ui-accent-lt: rgba(226, 55, 55, 0.12);
  --ui-heading: var(--pd-text);
  --ui-sub: #374151;
  --ui-muted: var(--pd-muted);
  --ui-border: var(--pd-border);
  --ui-surface: #fff;
  --ui-surface-2: #f9fafb;
  --ui-r-sm: 10px;
  --ui-r-md: 12px;
  --ui-r-full: 9999px;
}

.pd-page { background: var(--pd-bg); min-height: 100vh; padding-bottom: 100px; }

.pd-topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pd-border);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.pd-topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f3f4f6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pd-text);
  text-decoration: none;
  flex-shrink: 0;
}
.pd-brand {
  font-size: 1rem;
  font-weight: 800;
  color: var(--pd-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: none;
}
@media (min-width: 768px) {
  .pd-brand { display: block; }
}
.pd-search-pill {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f4f6;
  border: 1.5px solid #e8eaed;
  border-radius: 999px;
  padding: 10px 14px 10px 16px;
  font-size: .8125rem;
  color: var(--pd-muted);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  line-height: 1.2;
}
.pd-search-pill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-search-pill:hover {
  border-color: #fecaca;
  background: #fff;
  box-shadow: 0 2px 10px rgba(226, 55, 55, 0.08);
}
@media (min-width: 768px) {
  .pd-search-pill {
    max-width: 420px;
    margin: 0 auto;
  }
}
.pd-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.pd-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fef2f2;
  color: var(--pd-red);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.pd-login-btn {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--pd-red);
  color: #fff !important;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(226,55,55,.35);
  transition: transform .15s, filter .15s;
}
.pd-login-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

.pd-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
}
@media (min-width: 900px) {
  .pd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
  }
}

.pd-gallery-wrap {
  position: relative;
  border-radius: var(--pd-r-lg);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4/3;
  box-shadow:
    0 8px 32px rgba(0,0,0,.08),
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 0 0 3px rgba(226, 55, 55, 0.08);
}
.pd-gallery-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,.12);
  z-index: 5;
}
.pd-gallery-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pd-red), #ff6b6b);
  border-radius: 0 2px 2px 0;
}
.pd-gallery-track {
  display: flex;
  height: 100%;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.pd-gallery-slide {
  flex: 0 0 100%;
  height: 100%;
}
.pd-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  cursor: pointer;
  font-size: 1.25rem;
  color: #374151;
  z-index: 4;
}
.pd-gallery-nav.prev { left: 12px; }
.pd-gallery-nav.next { right: 12px; }
.pd-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 4;
}
.pd-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all .2s;
}
.pd-gallery-dot.active {
  width: 20px;
  background: #fff;
}

.pd-breadcrumb {
  font-size: .75rem;
  color: var(--pd-muted);
  margin-bottom: 12px;
}
.pd-breadcrumb a { color: var(--pd-muted); text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--pd-red); }

.pd-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--pd-text);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 12px;
}
@media (min-width: 768px) {
  .pd-title { font-size: 1.625rem; }
}

.pd-price-big {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--pd-red);
  letter-spacing: -0.02em;
}
.pd-price-big small {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--pd-muted);
}

.pd-card {
  background: var(--pd-card);
  border-radius: var(--pd-r);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  border: 1px solid var(--pd-border);
}

.pd-btn-primary {
  width: 100%;
  padding: 15px 20px;
  border-radius: 12px;
  border: none;
  background: var(--pd-red);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(226,55,55,.35);
  transition: transform .15s, filter .15s;
}
.pd-btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.pd-btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

.pd-trust-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 480px) {
  .pd-trust-row { grid-template-columns: repeat(4, 1fr); }
}
.pd-trust-item {
  text-align: center;
  padding: 12px 8px;
  background: #fafafa;
  border-radius: 12px;
  font-size: .6875rem;
  color: var(--pd-muted);
}
.pd-trust-item strong {
  display: block;
  font-size: .75rem;
  color: var(--pd-text);
  margin-bottom: 2px;
}

/* Vendor / distance / rating row (marketplace-style) */
.pd-vendor-hero {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 55%, #fff1f2 100%);
  border: 1px solid rgba(234, 88, 12, 0.18);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}
.pd-vendor-hero__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.875rem;
  color: var(--pd-muted);
}
.pd-vendor-hero__line strong {
  color: var(--pd-text);
  font-weight: 700;
}
.pd-vendor-hero__rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #0f172a;
}
.pd-vendor-hero__dist {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #ea580c;
}
.pd-vendor-hero__avail {
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #15803d;
}

.product-detail-public .pd-page {
  padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  .product-detail-public .pd-shell {
    padding-bottom: calc(24px + 122px + env(safe-area-inset-bottom, 0px));
  }
  .product-detail-public .sticky-cart-bar {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    border-radius: 16px;
    margin: 0 10px;
    left: 10px;
    right: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  }
  .product-detail-public .sticky-cart-bar-btn-primary {
    background: linear-gradient(135deg, #ff7a3d 0%, #fa5608 100%);
  }
  .product-detail-public .sticky-cart-bar-info {
    padding-left: 4px;
  }
}

.pd-section-card {
  padding: 14px 14px 16px;
}
.pd-section-head h3,
.pd-subtitle {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--pd-text);
}
.pd-section-head p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--pd-muted);
}
.pd-store-scroll {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.pd-store-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
}
.pd-store-title { font-size: 0.9rem; font-weight: 800; color: #0f172a; }
.pd-store-dist { font-size: 0.75rem; font-weight: 700; color: #ea580c; margin-top: 2px; }
.pd-store-addr { margin: 5px 0; font-size: 0.75rem; color: #64748b; line-height: 1.4; }
.pd-store-hours { font-size: 0.75rem; color: #334155; font-weight: 600; margin-bottom: 8px; }
.pd-store-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}
.pd-store-btn--primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.pd-delivery-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.pd-delivery-title { font-size: 0.8125rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .04em; }
.pd-delivery-text { font-size: 0.95rem; font-weight: 800; color: #0f172a; }
.pd-delivery-chip {
  font-size: 0.75rem;
  font-weight: 700;
  color: #14532d;
  background: #dcfce7;
  border-radius: 999px;
  padding: 6px 10px;
}
.pd-benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.pd-benefit-item {
  border: 1px solid rgba(234, 88, 12, 0.22);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff7ed;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9a3412;
}
.pd-brand-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pd-brand-chip {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #f8fafc;
  border-radius: 10px;
  padding: 9px 6px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
}
.pd-review-head { display: flex; align-items: center; gap: 12px; margin-top: 8px; margin-bottom: 10px; }
.pd-review-avg { font-size: 2rem; font-weight: 900; color: #0f172a; line-height: 1; }
.pd-review-stars { color: #15803d; letter-spacing: 1px; }
.pd-review-count { font-size: 0.78rem; color: #64748b; font-weight: 600; }
.pd-star-row { display: grid; grid-template-columns: 34px 1fr 26px; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.78rem; color: #334155; font-weight: 700; }
.pd-star-bar { height: 7px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.pd-star-bar > div { height: 100%; background: #16a34a; border-radius: inherit; }
.pd-review-filters { display: flex; gap: 8px; margin-top: 10px; margin-bottom: 10px; }
.pd-chip-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
}
.pd-chip-btn.is-active { background: #111827; color: #fff; border-color: #111827; }
.pd-review-list { display: grid; gap: 8px; margin-top: 8px; }
.pd-review-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
}
.pd-review-item-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 0.82rem; }
.pd-review-item p { margin: 0; font-size: 0.8rem; color: #334155; }
.pd-muted-small { margin: 8px 0 0; font-size: 0.8rem; color: #64748b; }
.pd-faq-list { margin-top: 10px; display: grid; gap: 8px; }
.pd-faq-item { border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 12px; background: #fff; padding: 0 10px; }
.pd-faq-item summary { cursor: pointer; list-style: none; font-size: 0.83rem; font-weight: 700; color: #1e293b; padding: 12px 0; }
.pd-faq-answer { padding: 0 0 12px; font-size: 0.8rem; color: #475569; line-height: 1.5; }
.pd-spec-list { margin-top: 10px; display: grid; gap: 6px; }
.pd-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 10px;
}
.pd-spec-row span { font-size: 0.8rem; color: #64748b; }
.pd-spec-row strong { font-size: 0.82rem; color: #0f172a; text-align: right; }
