/* =========================================================================
 * Listing page — single-listing.php, its template-parts/listing/* sections
 * (gallery, facts, prices, FAQ, lead form, reviews, directions, sidebar) and
 * the gallery lightbox.
 *
 * Enqueued only on is_singular( 'listing' ), after app.css (inc/assets.php).
 * A rule belongs here only when every selector in it names a class no other
 * page prints; anything shared stays in app.css.
 * ====================================================================== */

/* ================= single-listing ================= */
.p-single .section--white { background: var(--white); }
.p-single .p-title, .p-single .p-gallery { border-bottom: 1px solid var(--line); }

.p-gallery { padding: 16px 0 0; }
/* 2fr + two stacked 1fr cells inside a 9/4 frame is the one outer ratio that
   leaves every cell at --ratio-media: main = (2/3 w) / (4/9 w) = 3/2, each
   side cell = (1/3 w) / (2/9 w) = 3/2. */
.p-gallery-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; aspect-ratio: 9 / 4; }
.p-gallery-grid .gallery-thumb { border-radius: var(--r-card); }
.g-side { display: grid; grid-template-rows: repeat(2, 1fr); gap: 8px; min-height: 0; }
.g-more { position: relative; }
.g-more-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--navy-900) 55%, transparent); color: #fff; font-size: 14px; font-weight: var(--fw-bold); }

/* Any listing photo the visitor can open full-size — the hero grid and the
   portfolio grid both use it, so the click affordance and hover feedback
   exist in exactly one place. */
.gallery-thumb { display: block; width: 100%; height: 100%; padding: 0; border: 0; overflow: hidden; background: var(--placeholder); cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gallery-thumb:hover img, .gallery-thumb:focus-visible img { transform: scale(1.04); }
/* A portrait, square or small photo in a hero or mosaic tile: shown whole over a
   blurred copy of itself (trellis_gallery_frame_img()). The copy keeps its
   own scale on hover so its blurred edge never shows. */
.gallery-thumb.is-fit { position: relative; }
.gallery-thumb.is-fit img { position: relative; object-fit: contain; }
.gallery-thumb.is-fit .g-bg,
.gallery-thumb.is-fit:hover .g-bg,
.gallery-thumb.is-fit:focus-visible .g-bg { position: absolute; inset: 0; object-fit: cover; filter: blur(16px); transform: scale(1.2); }

.p-title { padding: 22px 0 20px; }
.p-title-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.p-title-head h1 { font-size: 30px; font-weight: var(--fw-black); }
.p-title-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: var(--fs-sm); }
.p-title-meta .rating { font-size: var(--fs-sm); }
.p-title-meta .rating .count { color: var(--muted); font-weight: var(--fw-semibold); }
.p-title-meta .dot { color: var(--line-strong); }
.p-title-meta a { font-weight: var(--fw-bold); color: var(--navy-700); }
.p-title-note { margin-top: 10px; }
.p-title-headline { margin-top: 6px; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--text-soft); line-height: 1.8; overflow-wrap: anywhere; }

.p-body { padding: 24px 0 40px; }
.p-body-grid { display: flex; gap: 24px; align-items: flex-start; }
.p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.p-block { padding: 22px; }
.p-block h2 { font-size: 19px; font-weight: var(--fw-black); margin-bottom: 12px; }

/* Main-column section head (trellis_listing_sec_head): icon tile, h2, one
   line under it. */
.p-sec { padding: 24px 26px; }
.p-block .p-sec-head h2 { margin: 0; font-size: 18px; line-height: 1.6; }

/* About: at-a-glance tiles, then the write-up, folded under .js. */
.p-facts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.p-fact { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.p-fact > svg { flex-shrink: 0; color: var(--accent-ink); }
.p-fact.is-open > svg { color: var(--verified); }
.p-fact.is-closed > svg { color: var(--alert); }
.p-fact > span { display: flex; flex-direction: column; min-width: 0; }
.p-fact b { font-size: 14px; line-height: 1.5; font-weight: var(--fw-bold); color: var(--text); overflow-wrap: anywhere; }
.p-fact small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.p-about { position: relative; }
.js .p-about.is-foldable:not(.is-open):not(.is-fits) { max-height: 240px; overflow: hidden; }
.js .p-about.is-foldable:not(.is-open):not(.is-fits)::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 96px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--white) 85%); pointer-events: none; }
.js .p-about.is-animating { overflow: hidden; transition: max-height .4s cubic-bezier(.2, .7, .2, 1); }
.js .p-about-more { justify-content: flex-start; margin-top: 2px; }
.p-more { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: var(--fw-bold); color: var(--accent-ink); cursor: pointer; }
.p-more:hover { color: var(--navy-900); }
.p-more:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-more svg { transition: transform .2s ease; }
.p-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* A listing's about text: subheadings sit under the card's h2, paragraphs
   justify once a line is long enough to take it (Persian has no hyphenation
   and browsers add no kashida, so a narrow column would open wide gaps). */
