/* detail.css — bestdubai-style business detail page (Phase C).
   Builds on tokens from styles.css. Sections hide gracefully when empty. */

.detail { max-width: var(--maxw); margin: 0 auto; padding: 8px 18px 48px; }

/* Gallery */
.d-gallery { display: grid; gap: 8px; grid-template-columns: 2fr 1fr; border-radius: 16px; overflow: hidden; max-height: 420px; }
.d-gallery.single { grid-template-columns: 1fr; }
.d-gallery img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block; background: #f1f1f1; }
.d-gallery .d-thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.d-gallery .d-thumbs img { max-height: 206px; }
@media (max-width: 720px) { .d-gallery { grid-template-columns: 1fr; } .d-gallery .d-thumbs { display: none; } }

/* Photo attribution under the gallery */
.d-credit { font-size: .78rem; color: var(--muted); margin: 6px 2px 0; text-align: right; }
.d-credit a { color: var(--muted); }

/* Header */
.d-header { margin: 18px 0 6px; }
.d-titlewrap { display: flex; align-items: center; gap: 14px; }
.d-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 4px; flex: 0 0 auto; }
.d-title { font-size: 2rem; margin: 0 0 8px; line-height: 1.15; }
.d-rowline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.d-rating-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.05rem; padding: 6px 12px; border-radius: 10px; }
.d-rating-badge small { font-weight: 600; opacity: .85; }
.d-verified { font-size: .8rem; color: var(--brand); border: 1px solid #a3c0ff; background: var(--chip-on); padding: 3px 8px; border-radius: 999px; }
.d-open { color: #137333; font-weight: 600; }
.d-open.closed { color: #b00020; }
.d-price { font-weight: 700; color: #111; }
.d-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.d-pills a, .d-pills span { font-size: .82rem; background: var(--chip); border-radius: 999px; padding: 4px 10px; color: #333; text-decoration: none; }
.d-pills a:hover { background: var(--chip-on); }

/* Action buttons */
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.d-actions a, .d-actions button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: #fff; color: #111; font-size: .95rem; }
.d-actions .primary { background: var(--brand); color: #fff; border-color: var(--brand); }
/* Save button in the action bar: normal pill (override the circular overlay style) */
.d-actions .fav-btn.d-save { position: static; width: auto; height: auto; border-radius: 10px; box-shadow: none; background: #fff; color: #111; gap: 6px; }
.d-actions .fav-btn.d-save svg { fill: none; stroke: currentColor; stroke-width: 2; }
.d-actions .fav-btn.d-save.on { color: #e0245e; border-color: #e0245e; }
.d-actions .fav-btn.d-save.on svg { fill: #e0245e; stroke: #e0245e; }

/* Two-column body */
.d-body { display: grid; grid-template-columns: 1fr 340px; gap: 28px; margin-top: 22px; align-items: start; }
@media (max-width: 900px) { .d-body { grid-template-columns: 1fr; } }
.d-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; background: #fff; }
.d-card h2 { font-size: 1.2rem; margin: 0 0 12px; }
.d-card h3 { font-size: 1.05rem; margin: 0 0 10px; }
.d-aside .d-card { margin-bottom: 16px; }

/* Score breakdown */
.score-overall { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.score-overall b { font-size: 2.2rem; color: var(--brand); }
.score-grid { display: flex; flex-direction: column; gap: 10px; }
.score-row { display: grid; grid-template-columns: 130px 1fr 38px; align-items: center; gap: 10px; font-size: .9rem; }
.score-track { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.score-fill { height: 100%; background: var(--brand); border-radius: 999px; }
.score-row b { text-align: right; }

/* Highlights */
.d-highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.d-highlights li { display: flex; gap: 8px; align-items: flex-start; }
.d-highlights li::before { content: "✓"; color: var(--brand); font-weight: 800; }

/* Chips group (amenities, cuisines, meals) */
.chip-row { margin-bottom: 12px; }
.chip-row .lbl { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-set span { background: var(--chip); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }

/* Hours */
.hours-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hours-table td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.hours-table td:last-child { text-align: right; color: var(--muted); }
.hours-table tr.today td { font-weight: 700; color: #111; }

/* Map */
.d-map iframe { width: 100%; height: 260px; border: 0; border-radius: 12px; }
.d-facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.d-facts dd { margin: 0 0 12px; }
.d-social { display: flex; gap: 12px; margin-top: 10px; }
.d-social a { color: var(--brand); text-decoration: none; }

/* FAQ accordion */
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: #333; margin: 10px 0 0; }

/* Review summary */
.review-summary { color: #333; }
.review-meta { color: var(--muted); font-size: .85rem; margin-top: 8px; }

/* display:block overrides a .related{display:grid} rule from styles.css that
   was placing the heading and cards side-by-side. */
.related { display: block !important; margin-top: 32px; width: 100%; }
.related > h2 { font-size: 1.3rem; margin: 0 0 14px; }
/* Single row that fills the full width: 4 equal columns on desktop,
   2 on tablet, 1 on small phones. 1fr columns => no trailing gap. */
.related .places-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 560px) { .related .places-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px)  { .related .places-grid { grid-template-columns: repeat(4, 1fr); } }
