/* Ad detail page (frontend/portal/ads/show) — modern layout on the site theme */
.adv, .adv-mbar {
  --av-primary: var(--primary, #1877e8);
  --av-primary-2: #5b4dee;
  --av-soft: var(--primary-soft, #edf5ff);
  --av-line: #e6e9f2;
  --av-bg: #f6f8fc;
  --av-text: #1f2937;
  --av-muted: #6b7280;
  --av-danger: #e03131;
  --av-gold: #f5a524;
  --av-radius: 18px;
  --av-shadow: 0 8px 28px rgba(17, 38, 80, .06);
}
.adv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  margin-top: 18px;
  align-items: start;
  color: var(--av-text);
}
.adv-mbar button, .adv button, .adv select, .adv textarea, .adv input { font-family: inherit; }
.ad-alert { display: flex; gap: 8px; align-items: center; border-radius: 14px; }

/* cards & titles */
.adv-card {
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--av-shadow);
  scroll-margin-top: 80px;
}
.adv-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #111827;
}
.adv-title > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--av-soft);
  color: var(--av-primary);
  font-size: 15px;
}
.adv-muted { font-size: 13px; color: var(--av-muted); margin: 8px 0 0; text-align: center; }
.adv-muted a { color: var(--av-primary); font-weight: 700; }