.p-about h3 { font-size: 17px; font-weight: var(--fw-black); color: var(--text); margin: 22px 0 8px; }
.p-about h4 { font-size: 15.5px; font-weight: var(--fw-bold); color: var(--text); margin: 18px 0 6px; }
.p-about > :first-child { margin-top: 0; }
.p-about > :last-child { margin-bottom: 0; }
.p-about strong, .p-about b { color: var(--text); font-weight: var(--fw-bold); }
.p-about li { margin-bottom: 2px; }
.p-about li::marker { color: var(--icon); }
@media (min-width: 640px) {
	.p-about p { text-align: justify; text-justify: inter-word; }
}

.p-trust { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* Features (template-parts/listing/features.php): check chips, two columns
   where there is room. */
.p-features-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.p-features-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-control); background: var(--verified-soft); font-size: 14px; font-weight: var(--fw-semibold); color: var(--text); line-height: 1.6; }
.p-features-list svg { flex-shrink: 0; color: var(--verified); }

/* Listing FAQ (template-parts/listing/faq.php): the combo pages' accordion
   items, inside a card. */
.p-lfaq .p-faq-item { background: var(--surface); }
.p-lfaq .p-faq-item[open] { background: var(--white); }

/* Price list (template-parts/listing/prices.php). Rows overlap their top
   border by a pixel, so the first one sits under the box's own edge and a
   row hidden by the fold or the search never leaves a doubled line. */
.p-prices-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.p-prices-search { position: relative; flex: 1 1 220px; display: block; }
.p-prices-search svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--icon); pointer-events: none; }
.p-prices-search input { width: 100%; height: var(--tap); padding: 0 14px; padding-inline-start: 42px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); font: inherit; font-size: 14px; color: var(--text); }
.p-prices-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); background: var(--white); }
.p-prices-updated { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--r-control); background: var(--verified-soft); font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--verified); white-space: nowrap; }
.p-prices-search:not([hidden]) + .p-prices-updated { min-height: var(--tap); }
.p-prices-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.p-price { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: -1px; padding: 12px 16px; border-top: 1px solid var(--line); transition: background-color .15s ease; }
.p-price:hover { background: var(--surface); }
.p-price-name { min-width: 0; font-size: 14.5px; font-weight: var(--fw-semibold); line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.p-price-name small { display: block; font-size: 12px; font-weight: var(--fw-regular); line-height: 1.6; color: var(--muted); }
.p-price-val { flex-shrink: 0; display: inline-flex; align-items: baseline; gap: 4px; font-size: 15px; font-weight: var(--fw-black); color: var(--navy-900); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-price-from, .p-price-unit { font-size: 11.5px; font-weight: var(--fw-medium); color: var(--muted); }
.p-price-val.is-ask { font-size: 13.5px; font-weight: var(--fw-semibold); color: var(--muted); }
.js .p-prices:not(.is-all):not(.is-searching) .p-price.is-extra, .p-price.is-miss { display: none; }
.p-prices-empty { margin: 0; padding: 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-card); text-align: center; font-size: 14px; color: var(--muted); }
.p-prices-empty a { font-weight: var(--fw-bold); color: var(--navy-700); }
.p-prices-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.p-prices-more { display: none; }
.js .p-prices-more { display: inline-flex; }
.js .p-prices.is-searching .p-prices-more { display: none; }
.p-prices-more svg { transition: transform .2s ease; }
.p-prices-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.p-prices-ask { margin-inline-start: auto; }
.p-prices-note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-card); background: var(--surface); font-size: 13px; line-height: 1.85; color: var(--muted); }
.p-prices-note svg { flex-shrink: 0; margin-top: 3px; color: var(--icon); }
@media (max-width: 480px) {
	.p-price { gap: 10px; padding: 11px 12px; }
	.p-price-name { font-size: 14px; }
	.p-price-val { font-size: 14px; }
	.p-prices-foot .btn { flex: 1 1 auto; }
}
.p-trust-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: var(--fw-semibold); line-height: 1.5; color: var(--navy-700); }
.p-trust-chip svg { flex-shrink: 0; color: var(--verified); }