/* buttons */
.adv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.adv-btn:hover { transform: translateY(-1px); text-decoration: none; }
.adv-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--av-primary), var(--av-primary-2));
  box-shadow: 0 8px 20px rgba(24, 119, 232, .28);
}
.adv-btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(24, 119, 232, .36); }
.adv-btn-soft { color: var(--av-primary); background: var(--av-soft); }
.adv-btn-soft:hover { color: #fff; background: var(--av-primary); }
.adv-btn-danger { color: var(--av-danger); background: #fdecec; width: 100%; }
.adv-btn-danger:hover { color: #fff; background: var(--av-danger); box-shadow: 0 8px 18px rgba(224, 49, 49, .25); }

/* gallery */
.adv-gallery { margin-bottom: 18px; }
.adv-swiper {
  position: relative;
  border-radius: var(--av-radius);
  overflow: hidden;
  background: var(--av-bg);
  box-shadow: var(--av-shadow);
}
.adv-swiper img { width: 100%; height: 420px; object-fit: cover; display: block; }
.adv-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
  color: #111;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  transition: background .15s, transform .15s;
}
.adv-nav:hover { background: #fff; transform: scale(1.06); }
.adv-next { left: 14px; }
.adv-prev { right: 14px; }
.adv-nav.swiper-button-disabled { opacity: .35; cursor: default; }
.adv-count {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 5;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(17, 24, 39, .6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
}
.adv-badges { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; }
.adv-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.adv-badge.is-featured { background: linear-gradient(135deg, #f7b733, #fc8c1c); }
.adv-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.adv-thumb {
  flex: 0 0 84px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: .6;
  background: var(--av-bg);
  transition: opacity .15s, border-color .15s;
}
.adv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-thumb:hover { opacity: .9; }
.adv-thumb.active { opacity: 1; border-color: var(--av-primary); }

/* quick facts */
.adv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.adv-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--av-shadow);
  min-width: 0;
}
.adv-fact > div { display: flex; flex-direction: column; min-width: 0; }
.adv-fact b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-fact small { font-size: 11px; color: var(--av-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-fact-ic { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; font-size: 16px; }
.adv-fact-ic.is-gold { background: #fff6e0; color: var(--av-gold); }
.adv-fact-ic.is-blue { background: var(--av-soft); color: var(--av-primary); }
.adv-fact-ic.is-green { background: #e8f8ee; color: #12a150; }
.adv-fact-ic.is-violet { background: #f0edff; color: var(--av-primary-2); }

/* section tabs */
.adv-tabs {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--av-line);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 18px;
  box-shadow: var(--av-shadow);
}
.adv-tabs::-webkit-scrollbar { display: none; }
.adv-tabs a {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--av-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.adv-tabs a:hover { color: var(--av-primary); }
.adv-tabs a.active { background: var(--av-soft); color: var(--av-primary); }

/* about */
.adv-desc { font-size: 14px; line-height: 2.1; color: #374151; overflow-wrap: anywhere; }
.adv-desc img { max-width: 100%; height: auto; border-radius: 12px; }
.adv-desc p:last-child { margin-bottom: 0; }

/* brands */
.adv-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.adv-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--av-line);
  border-radius: 14px;
  background: var(--av-bg);
  color: var(--av-text);
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.adv-brand:hover { border-color: var(--av-primary); transform: translateY(-2px); box-shadow: var(--av-shadow); color: var(--av-primary); text-decoration: none; }
.adv-brand b { font-size: 14px; }
.adv-brand small { font-size: 11px; color: #12a150; font-weight: 700; }
.adv-brand.is-agent { background: #f2fbf5; border-color: #c4ecd2; }

/* map */
.adv-map { height: 300px; border-radius: 14px; overflow: hidden; z-index: 1; }
.adv-map-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.adv-map-foot p { margin: 0; font-size: 13px; color: var(--av-muted); flex: 1 1 200px; }
.adv-map-foot p i { color: var(--av-primary); margin-left: 4px; }

/* products inside card */
.adv-card .prod-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

/* sidebar */
.adv-side { position: sticky; top: 16px; }
.adv-profile { text-align: center; padding-top: 0; overflow: hidden; }
.adv-profile-band {
  height: 84px;
  margin: 0 -20px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .25) 0 18%, transparent 19%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, .15) 0 22%, transparent 23%),
    linear-gradient(135deg, var(--av-primary), var(--av-primary-2));
}
.adv-logo {
  width: 96px;
  height: 96px;
  margin-top: -48px;
  object-fit: contain;
  background: #fff;
  border-radius: 24px;
  border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(17, 38, 80, .15);
  position: relative;
}
.adv-profile h1 { font-size: 20px; font-weight: 800; margin: 12px 0 2px; color: #111827; line-height: 1.6; }
.adv-name-en { font-size: 12px; color: var(--av-muted); margin: 0; letter-spacing: .3px; }
.adv-subtitle { font-size: 13px; color: var(--av-muted); margin: 4px 0 0; }
.adv-stars { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.adv-stars-box { position: relative; display: inline-block; line-height: 1; }
.adv-stars-bg, .adv-stars-fg { font-size: 18px; letter-spacing: 2px; line-height: 1; }
.adv-stars-bg { color: #e5e7eb; }
.adv-stars-fg {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--av-gold);
  overflow: hidden;
  white-space: nowrap;
}
.adv-stars small { font-size: 13px; font-weight: 800; color: var(--av-text); }
.adv-stars em { font-style: normal; font-weight: 400; color: var(--av-muted); font-size: 12px; }
.adv-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.adv-cats a {
  font-size: 12px;
  color: var(--av-primary);
  background: var(--av-soft);
  border-radius: 20px;
  padding: 3px 12px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.adv-cats a:hover { background: var(--av-primary); color: #fff; }
.adv-contact-btn { width: 100%; margin-top: 14px; padding: 13px; font-size: 15px; }
.adv-contact { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; text-align: right; }
.adv-contact a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--av-bg);
  color: var(--av-text);
  text-decoration: none;
  font-size: 14px;
  transition: background .15s, transform .15s;
}
.adv-contact a:hover { background: var(--av-soft); transform: translateX(-2px); text-decoration: none; }
.adv-contact-ic { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--av-primary); }
.adv-contact .is-wa .adv-contact-ic { color: #25d366; }
.adv-contact .is-tg .adv-contact-ic { color: #229ed9; }
.adv-contact .is-ig .adv-contact-ic { color: #e1306c; }
.adv-contact .is-mail .adv-contact-ic { color: var(--av-primary-2); }
.adv-contact-label { color: var(--av-muted); font-size: 13px; flex: 1; }
.adv-contact b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.adv-warn {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.9;
  color: #8a5a00;
  background: #fff8e6;
  border: 1px solid #fde7b0;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 6px 0 0;
}
.adv-warn i { margin-top: 4px; }
.adv-address { display: flex; gap: 8px; font-size: 13px; color: var(--av-muted); margin: 14px 0 0; text-align: right; line-height: 1.9; }
.adv-address i { color: var(--av-primary); margin-top: 5px; }
.adv-actions { display: flex; gap: 8px; margin-top: 14px; }
.adv-actions .ad-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--av-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--av-text);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.adv-actions .ad-action:hover { border-color: var(--av-primary); color: var(--av-primary); }
.adv-actions .ad-action.active { border-color: var(--av-primary); background: var(--av-soft); color: var(--av-primary); }

/* hours */
.adv-hours { list-style: none; margin: 0; padding: 0; }
.adv-hours li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.adv-hours li:nth-child(odd) { background: var(--av-bg); }
.adv-hours span { color: var(--av-muted); }
.adv-hours b { font-weight: 700; direction: ltr; unicode-bidi: plaintext; }

/* rating */
.adv-rate { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; }
.adv-rate button, .adv-rate span {
  border: 0;
  background: none;
  font-size: 34px;
  line-height: 1;
  color: #e5e7eb;
  cursor: pointer;
  padding: 0;
  transition: color .1s, transform .15s;
}
.adv-rate button.on { color: var(--av-gold); }
.adv-rate button:hover, .adv-rate button:hover ~ button { color: var(--av-gold); transform: scale(1.12); }
.adv-rate.is-disabled span { cursor: default; }

/* report */
.adv-report { padding: 0; overflow: hidden; }
.adv-report summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  transition: background .15s;
}
.adv-report summary::-webkit-details-marker { display: none; }
.adv-report summary:hover { background: #fff7f7; }
.adv-report summary > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; text-align: right; }
.adv-report summary b { font-size: 14px; color: var(--av-danger); }
.adv-report summary small { font-size: 12px; color: var(--av-muted); }
.adv-report-ic { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; background: #fdecec; color: var(--av-danger); }
.adv-report-arrow { color: var(--av-muted); transition: transform .2s; }
.adv-report[open] .adv-report-arrow { transform: rotate(180deg); }
.adv-report[open] summary { border-bottom: 1px solid var(--av-line); }
.adv-report form { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.adv-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: #374151; }
.adv-field small { color: var(--av-muted); font-weight: 400; }
.adv-field select, .adv-field textarea {
  width: 100%;
  border: 1px solid var(--av-line);
  border-radius: 12px;
  background: var(--av-bg);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--av-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.adv-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
}
.adv-field textarea { resize: vertical; min-height: 84px; }
.adv-field select:focus, .adv-field textarea:focus { border-color: var(--av-primary); background-color: #fff; box-shadow: 0 0 0 4px rgba(24, 119, 232, .12); }

/* related */
.adv-related { margin-top: 30px; }
.adv-related-title { display: flex; align-items: center; gap: 10px; }
.adv-related-title > span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--av-soft, #edf5ff);
  color: var(--primary, #1877e8);
  font-size: 16px;
}

/* mobile bar */
.adv-mbar { display: none; }

@media (max-width: 1100px) {
  .adv { grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
  .adv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .adv { grid-template-columns: 1fr; }
  .adv-side { position: static; display: contents; }
  .adv-main { display: contents; }
  /* order: gallery, profile, facts, tabs, sections..., hours, rate, report */
  .adv-gallery { order: 1; }
  .adv-profile { order: 2; }
  .adv-facts { order: 3; }
  .adv-tabs { order: 4; }
  .adv-main > .adv-card, .adv-main > #sec-faq { order: 5; }
  .adv-side > .adv-card:not(.adv-profile) { order: 6; }
  .adv-gallery, .adv-facts, .adv-tabs { margin-bottom: 0; }
  .adv-card { margin-bottom: 0; padding: 16px; }
  .adv-profile-band { margin: 0 -16px; }
  .adv-swiper img { height: 260px; }
  .adv-thumbs { display: none; }
  .adv-tabs { top: 4px; }
  body { padding-bottom: 76px; }
  .adv-mbar {
    display: flex;
    gap: 8px;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 900;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-top: 1px solid #e6e9f2;
    box-shadow: 0 -6px 20px rgba(17, 38, 80, .08);
  }
  .adv-mbar .adv-btn-primary { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adv-mbar-share { flex: 0 0 48px; padding: 0; font-size: 18px; }
}
@media (max-width: 900px) {
  .adv { gap: 14px; }
}
@media (max-width: 420px) {
  .adv-fact { padding: 10px; gap: 8px; }
  .adv-fact-ic { width: 32px; height: 32px; flex-basis: 32px; font-size: 14px; }
}
#sec-faq { scroll-margin-top: 80px; }
#sec-faq .faq-box { margin-top: 0; }
@media (max-width: 900px) {
  #sec-faq .faq-box { margin-bottom: 0; padding: 16px; }
}
/* facts: stacked tiles so long values (dates, city names) fit */
.adv-fact { flex-direction: column; text-align: center; gap: 6px; padding: 12px 8px; }
.adv-fact > div { align-items: center; width: 100%; }
.adv-fact b { max-width: 100%; }
@media (max-width: 900px) {
  .adv-main > *, .adv-side > * { min-width: 0; max-width: 100%; }
  .adv .adv-swiper { width: 100%; }
}