/* Services: the owner's own list as cards, then where the directory files them. */
.p-svc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.p-svc-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color .2s ease, box-shadow .2s ease; }
.p-svc-card:hover { border-color: var(--accent-soft-border); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 10%, transparent); }
.p-svc-ico { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy-900); color: var(--accent-on-dark, var(--accent)); }
.p-svc-name { min-width: 0; font-size: 14.5px; font-weight: var(--fw-bold); line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }

/* Gallery mosaic. Each layout's frame ratio leaves every cell at
   --ratio-media (same arithmetic as .p-gallery-grid above). */
.p-mosaic { display: grid; gap: 10px; }
.p-mosaic > * { min-height: 0; }
.p-mosaic .gallery-thumb { position: relative; border-radius: var(--r-card); }
.p-mosaic.is-n1 { aspect-ratio: var(--ratio-media); }
.p-mosaic.is-n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 3 / 1; }
.p-mosaic.is-n3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 9 / 4; }
.p-mosaic.is-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); aspect-ratio: 6 / 1; }
.p-mosaic.is-n5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 3 / 1; }
.p-mosaic.is-n3 > :first-child, .p-mosaic.is-n5 > :first-child { grid-row: 1 / 3; }
.p-mosaic-cap { position: absolute; inset: auto 0 0 0; padding: 22px 12px 8px; background: linear-gradient(to top, color-mix(in srgb, var(--brand-primary-deep) 70%, transparent), transparent); font-size: 12px; line-height: 1.6; color: #fff; text-align: start; }
.p-mosaic-more { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: color-mix(in srgb, var(--navy-900) 62%, transparent); color: #fff; line-height: 1.35; transition: background-color .2s ease; }
.p-mosaic-more b { font-size: 22px; font-weight: var(--fw-black); }
.p-mosaic-more small { font-size: 12px; opacity: .85; }
.p-mosaic .gallery-thumb:hover .p-mosaic-more { background: color-mix(in srgb, var(--navy-900) 72%, transparent); }

/* ================= gallery lightbox (single-listing gallery + portfolio) ================= */
html.tr-lightbox-open, html.tr-lightbox-open body { overflow: hidden; }

.tr-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.tr-lightbox-backdrop { position: absolute; inset: 0; background: rgba(5, 10, 20, .92); }

.tr-lightbox-frame { position: relative; z-index: 1; max-width: min(92vw, 1100px); max-height: 86vh; display: flex; }
.tr-lightbox-frame img {
	max-width: 100%; max-height: 86vh; width: auto; height: auto; object-fit: contain;
	border-radius: var(--r-card); box-shadow: var(--shadow-pop);
	animation: tr-lightbox-in .18s ease;
}

.tr-lightbox-count {
	position: absolute; inset-block-end: -34px; inset-inline: 0; text-align: center;
	color: var(--on-dark-muted); font-size: var(--fs-meta); font-weight: var(--fw-semibold);
}

.tr-lightbox-close, .tr-lightbox-arrow {
	position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; border: 1px solid var(--on-dark-line); border-radius: 50%;
	background: rgba(255,255,255,.08); color: #fff; backdrop-filter: blur(4px);
	transition: background .15s ease, border-color .15s ease;
}
.tr-lightbox-close:hover, .tr-lightbox-arrow:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); }
.tr-lightbox-close { inset-inline-end: 20px; inset-block-start: 20px; }
.tr-lightbox-arrow { inset-block-start: 50%; transform: translateY(-50%); }
/* RTL: "previous" sits toward the right edge, so its chevron is mirrored —
   same convention as .l-gal-arrow's photo strip. */
.tr-lightbox-arrow--prev { inset-inline-start: 20px; }
.tr-lightbox-arrow--prev svg { transform: scaleX(-1); }
.tr-lightbox-arrow--next { inset-inline-end: 20px; }
.tr-lightbox-arrow[hidden] { display: none; }
@media (max-width: 640px) {
	.tr-lightbox-frame { max-width: 96vw; }
	.tr-lightbox-close { inset-inline-end: 10px; inset-block-start: 10px; width: 38px; height: 38px; }
	.tr-lightbox-arrow { width: 38px; height: 38px; }
	.tr-lightbox-arrow--prev { inset-inline-start: 10px; }
	.tr-lightbox-arrow--next { inset-inline-end: 10px; }
	.tr-lightbox-count { inset-block-end: -28px; }
}

/* Specs: icon rows in two columns, address and hours across both. The
   half-width cells always come first and in pairs (single-listing.php
   widens an odd one out), so odd children are the start column. */
.p-specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.p-spec { display: flex; align-items: flex-start; gap: 12px; min-width: 0; margin-top: -1px; padding: 14px 16px; border-top: 1px solid var(--line); }
.p-spec:not(.is-wide):nth-child(odd) { border-inline-end: 1px solid var(--line); }
.p-spec.is-wide { grid-column: 1 / -1; }
.p-spec-ico { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--fill); color: var(--navy-700); }
.p-spec > div { flex: 1; min-width: 0; }
.p-spec dt { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.p-spec dd { margin: 2px 0 0; font-size: 14.5px; font-weight: var(--fw-bold); line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.p-spec-open { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.p-spec-open.is-open { color: var(--verified); }
.p-spec-open.is-closed { color: var(--alert); }
.p-hours { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.p-hours li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: var(--r-control); background: var(--surface); font-size: 12.5px; font-weight: var(--fw-regular); line-height: 1.7; }
.p-hours li span { color: var(--muted); }
.p-hours li b { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.p-hours li.is-today { background: var(--verified-soft); }
.p-hours li.is-today span, .p-hours li.is-today b { color: #0b5c45; font-weight: var(--fw-bold); }
.p-hours li.is-closed b { color: var(--alert); }

/* =========================================================================
 * Reviews (#reviews) — summary, filterable histogram, review cards, form
 * ====================================================================== */
.p-reviews { display: flex; flex-direction: column; gap: 20px; overflow: visible; }
.p-reviews-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.p-reviews-head h2 { font-size: 19px; font-weight: var(--fw-black); margin: 0; }
.p-reviews-sub { margin: 4px 0 0; font-size: var(--fs-meta); color: var(--muted); }
.p-reviews-cta { flex-shrink: 0; }
.p-reviews-cta svg { width: 16px; height: 16px; }

/* Summary: score tile + histogram */
.p-reviews-summary { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.p-reviews-score { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); text-align: center; }
.p-reviews-score .num { font-size: 44px; font-weight: var(--fw-black); line-height: 1.1; color: var(--navy-900); }
.p-reviews-score .num small { font-size: 16px; font-weight: var(--fw-bold); color: var(--muted); margin-inline-start: 2px; }
.p-reviews-score .stars svg { width: 18px; height: 18px; }
.p-reviews-verdict { display: inline-block; margin-top: 2px; padding: 2px 10px; border-radius: 999px; background: var(--rating-soft); border: 1px solid var(--rating-soft-border); color: var(--rating-ink); font-size: 12.5px; font-weight: var(--fw-bold); }
.p-reviews-score .meta { white-space: nowrap; }

.p-reviews-bars { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bar-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--r-control); background: transparent; font: inherit; font-size: 12.5px; color: var(--text-soft); cursor: pointer; text-align: start; transition: background-color .15s, border-color .15s; }
.bar-row:hover:not(:disabled) { background: var(--white); border-color: var(--line); }
.bar-row[aria-pressed="true"] { background: var(--white); border-color: var(--rating); box-shadow: 0 0 0 1px var(--rating) inset; }
.bar-row:disabled { cursor: default; opacity: .55; }
.bar-label { display: inline-flex; align-items: center; gap: 3px; width: 34px; flex-shrink: 0; color: var(--text-soft); font-weight: var(--fw-bold); }
.bar-label svg { width: 13px; height: 13px; fill: var(--rating); }
.bar-n { min-width: 28px; text-align: end; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-reviews-positive { display: flex; align-items: center; gap: 7px; margin: 8px 8px 0; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--verified); font-weight: var(--fw-semibold); }
.p-reviews-positive svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Active-filter strip */
.p-reviews-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 14px; background: var(--rating-soft); border: 1px solid var(--rating-soft-border); border-radius: var(--r-control); font-size: var(--fs-sm); color: var(--rating-ink); font-weight: var(--fw-semibold); }
.p-reviews-filterbar[hidden] { display: none; }
.p-reviews-filter-clear { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: var(--fw-bold); cursor: pointer; }
.p-reviews-filter-clear svg { width: 14px; height: 14px; }

/* Review cards */
.p-reviews-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.p-review > article { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color .15s, box-shadow .15s; }
.p-review > article:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px color-mix(in srgb, var(--navy-800) 5%, transparent); }
.p-review.is-hidden, .p-review.is-filtered { display: none; }
/* A star filter shows every match, past the initial "show N" cut. */
.p-reviews.is-filtering .p-review.is-hidden { display: block; }
.p-reviews.is-filtering .p-review.is-filtered { display: none; }
.p-review.is-revealed > article { animation: p-review-in .28s ease-out both; }
.p-review-avatar { width: 42px; height: 42px; flex-shrink: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: var(--fw-black); font-size: 17px; background: var(--fill); color: var(--navy-700); }
.p-review-avatar.tone-0 { background: #E6EEF9; color: #1F4E8C; }
.p-review-avatar.tone-1 { background: #FDF1DA; color: #8A4F00; }
.p-review-avatar.tone-2 { background: #E7F4EF; color: #0B5C45; }
.p-review-avatar.tone-3 { background: #F3E8F7; color: #6B2E83; }
.p-review-avatar.tone-4 { background: #FBE9E6; color: #983527; }
.p-review-avatar.tone-5 { background: #E4F3F6; color: #155E6E; }
.p-review-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-review-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: var(--fw-bold); color: var(--text); }
.p-review-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 8px; border-radius: 999px; background: var(--verified-soft); color: var(--verified); font-size: 11px; font-weight: var(--fw-bold); line-height: 1.8; }
.p-review-badge svg { width: 11px; height: 11px; }
.p-review-rating { margin-inline-start: auto; flex-shrink: 0; }
.p-review-service { align-self: flex-start; padding: 3px 10px; border-radius: var(--r-chip); background: var(--fill); color: var(--text-soft); font-size: 12px; font-weight: var(--fw-semibold); }
.p-review-toggle { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: var(--fw-bold); color: var(--navy-700); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.p-review-toggle:hover { color: var(--navy-900); text-decoration-color: currentColor; }
.p-review-reply-by { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: var(--fw-bold); color: var(--navy-700); }
.p-review-reply-by svg { width: 15px; height: 15px; }

.p-reviews-nomatch { margin: 0; padding: 18px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r-card); }
.p-reviews-more-wrap { display: flex; justify-content: center; }
.p-reviews-more svg { width: 16px; height: 16px; }

/* Empty state */
.p-reviews-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-card); }
.p-reviews-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 999px; background: var(--rating-soft); color: var(--rating-ink); }
.p-reviews-empty-icon svg { width: 28px; height: 28px; }
.p-reviews-empty-title { margin: 0; font-weight: var(--fw-black); color: var(--text); }
.p-reviews-empty-text { margin: 0; max-width: 420px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.9; }

/* Write-a-review */
.p-write-review { padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); scroll-margin-top: calc(var(--header-h) + 16px); }
.p-write-review-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.p-write-review-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-control); background: var(--navy-900); color: var(--accent-on-dark, var(--accent)); }
.p-write-review-icon svg { width: 20px; height: 20px; }
.p-write-review h3 { font-size: 16px; font-weight: var(--fw-black); margin: 0 0 2px; }
.p-write-review-head .meta { margin: 0; line-height: 1.8; }
.p-write-review .form-notice { margin: 0 0 16px; }
.p-write-review-login { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; background: var(--surface); border-radius: var(--r-control); }
.p-write-review-login > svg { width: 26px; height: 26px; color: var(--navy-700); flex-shrink: 0; }
.p-write-review-login p { flex: 1; min-width: 200px; margin: 0; font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.9; }

.p-rate { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.p-rate legend { float: inline-start; width: 100%; padding: 0; margin-bottom: 8px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-soft); }
.p-rate-box { clear: both; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-control); transition: border-color .15s, background-color .15s; }
.p-rate-box:has(input:checked) { background: var(--rating-soft); border-color: var(--rating-soft-border); }
.p-rate-box:has(input:focus-visible) { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.p-rate-stars label { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border-radius: var(--r-control); }
.p-rate-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.p-rate-stars svg { width: 32px; height: 32px; fill: #d0d8e2; transition: fill .12s, transform .12s; }
.p-rate-stars label:hover svg { transform: scale(1.12); }
.p-rate-stars label:hover svg,
.p-rate-stars label:hover ~ label svg,
.p-rate-stars label:has(input:checked) svg,
.p-rate-stars label:has(input:checked) ~ label svg { fill: var(--rating); }
/* While hovering, preview the hovered value instead of the saved one. */
.p-rate .p-rate-stars:hover label svg { fill: #d0d8e2; }
.p-rate .p-rate-stars:hover label:hover svg,
.p-rate .p-rate-stars:hover label:hover ~ label svg { fill: var(--rating); }
.p-rate-caption { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--muted); }
.p-rate-box:has(input:checked) .p-rate-caption { color: var(--rating-ink); }

.p-write-review .field input, .p-write-review .field textarea { background: var(--white); }
.p-write-review .field textarea { min-height: 128px; line-height: 1.9; }
.p-write-review .field-hint { font-size: 12.5px; }
.p-field-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.p-char-count { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.p-review-actions { display: flex; justify-content: flex-end; }
.p-review-submit { min-width: 160px; }
.p-review-submit svg { transform: scaleX(-1); }
.p-review-submit.is-busy { opacity: .75; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
	.p-review.is-revealed > article { animation: none; }
	.p-rate-stars svg, .bar-row, .p-review > article { transition: none; }
	.p-rate-stars label:hover svg { transform: none; }
}

/* =========================================================================
 * Address + directions (#location) — template-parts/listing/directions.php
 * ====================================================================== */
.p-map-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.p-map-grid.has-map { grid-template-columns: minmax(0, 1fr) 290px; }
.p-map-canvas { position: relative; min-width: 0; }
.p-map-canvas .trellis-geo-view { height: 100%; min-height: 320px; }
/* The "approximate area" note, as a legend pill on the map's free corner
   (Leaflet keeps the zoom buttons top-left and the credit bottom-right). */
.p-map-canvas .trellis-geo-view__note { position: absolute; z-index: 1; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); box-shadow: var(--shadow-card); font-size: 12px; font-weight: var(--fw-semibold); color: var(--text-soft); }
.p-map-canvas .trellis-geo-view__note::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 30%, transparent); border: 2px solid var(--accent); }
.p-map-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.p-map-addr-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); }
.p-map-k { font-size: 12.5px; color: var(--muted); }
.p-map-addr { margin: 4px 0 12px; font-size: 14.5px; font-weight: var(--fw-bold); line-height: 1.8; color: var(--text); overflow-wrap: anywhere; }
.p-map-actions { display: flex; gap: 8px; }
.p-map-actions .p-map-copy { flex: 1; }
.p-map-copy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--white); font: inherit; font-size: 13px; font-weight: var(--fw-bold); color: var(--navy-700); cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.p-map-copy:hover { border-color: var(--navy-700); color: var(--navy-900); }
.p-map-copy:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-map-copy svg { width: 16px; height: 16px; flex-shrink: 0; }
.p-map-copy .p-copy-done { display: none; }
.p-map-copy.is-copied { border-color: var(--verified-soft-border); background: var(--verified-soft); color: var(--verified); }
.p-map-copy.is-copied .p-copy-idle { display: none; }
.p-map-copy.is-copied .p-copy-done { display: block; }
.p-map-route-title { margin: 0 0 8px; font-size: 13px; font-weight: var(--fw-bold); color: var(--text); }
.p-map-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.p-map-app { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--white); color: var(--text); text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s; }
.p-map-app:hover { border-color: var(--navy-700); box-shadow: 0 6px 18px color-mix(in srgb, var(--navy-800) 8%, transparent); transform: translateY(-1px); color: var(--text); }
.p-map-app:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-map-app-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface); }
.p-map-app-logo svg { width: 26px; height: 26px; }
.p-map-app-name { font-size: 13px; font-weight: var(--fw-bold); line-height: 1.4; }
.p-map-approx { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-card); background: var(--warn-soft); font-size: 12.5px; line-height: 1.8; color: var(--warn); }
.p-map-approx svg { flex-shrink: 0; margin-top: 2px; color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) {
	.p-map-app, .p-map-copy { transition: none; }
	.p-map-app:hover { transform: none; }
}

/* corrections */
.p-correct { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.p-correct-btns { display: flex; gap: 8px; }
.p-report { color: var(--alert); }

/* ---- single sidebar ---- */
.p-side { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.p-contact { padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-card); }
.p-contact-phone { min-height: 56px; font-size: 17px; }
.p-contact-meta { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--fill); display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--text-soft); }
.p-contact-meta li { display: flex; align-items: flex-start; gap: 9px; }
.p-contact-meta svg { flex-shrink: 0; color: var(--icon); margin-top: 2px; }
.p-contact-meta .is-open { color: #0b5c45; }
.p-contact-meta .is-closed { color: var(--alert); }
.p-socials { padding-top: 12px; border-top: 1px solid var(--fill); }
.p-socials-title { font-size: 13px; font-weight: var(--fw-bold); color: var(--muted); margin: 0 0 8px; }
.p-socials-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
/* Brand shades darkened where the logo colour is too light to read as a
   small icon on a pale tile (WhatsApp, Telegram, Eitaa). */
.p-social { --net: var(--navy-700); display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 6px 10px 6px 8px; border: 1px solid var(--line); border-radius: var(--r-control); color: var(--text); transition: border-color .15s ease, background-color .15s ease; }
.p-social[data-net="instagram"] { --net: #C13584; }
.p-social[data-net="telegram"]  { --net: #1A7FC1; }
.p-social[data-net="whatsapp"]  { --net: #128C7E; }
.p-social[data-net="eitaa"]     { --net: #C55E10; }
.p-social[data-net="rubika"]    { --net: #7B3FE4; }
.p-social[data-net="bale"]      { --net: #00897B; }
.p-social[data-net="aparat"]    { --net: #D4145A; }
.p-social[data-net="youtube"]   { --net: #D90000; }
.p-social[data-net="linkedin"]  { --net: #0A66C2; }
.p-social[data-net="x"]         { --net: #0F1419; }
.p-social[data-net="facebook"]  { --net: #1877F2; }
.p-social:hover { border-color: var(--net); background: color-mix(in srgb, var(--net) 4%, var(--white)); }
.p-social:focus-visible { outline: 2px solid var(--net); outline-offset: 1px; }
.p-social-ico { flex-shrink: 0; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--net); background: var(--fill); background: color-mix(in srgb, var(--net) 11%, var(--white)); }
.p-social-ico svg { width: 19px; height: 19px; }
.p-social-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.p-social-name { font-size: 13.5px; font-weight: var(--fw-semibold); }
.p-social-handle { font-size: 12.5px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-latin); }
.p-social-go { flex-shrink: 0; color: var(--icon); }
.p-social:hover .p-social-go { color: var(--net); }
.p-contact-verified { display: flex; align-items: flex-start; gap: 8px; background: var(--verified-soft); border: 1px solid var(--verified-soft-border); border-radius: var(--r-control); padding: 10px 12px; font-size: 12.5px; color: #0b5c45; line-height: 1.7; }
.p-contact-verified svg { flex-shrink: 0; color: var(--verified); margin-top: 2px; }

/* "فهرست‌های این کسب‌وکار" (sidebar): the main column's section head, then
   one row per directory page the business is listed on. */
.p-where { padding: 18px; }
.p-where-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.p-where-head .p-sec-ico { width: 38px; height: 38px; }
.p-where-head .p-sec-ico svg { width: 19px; height: 19px; }
.p-where h3 { margin: 0; font-size: 16px; font-weight: var(--fw-black); line-height: 1.6; }
.p-where-head p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.p-where-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.p-where-link { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; padding-inline-start: 8px; border: 1px solid var(--line); border-radius: var(--r-card); color: var(--text); transition: border-color .15s ease, background-color .15s ease; }
.p-where-link:hover { border-color: var(--accent-soft-border); background: var(--accent-soft); color: var(--text); }
.p-where-link:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.p-where-ico { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--fill); color: var(--navy-700); transition: background-color .15s ease, color .15s ease; }
.p-where-link:hover .p-where-ico { background: var(--white); color: var(--accent-ink); }
.p-where-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.p-where-txt b { font-size: 14px; font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.p-where-txt small { font-size: 12px; color: var(--muted); }
.p-where-link > .p-ico:last-child { flex-shrink: 0; color: var(--icon); transition: color .15s ease, transform .15s ease; }
.p-where-link:hover > .p-ico:last-child { color: var(--accent-ink); transform: translateX(-2px); }
@media (prefers-reduced-motion: reduce) {
	.p-where-link:hover > .p-ico:last-child { transform: none; }
}

/* Lead form (template-parts/listing/lead-form.php): a navy column of
   reassurances beside the form. */
.p-lead { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.p-lead-aside { position: relative; overflow: hidden; padding: 26px 22px; background: var(--navy-900); color: var(--on-dark-muted); }
.p-lead-aside::before { content: ""; position: absolute; top: -80px; inset-inline-end: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%); pointer-events: none; }
.p-lead-aside > * { position: relative; }
.p-lead-aside .p-sec-ico { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-on-dark, var(--accent)); }
.p-lead-title { margin: 14px 0 6px; font-size: 19px; font-weight: var(--fw-black); line-height: 1.6; color: var(--on-dark); }
.p-lead-note { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--on-dark-muted); }
.p-lead-points { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.p-lead-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.8; color: #E5E9F1; }
.p-lead-points svg { flex-shrink: 0; margin-top: 3px; color: var(--accent-on-dark, var(--accent)); }
.p-lead-body { min-width: 0; padding: 24px 26px; }
.p-lead-body .form-notice { margin-bottom: 14px; }
.p-lead-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.p-lead .field > label { font-weight: var(--fw-bold); color: var(--text); }
.p-req { font-style: normal; color: var(--alert); }
.p-lead .field input, .p-lead .field textarea { transition: border-color .15s ease, box-shadow .15s ease; }
.p-lead .field input:focus, .p-lead .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.p-lead .field input[dir="ltr"] { text-align: right; }
.p-lead-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.p-lead-req { font-size: 12px; color: var(--muted); }
.p-lead-submit { min-width: 200px; }
@media (max-width: 860px) {
	.p-map-grid.has-map { grid-template-columns: minmax(0, 1fr); }
	.p-map-canvas .trellis-geo-view { min-height: 260px; }
	.p-lead { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
	.p-body-grid { flex-direction: column; }
	.p-side { width: 100%; position: static; }
	.p-svc-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
	.p-gallery-grid { grid-template-columns: 1fr; aspect-ratio: auto; }
	.p-gallery-grid > span, .p-gallery-grid .g-side > span,
	.p-gallery-grid > .gallery-thumb, .p-gallery-grid .g-side > .gallery-thumb { aspect-ratio: var(--ratio-media); }
	.g-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
	.p-sec { padding: 20px 16px; }
	.p-mosaic[class*="is-n"] { grid-template-columns: 1fr 1fr; grid-template-rows: none; aspect-ratio: auto; }
	.p-mosaic > * { aspect-ratio: var(--ratio-media); }
	.p-mosaic.is-n1 > :first-child, .p-mosaic.is-n3 > :first-child, .p-mosaic.is-n5 > :first-child { grid-row: auto; grid-column: 1 / -1; }
	.p-specs { grid-template-columns: 1fr; }
	.p-spec:not(.is-wide):nth-child(odd) { border-inline-end: 0; }
	.p-svc-cards { grid-template-columns: 1fr; }
	.p-title-headline { font-size: var(--fs-sm); }
	.p-reviews-summary { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
	.p-reviews-score { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 12px; padding: 14px; }
	.p-reviews-head { flex-direction: column; align-items: stretch; }
	.p-reviews-cta { align-self: flex-start; }
	.p-review > article { padding: 14px; }
	.p-review-rating { margin-inline-start: 54px; order: 3; width: 100%; }
	.p-correct { flex-direction: column; align-items: flex-start; }
	.p-lead-row2 { grid-template-columns: 1fr; }
	.p-lead-body { padding: 20px 16px; }
	.p-lead-submit { width: 100%; }
	.p-review-submit { width: 100%; }
	.p-write-review { padding: 16px; }
	.p-review-actions { display: block; }
	.p-rate-stars label { width: 44px; }
}

/* "Similar businesses" under the page: six cards, four on a phone, and a
   "see all" link to the specialty-in-city page when it holds more. */
.p-similar-more { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--fw-bold); min-height: var(--tap); white-space: nowrap; }
@media (max-width: 600px) {
	.p-similar .section-head { flex-wrap: wrap; align-items: flex-start; }
	.p-similar-more { white-space: normal; }
	.p-similar-grid > :nth-child(n+5) { display: none; }
}
