/*
Theme Name: ExploreCity
Theme URI: https://explorecity.local/
Description: ExploreCity landing child theme for Twenty Twenty-Four (moroccan.quest).
Author: ExploreCity
Template: twentytwentyfour
Version: 1.0.0
Text Domain: explorecity
*/

/* =============================================================
   Moroccan Quest — landing page styles (fork of the istanbul.quest bundle)

   How to use on WordPress:
   1. Upload this file (style.css) and your hero photo (background-image.jpg)
      into your active theme folder, e.g. /wp-content/themes/<theme>/
      or into a child theme. Alternatively put them under the
      Uploads folder and adjust the path below.
   2. Enqueue the stylesheet from functions.php:
        wp_enqueue_style(
          'moroccan-quest',
          get_stylesheet_directory_uri() . '/style.css'
        );
      Or simply paste the markup from index.html into a "Custom HTML"
      block on a page and add the <link> tag to the page head.
   3. Replace the file `background-image.jpg` (referenced below in `.hero`)
      with your own photo. Same file name = no CSS edits needed.
   4. Font Awesome and Google Fonts are loaded from CDNs in
      index.html, no extra setup required.
   ============================================================= */

/* ---------- Reset & base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  /* Guard against stray horizontal scroll on mobile (clip = no scroll container,
     does not break position: sticky). Falls back to hidden on older browsers. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-height);
}

/* Fixed header is taller than --header-height (padding + logo lines); inner pages rely on body offset only — add a bit of slack so titles do not tuck under it. Hero on .home unchanged (negative hero margin stays matched to --header-height). */
body:not(.home) {
  padding-top: calc(var(--header-height) + clamp(0.3125rem, 1vw, 0.75rem));
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

body a,
body a:hover {
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
}

p {
  margin: 0;
}

/* ---------- Design tokens ---------- */

:root {
  --header-height: 4rem;
  --accent: #F9E14C;
  --accent-hover: #ffe96b;
  --bg-dark: #0e0e0e;
  --card-bg: rgba(20, 20, 20, 0.78);
  --card-border: rgba(255, 255, 255, 0.06);
  --dark-btn: #1c1c1c;
  --dark-btn-hover: #2a2a2a;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-dim: rgba(255, 255, 255, 0.55);

  /* Light section tokens */
  --bg-light: #ededed;
  --bg-light-soft: #f6f6f6;
  --card-light-bg: #ffffff;
  --card-light-border: rgba(0, 0, 0, 0.06);
  --text-dark: #1a1a1a;
  --text-dark-muted: #4a4a4a;
  --text-dark-dim: #888888;
  --shadow-light: 0 0.375rem 1.125rem rgba(0, 0, 0, 0.06);

  --radius-lg: 1.125rem;
  --radius-md: 0.875rem;
  /* Fully rounded ends; large rem avoids px while staying finite */
  --radius-pill: 50rem;
  --shadow-card: 0 1.125rem 2.5rem rgba(0, 0, 0, 0.35);
  --container: 77.5rem;
  --gutter: 2rem;
}

@media (max-width: 720px) {
  :root {
    --header-height: 3.5rem;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.625rem;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-0.0625rem);
}

.btn-primary {
  background: var(--accent);
  color: #111;
  box-shadow: 0 0.5rem 1.375rem rgba(249, 225, 76, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-dark {
  background: var(--dark-btn);
  color: #fff;
}

.btn-dark:hover {
  background: var(--dark-btn-hover);
}

.btn-sm {
  padding: 0.75rem 1.375rem;
  font-size: 0.75rem;
}

.btn-hero {
  padding-left: 3rem;
  padding-right: 3rem;
  min-width: 250px;
  justify-content: center;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 1rem var(--gutter);
  background: rgba(14, 14, 14, 0.8);
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease, padding 0.3s ease;
  width: 100%;
}

.site-header-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  gap: 2rem;
  position: relative;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3125rem;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.nav-toggle-bar {
  display: block;
  width: 1.125rem;
  height: 0.125rem;
  border-radius: 0.0625rem;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(0.4375rem) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-0.4375rem) rotate(-45deg);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.logo-icon {
  width: 1.625rem;
  height: auto;
}

.logo-text {
  font-size: 0.875rem;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  gap: 0.125rem;
}

.logo-text-secondary {
  font-weight: 800;
  letter-spacing: 0.18em;
}

.main-nav {
  display: flex;
  gap: 2.25rem;
  margin-left: 1.5rem;
  flex: 1;
}

.main-nav a {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  transition: color .2s ease, opacity .2s ease;
}

.main-nav a:hover {
  color: var(--accent);
  opacity: 1;
}

.nav-author-link {
  font-style: italic;
  text-transform: uppercase !important;
}

.auth {
  display: flex;
  align-items: center;
  gap: 1.375rem;
}

.login-link {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.login-link:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  margin-top: calc(-1 * var(--header-height));
  padding: 7.5rem var(--gutter) 7.5rem;
  /* Layers (top → bottom): left-to-right scrim so the text column stays readable,
     then the photo (Kasbah of the Udayas, Rabat: cover gallery of the
     rabat_marine quest, images.id = 978). */
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.15) 100%),
    url('hero-morocco.jpg');
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.15) 100%),
    image-set(
      url('hero-morocco.webp') type('image/webp'),
      url('hero-morocco.jpg') type('image/jpeg')
    );
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-color: #1d1d1d; /* fallback while photo is loading */
  overflow: hidden;
}


.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 16rem;
  gap: 2.5rem;
  align-items: start;
  min-height: 60vh;
}

.hero-content {
  max-width: 38.75rem;
  padding-top: 2.5rem;
}

.hero-title {
  font-size: clamp(2.375rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 
    0 0.125rem 0.375rem rgba(0, 0, 0, 0.8),
    0 0 1.5rem rgba(0, 0, 0, 0.6),
    0 0 3rem rgba(0, 0, 0, 0.4);
}

.hero-lead {
  margin-top: 1.375rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: #fff;
  max-width: 32.5rem;
  font-weight: 600;
  text-shadow:
    0 0.0625rem 0.25rem rgba(0, 0, 0, 0.9),
    0 0 1.25rem rgba(0, 0, 0, 0.7);
}

/* "загадками" jumps to the "what is a quest-tour" section (the sample riddle) */
.hero-lead-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.125rem;
  text-underline-offset: 0.2em;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hero-lead-link:hover,
.hero-lead-link:focus-visible {
  color: var(--accent);
}

.cta-buttons {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* ---------- Live Progress Map ---------- */

.progress-map {
  margin-top: 2.5rem;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(0.625rem);
  backdrop-filter: blur(0.625rem);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  color: #fff;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 16rem;
  justify-self: end;
}

.progress-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-map-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.92);
}

.progress-map-dots {
  color: var(--accent);
  font-size: 0.875rem;
}

.map-mock {
  position: relative;
  height: 17rem;
  border-radius: 0.625rem;
  overflow: hidden;
  background: url('cover-rabat_marine.jpg') center / cover no-repeat; /* fallback */
  background: image-set(
      url('cover-rabat_marine.webp') type('image/webp'),
      url('cover-rabat_marine.jpg') type('image/jpeg')
    ) center / cover no-repeat;
}

.map-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.map-pin > i {
  color: var(--accent);
  font-size: 1.125rem;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.6));
}

.map-pin-label {
  background: #fff;
  color: #111;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.4);
}

.map-pin--1 { top: 16.32%; left: 36.67%; }
.map-pin--2 { top: 81.58%; left: 9.70%; }
.map-pin--3 { top: 63.36%; left: 52.26%; }

.progress-map-foot {
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.progress-map-label {
  font-size: 0.6875rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.progress-map-quest {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.progress-map-percent {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ---------- Feature cards ---------- */

.feature-cards {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 3.75rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
}

.card {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(0.625rem);
  backdrop-filter: blur(0.625rem);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.375rem 1.5rem 1.5rem;
  color: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, border-color .25s ease;
}

.card:hover {
  transform: translateY(-0.1875rem);
  border-color: rgba(249, 225, 76, 0.35);
}

.card-icons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.card-icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  font-size: 1.125rem;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}

.card-text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* =============================================================
   Light content section (after the dark hero)
   ============================================================= */

.content-light {
  background: var(--bg-light);
  color: var(--text-dark);
  position: relative;
  z-index: 10;
}

.hero + .content-light,
.hero + main.content-light {
  /* −1px: плотнее к герою, без субпиксельной щели на части зумов */
  margin-top: calc(-3.75rem - 1px);
}

.content-light::before {
  content: "";
  position: absolute;
  /* +1px вверх / +2px к высоте: перекрытие клипа и фона при дробном DPR */
  top: calc(-0.8125rem - 1px);
  left: 0;
  width: 100%;
  height: calc(0.8125rem + 2px);
  transform: translateZ(0);
  background-color: var(--bg-light);
  /* Высота 0.8125rem (10 * 1.3), частота в 2 раза меньше (шаг 2.5%) */
  clip-path: polygon(
    0% 100%, 0% 0%, 1.25% 100%, 2.5% 0%, 3.75% 100%, 5% 0%, 6.25% 100%, 7.5% 0%, 8.75% 100%, 10% 0%, 
    11.25% 100%, 12.5% 0%, 13.75% 100%, 15% 0%, 16.25% 100%, 17.5% 0%, 18.75% 100%, 20% 0%, 
    21.25% 100%, 22.5% 0%, 23.75% 100%, 25% 0%, 26.25% 100%, 27.5% 0%, 28.75% 100%, 30% 0%, 
    31.25% 100%, 32.5% 0%, 33.75% 100%, 35% 0%, 36.25% 100%, 37.5% 0%, 38.75% 100%, 40% 0%, 
    41.25% 100%, 42.5% 0%, 43.75% 100%, 45% 0%, 46.25% 100%, 47.5% 0%, 48.75% 100%, 50% 0%, 
    51.25% 100%, 52.5% 0%, 53.75% 100%, 55% 0%, 56.25% 100%, 57.5% 0%, 58.75% 100%, 60% 0%, 
    61.25% 100%, 62.5% 0%, 63.75% 100%, 65% 0%, 66.25% 100%, 67.5% 0%, 68.75% 100%, 70% 0%, 
    71.25% 100%, 72.5% 0%, 73.75% 100%, 75% 0%, 76.25% 100%, 77.5% 0%, 78.75% 100%, 80% 0%, 
    81.25% 100%, 82.5% 0%, 83.75% 100%, 85% 0%, 86.25% 100%, 87.5% 0%, 88.75% 100%, 90% 0%, 
    91.25% 100%, 92.5% 0%, 93.75% 100%, 95% 0%, 96.25% 100%, 97.5% 0%, 98.75% 100%, 100% 0%, 
    100% 100%
  );
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Shared section heading */

.section-title {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dark);
  line-height: 1.05;
}

.section-title--accent {
  color: var(--text-dark);
}

.section-title .accent-word,
.accent-word {
  color: var(--text-dark);
}

.section-heading-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.section-rule {
  flex: 1;
  height: 0.0625rem;
  background: var(--text-dark);
  opacity: 0.85;
}

/* ---------- The Quest Experience ---------- */

.quest-experience {
  padding: 5.625rem 0 4.375rem;
  /* keep the heading clear of the fixed header when scrolled to via #experience */
  scroll-margin-top: 4.5rem;
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3.75rem;
  align-items: center;
}

.experience-text .section-title {
  margin-bottom: 1.125rem;
}

.experience-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark-muted);
  max-width: 35rem;
}

.inline-icon {
  color: var(--text-dark);
  font-size: 0.875rem;
  margin: 0 0.125rem;
  vertical-align: -0.0625rem;
}

/* Term with an explanatory tooltip (hover on desktop, tap/focus on mobile) */
.term-tip {
  position: relative;
  display: inline-block;
  padding: 0 0.15em;
  border: 0.09375rem solid var(--accent);
  border-radius: 0.375rem;
  /* font-weight: 700; */
  color: var(--text-dark);
  cursor: help;
  outline: none;
  white-space: nowrap;
}

.term-tip__bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.625rem);
  transform: translateX(-50%) translateY(0.25rem);
  z-index: 20;
  width: max-content;
  max-width: 16rem;
  padding: 0.625rem 0.75rem;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* little arrow pointing down to the term */
.term-tip__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 0.375rem solid transparent;
  border-top-color: #1a1a1a;
}

.term-tip:hover .term-tip__bubble,
.term-tip:focus .term-tip__bubble,
.term-tip:focus-visible .term-tip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Riddle stack: two cards, one peeking behind the front one */

.riddle-stack {
  position: relative;
  justify-self: start;
  width: 100%;
  max-width: 26.25rem;
  height: 12.5rem;
}

.riddle-card {
  position: absolute;
  inset: 0;
  background: #1a1a1a;
  border: 0.09375rem solid #333;
  border-radius: 0.875rem;
  padding: 1.375rem 1.5rem;
  box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.18);
}

.riddle-card--front {
  transform: rotate(-3deg);
  z-index: 2;
  display: flex;
  align-items: center;
}

.riddle-card--back {
  transform: rotate(6deg) translate(1.75rem, 0.875rem);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.riddle-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #ffffff;
  margin: 0;
}

.riddle-label {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.riddle-key {
  color: var(--accent);
  font-size: 3.5rem;
  transform: rotate(35deg);
  filter: drop-shadow(0 0.25rem 0.5rem rgba(0, 0, 0, 0.4));
}

.riddle-card-tag {
  position: absolute;
  right: 0.625rem;
  bottom: 0.875rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ---------- How It Works ---------- */

.how-it-works {
  padding: 3.125rem 0 5.625rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.step-card {
  background: var(--card-light-bg);
  border: 1px solid var(--card-light-border);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem 1.625rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.375rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow: var(--shadow-light);
}

.step-card:hover {
  transform: translateY(-0.1875rem);
  border-color: var(--accent);
  box-shadow: 0 0.625rem 1.5rem rgba(0, 0, 0, 0.08);
}

.step-icon {
  font-size: 1.875rem;
  color: var(--text-dark);
  opacity: 0.85;
}

.step-title {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
}

.steps-progress {
  position: relative;
  height: 0.0625rem;
  background: var(--text-dark);
  opacity: 0.85;
  margin: 0 8%;
}

.steps-progress-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.875rem;
  height: 0.875rem;
  background: var(--text-dark);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.05);
}

/* ---------- Popular Quests ---------- */

.inside-quest {
  position: relative;
  padding: 1.875rem 0 3.125rem;
}

.inside-quest .section-title {
  margin-bottom: 2.25rem;
  text-align: center;
}

.popular-quests-query .wp-block-post-template,
.quests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 0;
  list-style: none;
}

.popular-quests-query .wp-block-post {
  margin: 0;
  display: flex;
}

.quest-item {
  background: var(--card-light-bg);
  border: 1px solid var(--card-light-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.quest-item:hover {
  transform: translateY(-0.3125rem);
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.1);
}

.quest-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: #b8b8b8;
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
}

.quest-img a,
.quest-img img {
  display: block;
  width: 100%;
  height: 100%;
}

.quest-img img {
  object-fit: cover;
}

/* WooCommerce / Tours page consistency */
.wc-block-components-product-image,
.wp-block-woocommerce-product-image {
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.wc-block-product {
  padding: 0 !important;
  border: 1px solid var(--card-light-border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--card-light-bg) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.wc-block-components-product-image > a,
.wp-block-woocommerce-product-image > a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wc-block-components-product-image img,
.wp-block-woocommerce-product-image img,
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img,
.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Local-preview cards: first cover of each quest's editor gallery (same rule as the image sync). */
.quest-img--1 { background-image: url('cover-casablanca.jpg'); background-image: image-set(url('cover-casablanca.webp') type('image/webp'), url('cover-casablanca.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.quest-img--2 { background-image: url('cover-rabat_marine.jpg'); background-image: image-set(url('cover-rabat_marine.webp') type('image/webp'), url('cover-rabat_marine.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.quest-img--3 { background-image: url('cover-fes.jpg'); background-image: image-set(url('cover-fes.webp') type('image/webp'), url('cover-fes.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.quest-img--4 { background-image: url('cover-essaouira.jpg'); background-image: image-set(url('cover-essaouira.webp') type('image/webp'), url('cover-essaouira.jpg') type('image/jpeg')); background-size: cover; background-position: center; }

.quest-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--accent);
  color: #111;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  letter-spacing: 0.05em;
}

.quest-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.quest-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.625rem;
  color: var(--text-dark);
}

.quest-name a {
  color: inherit;
}

.quest-name a:hover {
  opacity: 0.8;
}

.quest-desc {
  font-size: 0.875rem;
  color: var(--text-dark-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

/* Product cards: the excerpt printed whole by explorecity-product-page.php
   (paragraphs + bold labels + "Начало / Конец"), left-aligned like a text. */
.ec-card-excerpt {
  text-align: left;
}

.ec-card-excerpt p + p {
  margin-top: 0.5rem;
}

.ec-card-excerpt strong {
  color: var(--text-dark);
  font-weight: 700;
}

.quest-desc p,
.quest-desc .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.quest-body .wp-block-woocommerce-product-price,
.quest-body .quest-price {
  text-align: left !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  color: var(--text-dark) !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}

.quest-body .wp-block-woocommerce-product-price .wc-block-components-product-price {
  font-size: inherit !important;
  font-weight: inherit !important;
}

.quest-body .wp-block-read-more {
  width: fit-content;
  margin-top: auto;
}

.quest-actions {
  display: block;
  margin-top: auto;
}

.quest-actions .product-card-buttons {
  margin-top: 0;
}

.quest-actions .btn,
.quest-actions .wp-block-woocommerce-product-button .wp-block-button__link,
.quest-actions .wc-block-components-product-button__button {
  width: 100% !important;
  justify-content: center !important;
  padding: 0.75rem 0.25rem !important;
  font-size: 0.75rem !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.quest-actions .wp-block-woocommerce-product-button {
  margin: 0 !important;
}

.quest-actions .wc-block-components-product-button__button {
  background: var(--accent) !important;
  color: #111 !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 0.5rem 1.375rem rgba(249, 225, 76, 0.25) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}

/* Styles for buttons in a row on the tours page */
.wp-block-post-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--container) !important;
  width: 100%;
}

.entry-content.has-global-padding {
  padding-left: var(--gutter) !important;
  padding-right: var(--gutter) !important;
}

body.page-id-66 .entry-content {
  padding-bottom: 6rem !important;
}

/* Tours page (page-id-66) H1 — real heading, styled to match the site font and
   cleared from under the fixed header. (Replaces the old hidden-<p> + ::before hack.) */
body.page-id-66 .entry-content > h1.wp-block-heading:first-child {
  width: 100%;
  max-width: var(--container) !important;
  margin: 0 auto 2.25rem !important;
  padding-top: clamp(0.5rem, 2vw, 1.25rem);
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
  font-size: clamp(1.625rem, 3vw, 2.25rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
  color: var(--text-dark);
}

/* Mobile: clear the fixed header and allow wrapping. */
@media (max-width: 768px) {
  body.page-id-66 .entry-content > h1.wp-block-heading:first-child {
    padding-top: 4.5rem !important;
    font-size: clamp(1.375rem, 6.2vw, 1.875rem) !important;
  }
}

/* Remove large top gap on pages without hero */
body:not(.home) .wp-site-blocks {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body:not(.home) .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body:not(.home) .wp-block-spacer {
  display: none !important;
}

body:not(.home) main.wp-block-group {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.wc-block-product {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  padding: 0 !important;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-light-border);
  box-shadow: var(--shadow-light);
  height: 100%;
  overflow: hidden;
}

.wc-block-product > :not(.wp-block-woocommerce-product-image) {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.wc-block-product,
.wc-block-product * {
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
}

.wc-block-product .wp-block-post-title {
  padding-top: 1.5rem !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-align: left !important;
  color: var(--text-dark) !important;
}

.wc-block-product .wp-block-post-title a {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.wc-block-product .wp-block-post-excerpt,
.wc-block-product .wp-block-woocommerce-product-price {
  text-align: left !important;
}

.wc-block-product .wp-block-woocommerce-product-button {
  padding-bottom: 1.5rem !important;
}

.wc-block-product .wp-block-post-excerpt {
  flex: 1 1 auto;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  color: var(--text-dark-muted) !important;
  margin-bottom: 1.25rem !important;
}

.wc-block-product .wp-block-woocommerce-product-price {
  flex: 0 0 auto;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  color: var(--text-dark) !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}

.wc-block-product .wp-block-read-more,
.wc-block-product .wp-block-woocommerce-product-button {
  margin-top: 0 !important;
}

.wc-block-product .wp-block-woocommerce-product-button {
  flex: 0 0 auto;
}

.product-card-buttons {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0;
  width: 100%;
}

.product-card-buttons > * {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}

.product-card-buttons .wp-block-button {
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.product-card-buttons .btn-details,
.product-card-buttons .wp-block-woocommerce-product-button a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 3rem !important;
  min-height: 0;
  max-width: none !important;
  width: 100% !important;
  padding: 0.75rem 0.25rem !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.06em !important;
  border-radius: var(--radius-pill) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-details {
  background: var(--dark-btn) !important;
  color: #fff !important;
}

.btn-details:hover {
  background: var(--dark-btn-hover) !important;
}

.product-card-buttons .wc-block-components-product-button__button {
  background: var(--accent) !important;
  color: #111 !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 0.5rem 1.375rem rgba(249, 225, 76, 0.25) !important;
  font-family: inherit !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}

.product-card-buttons .wc-block-components-product-button__button:hover {
  background: var(--accent-hover) !important;
}

/* ---------- Single product pages ---------- */

body.page-id-66,
body.single-product {
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
  color: var(--text-dark);
  background:
    radial-gradient(circle at top left, rgba(249, 225, 76, 0.22), transparent 28rem),
    var(--bg-light);
  --single-product-first-row-height: min(38rem, max(22rem, calc(100svh - var(--header-height) - 7.5rem)));
  --single-product-thumbs-height: 4.75rem;
  --single-product-gallery-gap: 0.75rem;
}

body.single-product .wp-site-blocks > .wp-block-group.woocommerce.product {
  padding: 2rem var(--gutter) 4.5rem;
}

body.single-product main.wp-block-group {
  max-width: var(--container) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.single-product .woocommerce-breadcrumb {
  margin: 0 0 1rem !important;
  color: var(--text-dark-dim);
  font-size: 0.8125rem;
  font-weight: 700;
}

body.single-product .woocommerce-breadcrumb a {
  color: var(--text-dark-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

body.single-product .woocommerce-breadcrumb a::before {
  content: "\f060";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
}

body.single-product .wp-block-columns.alignwide {
  align-items: stretch !important;
  gap: 1.5rem !important;
  max-width: var(--container) !important;
  margin: 0 auto 1.5rem !important;
  /* The row is at least one screen tall; a longer summary card makes it grow
     (the gallery column stretches with it) instead of scrolling inside. */
  min-height: var(--single-product-first-row-height);
}

body.single-product .wp-block-column {
  min-width: 0;
}

body.single-product .wp-block-woocommerce-product-image-gallery,
body.single-product .wp-block-columns.alignwide > .wp-block-column:last-child,
body.single-product .wp-block-woocommerce-product-details,
body.single-product .related.products {
  background: var(--card-light-bg);
  border: 1px solid var(--card-light-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
}

body.single-product .wp-block-woocommerce-product-image-gallery {
  height: 100%;
  padding: 1rem;
  overflow: hidden;
}

body.single-product .woocommerce-product-gallery,
body.single-product .woocommerce-product-gallery__wrapper {
  height: 100%;
}

body.single-product .woocommerce-product-gallery {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--single-product-gallery-gap);
}

body.single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__image:not(:first-child) {
  display: none;
}

body.single-product .woocommerce-product-gallery .flex-viewport {
  flex: 1 1 auto;
  height: calc(100% - var(--single-product-thumbs-height) - var(--single-product-gallery-gap)) !important;
  min-height: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 0.35rem);
  background: var(--bg-light-soft);
}

body.single-product .woocommerce-product-gallery__wrapper,
body.single-product .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__image a {
  height: 100% !important;
}

body.single-product .woocommerce-product-gallery__image {
  margin: 0 !important;
  min-height: 100% !important;
}

body.single-product .woocommerce-product-gallery__image a {
  display: block;
  min-height: 100% !important;
  cursor: zoom-in;
}

body.single-product .woocommerce-product-gallery__image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  border-radius: calc(var(--radius-lg) - 0.35rem);
  object-fit: cover !important;
}

body.single-product .woocommerce-product-gallery .zoomImg {
  display: none !important;
}

body.single-product .woocommerce-product-gallery__trigger {
  display: none !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr));
  gap: 0.5rem;
  flex: 0 0 var(--single-product-thumbs-height);
  height: var(--single-product-thumbs-height);
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs::before,
body.single-product .woocommerce-product-gallery .flex-control-thumbs::after {
  display: none;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  width: auto !important;
  margin: 0 !important;
  list-style: none;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs img {
  width: 100%;
  height: 100%;
  border-radius: 0.65rem;
  object-fit: cover;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
body.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover {
  opacity: 1;
  transform: translateY(-0.0625rem);
}

body.single-product .woocommerce-product-gallery .flex-direction-nav,
body.single-product .woocommerce-product-gallery .product-gallery-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single-product .woocommerce-product-gallery .flex-direction-nav a,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button {
  position: absolute;
  top: calc(50% - (var(--single-product-thumbs-height) / 2));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  border: 0;
  background: rgba(255, 255, 255, 0.88);
  color: transparent;
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow-light);
  transform: translateY(-50%);
}

body.single-product .woocommerce-product-gallery .flex-direction-nav a::before,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button::before {
  color: var(--text-dark);
  font-family: "Font Awesome 6 Free";
  font-size: 0.9rem;
  font-weight: 900;
}

body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-prev,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button--prev {
  left: 1.75rem;
}

body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button--next {
  right: 1.75rem;
}

body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-prev::before,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button--prev::before {
  content: "\f053";
}

body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next::before,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button--next::before {
  content: "\f054";
}

body.single-product .woocommerce-product-gallery .flex-direction-nav .flex-disabled,
body.single-product .woocommerce-product-gallery .product-gallery-nav__button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

body.single-product .woocommerce-product-gallery .flex-direction-nav {
  display: none !important;
}

body.single-product .wp-block-columns.alignwide > .wp-block-column:last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

body.single-product .wp-block-post-title {
  max-width: 42rem;
  color: var(--text-dark);
  font-family: inherit !important;
  font-size: clamp(1.25rem, 4.2vw, 2.75rem) !important;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}

body.single-product .wp-block-woocommerce-product-price {
  margin: 0 !important;
  color: var(--text-dark) !important;
  font-family: inherit !important;
  font-size: 1.45rem !important;
  font-weight: 800;
}

body.single-product .wp-block-post-excerpt {
  display: block;
  margin: 0;
  color: var(--text-dark-muted);
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  line-clamp: unset;
  -webkit-line-clamp: unset;
}

body.single-product .wp-block-post-excerpt__excerpt,
body.single-product .ec-pp__excerpt p {
  margin: 0;
}

body.single-product .ec-pp__excerpt p + p {
  margin-top: 0.6rem;
}

body.single-product .ec-pp__excerpt strong {
  color: var(--text-dark);
  font-weight: 800;
}

body.single-product .wp-block-add-to-cart-form,
body.single-product .wc-block-add-to-cart-form {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
}

body.single-product form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product .quantity {
  display: none !important;
}

body.single-product .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(14rem, 100%);
  height: 2.75rem !important;
  min-height: 0;
  padding: 0.5rem 1.5rem !important;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--accent) !important;
  color: #111 !important;
  font-family: inherit !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  line-height: 1 !important;
  margin: 0 !important;
  text-transform: uppercase;
  box-shadow: 0 0.5rem 1.375rem rgba(249, 225, 76, 0.25);
}

body.single-product .single_add_to_cart_button:hover {
  background: var(--accent-hover) !important;
}

body.single-product .wp-block-woocommerce-product-meta {
  display: none;
}

body.single-product .wp-block-woocommerce-product-details {
  max-width: 52rem !important;
  margin: 1.5rem auto 0 !important;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

body.single-product .woocommerce-tabs .tabs {
  display: none;
}

body.single-product .woocommerce-Tabs-panel {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product .woocommerce-Tabs-panel > * + * {
  margin-top: 1rem;
}

body.single-product .woocommerce-Tabs-panel h2,
body.single-product .woocommerce-Tabs-panel h3 {
  color: var(--text-dark);
  font-family: inherit !important;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.single-product .woocommerce-Tabs-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

body.single-product .woocommerce-Tabs-panel h3 {
  margin-top: 1.75rem;
  font-size: 1.35rem;
}

body.single-product .woocommerce-Tabs-panel p,
body.single-product .woocommerce-Tabs-panel li {
  color: var(--text-dark-muted);
  font-size: 1rem;
  line-height: 1.75;
}

body.single-product .woocommerce-Tabs-panel ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

body.single-product .woocommerce-Tabs-panel strong {
  color: var(--text-dark);
  font-weight: 800;
}

/* --- EC Product Specs & Reassurance --- */

.ec-specs {
  margin: 0 !important;
  padding: 0.35rem 0 0.25rem;
  border-top: 1px solid var(--border-light);
}

body.single-product .wp-block-post-excerpt {
  margin-block-end: 0.5rem !important;
}

body.single-product .wp-block-post-excerpt + .ec-specs {
  margin-block-start: 0 !important;
}

.ec-specs__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--text-dark);
  text-transform: none;
  letter-spacing: normal;
}

.ec-specs__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.ec-specs__row {
  display: flex !important;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-dark-muted);
  line-height: 1.2;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .ec-specs__list {
    gap: 0.5rem 1rem;
  }
}

.ec-specs__icon {
  width: 1.25rem;
  text-align: center;
  color: var(--text-dark-muted);
  font-size: 0.9rem;
}

/* Included / not included / start point under the product description
   (explorecity-quest-content-sync.php, filled from the quest editor). */
.ec-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem 2rem;
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.ec-lists__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--text-dark);
  text-transform: none;
  letter-spacing: normal;
}

.ec-lists__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid;
  gap: 0.45rem;
}

.ec-lists__row,
.ec-start__row {
  display: flex !important;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-dark-muted);
  line-height: 1.35;
  margin: 0;
}

.ec-lists__icon {
  width: 1.25rem;
  flex: 0 0 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.15em;
  color: var(--text-dark-muted);
}

.ec-lists__col--yes .ec-lists__icon {
  color: #1f9d8a;
}

.ec-start {
  margin: 1.25rem 0 0;
}

.ec-buy-reassurance {
  background: #e6f7f5;
  color: #0a7a73;
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  line-height: 1.3;
  margin: 0;
}

.ec-buy-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

body.single-product .ec-buy-row {
  margin-top: 0 !important;
}

.ec-buy-row .ec-buy-reassurance {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 480px) {
  .ec-buy-row {
    gap: 0.6rem;
  }
  .ec-buy-row .ec-buy-reassurance {
    font-size: 0.75rem;
    padding: 0.45rem 0.6rem;
  }
}

body.single-product .wp-block-add-to-cart-form,
body.single-product .wc-block-add-to-cart-form {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
  flex: 0 0 auto;
}

.ec-buy-reassurance i {
  font-size: 1rem;
}

/* Checkout compact version */
.woocommerce-checkout .ec-specs {
  border-top: 1px solid #eee;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.woocommerce-checkout .ec-specs__title {
  display: none;
}

.woocommerce-checkout .ec-specs__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.woocommerce-checkout .ec-specs__row {
  font-size: 0.85rem;
}

.woocommerce-checkout .ec-specs__icon {
  width: 1rem;
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .ec-specs__row {
    font-size: 0.9rem;
  }
}

body.single-product .woocommerce-Reviews,
body.single-product #reviews,
body.single-product #review_form_wrapper {
  display: none !important;
}

body.single-product .related.products {
  max-width: var(--container);
  margin: 1.5rem auto 0;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

body.single-product .related.products > h2 {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-family: inherit !important;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.single-product .related.products ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product .related.products ul.products::before,
body.single-product .related.products ul.products::after {
  display: none;
}

body.single-product .related.products li.product {
  width: auto !important;
  margin: 0 !important;
}

body.single-product .related.products li.product .woocommerce-loop-product__title,
body.single-product .related.products li.product h2,
body.single-product .related.products li.product h3,
body.single-product .related.products li.product .wp-block-post-title {
  font-size: 1.125rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.5rem !important;
}

body.single-product .related.products li.product .price,
body.single-product .related.products li.product .wp-block-woocommerce-product-price {
  font-size: 1rem !important;
  font-weight: 700 !important;
}

body.single-product .related.products li.product .button {
  padding: 0.5rem 1rem !important;
  font-size: 0.75rem !important;
  min-height: auto !important;
}

body.single-product [data-collection="woocommerce/product-collection/related"] .wp-block-post-title {
  font-size: 1.125rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
}

body.single-product [data-collection="woocommerce/product-collection/related"] .wp-block-woocommerce-product-price {
  font-size: 1rem !important;
  font-weight: 700 !important;
}

body.single-product [data-collection="woocommerce/product-collection/related"] .wp-block-button__link,
body.single-product [data-collection="woocommerce/product-collection/related"] .wc-block-components-product-button__button {
  padding: 0.5rem 1rem !important;
  font-size: 0.75rem !important;
  min-height: auto !important;
}

@media (max-width: 900px) {
  body.single-product {
    --single-product-first-row-height: auto;
    --single-product-thumbs-height: 4rem;
  }

  /* Title above the gallery card; the real h1 stays for screen readers only */
  body.single-product .ec-title-mobile {
    display: block;
    margin: 0 0 1rem;
    color: var(--text-dark);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  body.single-product .wp-block-columns.alignwide .wp-block-post-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  body.single-product .wp-block-columns.alignwide {
    flex-direction: column;
    height: auto;
  }

  body.single-product .wp-block-columns.alignwide > .wp-block-column {
    flex-basis: auto !important;
  }

  body.single-product .wp-block-woocommerce-product-image-gallery {
    height: min(32rem, calc(100svh - var(--header-height) - 4rem));
  }

  body.single-product .related.products ul.products {
    grid-template-columns: 1fr;
  }
}

.quests-footer {
  text-align: center;
}

.quests-empty {
  text-align: center;
  color: var(--text-dark-muted);
}

.decor-sparkle {
  position: absolute;
  right: 0.625rem;
  bottom: 1.75rem;
  color: #c9c9c9;
  font-size: 0.875rem;
  transform: rotate(45deg);
}

body.single-product .related.products,
body.single-product .up-sells.products,
body.single-product [data-collection="woocommerce/product-collection/related"] {
  display: none !important;
}

.back-to-tours-container {
  max-width: var(--container);
  margin: 2rem auto 0;
  text-align: center;
}

.back-to-tours-container .btn {
  min-width: 280px;
}

/* ---------- FAQ ---------- */

.faq {
  padding: 3.125rem 0 6.25rem;
  background: var(--bg-light);
}

.faq .section-title {
  margin-bottom: 3.125rem;
  text-align: center;
}

.faq-grid {
  max-width: 50rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Уменьшил расстояние между вопросами */
}

.faq-item {
  background: var(--card-light-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-light-border);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

.faq-question {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  padding: 1.25rem 1.875rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 1.875rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
  transform: translateY(-50%) rotate(180deg);
}

.faq-question:hover {
  background-color: rgba(0,0,0,0.02);
}

.faq-answer {
  padding: 0 1.875rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-dark-muted);
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding: 3.25rem var(--gutter) 2.25rem;
  background: var(--bg-dark);
  color: #fff;
  text-align: center;
  margin-top: 0;
}

.footer-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
}

.footer-left {
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.footer-left p {
  margin: 0;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-logo-img {
  width: 2rem;
  height: auto;
}

.footer-tagline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.75rem;
  }
  .footer-left, .footer-right {
    text-align: center;
  }
  .footer-right {
    align-items: center;
  }
}

.site-footer::before {
  content: "";
  position: absolute;
  top: calc(-0.0625rem - 1px);
  left: 0;
  width: 100%;
  height: calc(0.8125rem + 2px);
  transform: translateZ(0);
  background-color: var(--bg-light);
  /* Инвертированный полигон: зубцы теперь смотрят ВНИЗ на картинку */
  clip-path: polygon(
    0% 0%, 0% 100%, 1.25% 0%, 2.5% 100%, 3.75% 0%, 5% 100%, 6.25% 0%, 7.5% 100%, 8.75% 0%, 10% 100%, 
    11.25% 0%, 12.5% 100%, 13.75% 0%, 15% 100%, 16.25% 0%, 17.5% 100%, 18.75% 0%, 20% 100%, 
    21.25% 0%, 22.5% 100%, 23.75% 0%, 25% 100%, 26.25% 0%, 27.5% 100%, 28.75% 0%, 30% 100%, 
    31.25% 0%, 32.5% 100%, 33.75% 0%, 35% 100%, 36.25% 0%, 37.5% 100%, 38.75% 0%, 40% 100%, 
    41.25% 0%, 42.5% 100%, 43.75% 0%, 45% 100%, 46.25% 0%, 47.5% 100%, 48.75% 0%, 50% 100%, 
    51.25% 0%, 52.5% 100%, 53.75% 0%, 55% 100%, 56.25% 0%, 57.5% 100%, 58.75% 0%, 60% 100%, 
    61.25% 0%, 62.5% 100%, 63.75% 0%, 65% 100%, 66.25% 0%, 67.5% 100%, 68.75% 0%, 70% 100%, 
    71.25% 0%, 72.5% 100%, 73.75% 0%, 75% 100%, 76.25% 0%, 77.5% 100%, 78.75% 0%, 80% 100%, 
    81.25% 0%, 82.5% 100%, 83.75% 0%, 85% 100%, 86.25% 0%, 87.5% 100%, 88.75% 0%, 90% 100%, 
    91.25% 0%, 92.5% 100%, 93.75% 0%, 95% 100%, 96.25% 0%, 97.5% 100%, 98.75% 0%, 100% 100%, 
    100% 0%
  );
}

/* =============================================================
   Responsive
   ============================================================= */

/* Tablet: progress map drops below the hero text, cards 2-up */
@media (max-width: 1024px) {
  .hero {
    padding: 6.875rem var(--gutter) 6.25rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .progress-map {
    margin-top: 0.5rem;
    justify-self: start;
    max-width: 18rem;
  }

  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2.5rem;
  }

  .main-nav {
    gap: 1.375rem;
    margin-left: 0.75rem;
  }

  .main-nav a {
    font-size: 0.6875rem;
  }

  /* Light section tablet adjustments */
  .experience-grid {
    grid-template-columns: 1fr;
    gap: 3.125rem;
  }

  /* on mobile keep the intro first, the sample task below it */
  .experience-text {
    order: -1;
  }

  .riddle-stack {
    justify-self: start;
    max-width: 28.75rem;
  }

  .quest-experience {
    padding: 4.375rem 0 3.75rem;
  }

  .how-it-works {
    padding: 2.5rem 0 4.375rem;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
  }
}

  @media (max-width: 1024px) {
    /* ul.quests-grid... raises specificity to beat the base 3-col rule on the
       live WooCommerce grid; .quests-grid alone keeps the local preview working. */
    ul.quests-grid.wp-block-post-template,
    .quests-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* On phones the popular quests become a swipe slider (peek of the next card),
     not a single stacked column. No autoplay — plain horizontal scroll-snap. */
  @media (max-width: 720px) {
    ul.quests-grid.wp-block-post-template,
    .quests-grid {
      display: flex;
      grid-template-columns: none;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      gap: 1rem;
      margin: 0 calc(-1 * var(--gutter)) 2rem;
      padding: 0.25rem var(--gutter) 1rem;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    ul.quests-grid.wp-block-post-template::-webkit-scrollbar,
    .quests-grid::-webkit-scrollbar {
      display: none;
    }
    ul.quests-grid.wp-block-post-template > .wp-block-post,
    .quests-grid > * {
      flex: 0 0 80%;
      scroll-snap-align: center;
    }
  }

  /* Tours/shop (WooCommerce Blocks product grid): single column on mobile with a
     clamped description, so each card stays compact instead of a tall wall of text. */
  @media (max-width: 768px) {
    .wc-block-product-template.columns-3.wc-block-product-template__responsive {
      grid-template-columns: 1fr !important;
    }
    .wc-block-product-template .wp-block-post-excerpt__excerpt {
      display: -webkit-box;
      -webkit-line-clamp: 3;
      line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  }

  /* Mobile */
  @media (max-width: 720px) {
  :root {
    --gutter: 1.25rem;
  }

  .site-header {
    padding: 0.75rem var(--gutter);
    gap: 0.75rem;
  }

  .site-header-container {
    gap: 0.75rem;
    flex-wrap: nowrap;
    align-items: center;
  }

  .site-header-container:has(.nav-toggle) .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .main-nav {
    display: none;
  }

  .site-header-container:has(.nav-toggle) .main-nav {
    display: flex;
    position: absolute;
    z-index: 1001;
    left: 0;
    right: 0;
    top: calc(100% + 0.375rem);
    margin-left: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(18, 18, 18, 0.97);
    -webkit-backdrop-filter: blur(0.75rem);
    backdrop-filter: blur(0.75rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
    transition:
      max-height 0.35s ease,
      opacity 0.22s ease,
      padding 0.22s ease,
      visibility 0s linear 0.35s;
  }

  .site-header.nav-open .site-header-container:has(.nav-toggle) .main-nav {
    max-height: min(70vh, 28rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0.375rem;
    gap: 0.125rem;
    transition:
      max-height 0.35s ease,
      opacity 0.22s ease,
      padding 0.22s ease,
      visibility 0s linear 0s;
  }

  .site-header-container:has(.nav-toggle) .main-nav a {
    padding: 0.8125rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
  }

  .site-header-container:has(.nav-toggle) .main-nav a:hover,
  .site-header-container:has(.nav-toggle) .main-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.07);
  }

  .auth {
    margin-left: auto;
    gap: 0.875rem;
  }

  .login-link {
    display: none;
  }

  body.nav-drawer-open {
    overflow: hidden;
  }

  .hero {
    padding: 6.25rem var(--gutter) 5rem;
  }

  .hero-content {
    padding-top: 0.5rem;
  }

  .hero-title {
    font-size: clamp(1.875rem, 8vw, 2.625rem);
  }

  .hero-lead br {
    display: none;
  }

  .cta-buttons {
    margin-top: 1.75rem;
  }

  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.75rem;
  }

  .feature-cards {
    grid-template-columns: 1fr;
    margin-top: 2rem;
    gap: 0.875rem;
  }

  .progress-map {
    max-width: 18rem;
  }

  .map-mock {
    height: 13rem;
  }

  /* Light section mobile adjustments */
  .quest-experience {
    padding: 3.75rem 0 3.125rem;
  }

  .how-it-works {
    padding: 1.875rem 0 3.75rem;
  }

  .inside-quest {
    padding: 1.25rem 0 4.375rem;
  }

  .riddle-stack {
    height: 13.75rem;
    max-width: 100%;
  }

  .riddle-card {
    padding: 1.125rem 1.25rem;
  }

  .riddle-text {
    font-size: 1rem;
  }

  .riddle-key {
    font-size: 2.75rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
  }

  .steps-progress {
    display: none;
  }

  .step-card {
    padding: 1.75rem 1.25rem 1.375rem;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 1rem;
  }

  .step-icon {
    font-size: 1.625rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .section-heading-row {
    margin-bottom: 1.5rem;
  }
}

/* My Promos Link & Modal */
.my-promos-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.my-promos-count {
  background: var(--accent-color, #0088cc);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  line-height: 1;
  min-width: 1.2rem;
  text-align: center;
}

.ec-promos-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
}

.ec-promos-modal--open {
  display: flex;
}

.ec-promos-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(4px);
}

.ec-promos-modal__dialog {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ecModalFadeIn 0.3s ease-out;
}

@keyframes ecModalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ec-promos-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #888;
  cursor: pointer;
  z-index: 1;
  padding: 0.5rem;
}

.ec-promos-modal__close:hover {
  color: #333;
}

.ec-promos-modal__title {
  padding: 1.5rem 2rem 1rem;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a2e;
  border-bottom: 1px solid #eee;
}

.ec-promos-modal__content {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  flex: 1;
}

.ec-promos-modal__footer {
  padding: 1rem 2rem;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

.ec-promos-modal__footer a {
  color: #0088cc;
  text-decoration: none;
  font-weight: 700;
}

.ec-promos-modal__entry {
  background: #f4f7fb;
  border: 1px solid #dde6f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.ec-promos-modal__entry:last-child {
  margin-bottom: 0;
}

.ec-promos-modal__entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ec-promos-modal__entry-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ec-promos-modal__delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.ec-promos-modal__delete-btn:hover {
  color: #ff4d4d;
}

.ec-promos-modal__entry-items {
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.ec-promos-modal__code-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ec-promos-modal__code-row:last-child {
  margin-bottom: 0;
}

.ec-promos-modal__code-value {
  flex: 1;
  background: #fff;
  border: 2px dashed #0088cc;
  border-radius: 8px;
  padding: 0.6rem;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0088cc;
  text-align: center;
  letter-spacing: 1px;
}

.ec-promos-modal__copy-btn {
  background: #0088cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  /* Fixed min-width so the label swap to "Скопировано!" does not resize it. */
  min-width: 10.5rem;
  text-align: center;
}

.ec-promos-modal__copy-btn:hover {
  background: #0077b3;
}

.ec-promos-modal__copy-btn--success {
  background: #28a745 !important;
}

.ec-promos-modal__open-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0088cc;
  color: #fff;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
}

.ec-promos-modal__open-btn:hover {
  background: #0077b3;
  color: #fff;
}

.ec-promos-modal__legacy-note {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.4;
}

.ec-promos-modal__empty {
  text-align: center;
  color: #888;
  padding: 2rem 0;
}

@media (max-width: 600px) {
  .ec-promos-modal__dialog {
    width: 95%;
    max-height: 90vh;
  }
  .ec-promos-modal__content {
    padding: 1rem;
  }
  .ec-promos-modal__title {
    padding: 1.25rem 1.5rem 0.75rem;
  }
  .ec-promos-modal__footer {
    padding: 0.85rem 1.25rem;
  }
  .ec-promos-modal__code-value {
    font-size: 1rem;
  }
}

/* ---------- Reviews carousel ---------- */

.reviews {
  padding: 3.125rem 0 4.375rem;
  background: var(--bg-light-soft);
}

.reviews-carousel {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.reviews-viewport {
  flex: 1;
  min-width: 0;
  /* clip horizontally (peek), but let an expanded card grow downward */
  overflow-x: clip;
  overflow-y: visible;
  padding: 0.75rem 0;
}

.reviews-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.reviews-slide {
  flex: 0 0 86%;
  min-width: 0;
  padding: 0 0.6rem;
  box-sizing: border-box;
}

@media (min-width: 40rem) { .reviews-slide { flex-basis: 56%; } }
@media (min-width: 64rem) { .reviews-slide { flex-basis: 42%; } }
@media (min-width: 85rem) { .reviews-slide { flex-basis: 33.33%; } }

.review-card {
  box-sizing: border-box;
  height: 20rem;
  background: var(--card-light-bg);
  border: 0.0625rem solid var(--card-light-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
  padding: 1.75rem 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: box-shadow 0.2s;
}

/* Expanded card grows in place; siblings stay put (track is top-aligned). */
.review-card.is-expanded {
  height: auto;
  box-shadow: var(--shadow-card);
}

.review-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.review-avatar {
  flex: 0 0 auto;
  width: 2.875rem;
  height: 2.875rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: hsl(var(--avatar-hue, 40), 45%, 52%);
}

.review-id { min-width: 0; }

.review-name {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text-dark);
}

.review-tour {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-dark-dim);
  margin-top: 0.125rem;
}

a.review-tour--link {
  text-decoration: none;
  transition: color 0.2s;
}

a.review-tour--link:hover {
  color: var(--text-dark);
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.review-stars {
  color: var(--accent);
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  line-height: 1;
}

/* Body clamps the text by hiding overflow; fade hints there is more. */
.review-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.review-card.is-expanded .review-body { overflow: visible; }

.review-text {
  margin: 0;
  font-size: 0.9875rem;
  line-height: 1.6;
  color: var(--text-dark-muted);
}

.review-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.75rem;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--card-light-bg));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.review-card.has-overflow:not(.is-expanded) .review-body::after { opacity: 1; }

.review-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 1.5rem;
}

.review-date {
  font-size: 0.8125rem;
  color: var(--text-dark-dim);
}

.review-more {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.review-more:hover {
  background: var(--accent);
  transform: translateY(0.0625rem);
}

.review-more i { transition: transform 0.25s ease; }
.review-card.is-expanded .review-more i { transform: rotate(180deg); }

.review-more[hidden] { display: none; }

.reviews-arrow {
  flex: 0 0 auto;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0.0625rem solid var(--card-light-border);
  background: var(--card-light-bg);
  color: var(--text-dark);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: var(--shadow-light);
  transition: background 0.2s, transform 0.2s;
}

.reviews-arrow:hover {
  background: var(--accent);
  transform: scale(1.06);
}

.reviews-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.reviews-dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.reviews-dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}

@media (max-width: 48rem) {
  .reviews-arrow { display: none; }
  .review-card { height: 22rem; padding: 1.5rem 1.4rem; }
}

/* Reviews section injected on single tour pages (explorecity-product-reviews.php).
   Sits inside the product layout, so it drops the full-bleed landing background
   and instead separates itself with a top rule and breathing room. */
.ec-product-reviews {
  clear: both;
  width: 100%;
  background: none;
  /* Bottom padding clears the carousel dots (bottom: -1.75rem) from
     whatever follows the section (e.g. the "back to list" button). */
  padding: 2.5rem 0 4rem;
  margin-top: 2.5rem;
  border-top: 0.0625rem solid var(--card-light-border);
  /* The product content area uses a serif font; re-establish the landing
     font so the heading matches the rest of the site. */
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.ec-product-reviews .section-title {
  font-family: inherit;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
}

.ec-product-reviews .section-heading-row {
  margin-bottom: 1.5rem;
}

/* =============================================================
   Hero demo phone: one real quest point in an iframe (site/demo)
   The iframe is laid out at the app's native 360px width and scaled
   down to the frame; --phone-scale = inner frame width / 360px.
   ============================================================= */
.hero-phone {
  --phone-w: 16rem;
  --phone-scale: 0.6667; /* (16rem - 2*0.5rem border) / 360px */
  position: relative;
  justify-self: end;
  width: var(--phone-w);
}

/* photo of the place: a tilted print pinned to the phone's lower-left corner.
   Hidden until the demo reaches the task step (class set by the message
   listener in index.html), so the photo appears when it is needed. */
.hero-place {
  display: none;
  position: absolute;
  left: -11.5rem;
  bottom: 9rem; /* lower third of the phone, clear of the feature cards under the hero */
  width: 12.5rem;
  margin: 0;
  padding: 0.4rem 0.4rem 0.55rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.45);
  transform: rotate(-6deg);
  transform-origin: bottom right;
  cursor: zoom-in;
}

.hero-phone.is-task .hero-place {
  display: block;
  animation: hero-place-in 0.45s ease-out;
}

@keyframes hero-place-in {
  from { opacity: 0; transform: rotate(-6deg) translateY(0.75rem); }
  to   { opacity: 1; transform: rotate(-6deg) translateY(0); }
}

.hero-place img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.25rem;
}

.hero-place figcaption {
  margin-top: 0.4rem;
  font-size: 0.6875rem;
  line-height: 1.3;
  color: #333;
}

.hero-phone__frame {
  position: relative;
  /* content-box so the aspect ratio applies to the screen area itself and the
     scaled iframe fills it exactly (no dark strip under the screen) */
  box-sizing: content-box;
  width: calc(var(--phone-w) - 1rem);
  aspect-ratio: 360 / 740;
  border: 0.5rem solid #111;
  border-radius: 2.5rem;
  background: #111;
  overflow: hidden;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5);
}

/* "tap here" cue in the landing's yellow, centred on the demo's first button
   («Я на месте», bottom of the screen): no static dot, only discs that grow
   from the centre and fade out, staggered. Taps pass through to the iframe.
   Gone after the first step inside the demo (class is-touched). */
.hero-phone__tap {
  position: absolute;
  left: 50%;
  top: 94.5%;
  z-index: 2;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  pointer-events: none;
}

.hero-phone__tap::before,
.hero-phone__tap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: hero-phone-tap 2.4s ease-out infinite;
}

.hero-phone__tap::after {
  animation-delay: 1.2s;
}

@keyframes hero-phone-tap {
  0%   { transform: scale(0.2); opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: scale(4.5); opacity: 0; }
}

/* hand-written "try the demo" pointer: label top-left of the phone, thin
   curly arrow ending at the screen; hidden together with the tap cue */
.hero-phone__note {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 23.5rem; /* arrow tip lands on «Я на месте» at the bottom of the screen */
  z-index: 2;
  width: 15rem;
  color: var(--accent);
  text-align: center;
  pointer-events: none;
}

.hero-phone__note-text {
  display: block;
  font-family: 'Caveat', 'Comic Sans MS', cursive;
  font-size: 2.375rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-6deg);
  transform-origin: center bottom;
  text-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.45);
}

.hero-phone__note-arrow {
  display: block;
  width: 7.5rem;
  height: auto;
  /* the path starts at its top-left corner: put that corner under the middle of the label */
  margin: 0.125rem 0 0 calc(50% - 0.375rem);
  filter: drop-shadow(0 0.125rem 0.375rem rgba(0, 0, 0, 0.45));
}

.hero-phone.is-touched .hero-phone__note {
  display: none;
}

/* the whole phone breathes in the same yellow until the first tap */
.hero-phone:not(.is-touched) .hero-phone__frame {
  animation: hero-phone-glow 2.4s ease-in-out infinite;
}

@keyframes hero-phone-glow {
  0%, 100% { box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(249, 225, 76, 0.6); }
  50%      { box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5), 0 0 0 0.75rem rgba(249, 225, 76, 0); }
}

.hero-phone.is-touched .hero-phone__tap {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone__tap::before,
  .hero-phone__tap::after,
  .hero-phone:not(.is-touched) .hero-phone__frame { animation: none; }
}

.hero-phone__screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 360px;
  height: 740px;
  border: 0;
  background: #F8FAFB;
  transform: scale(var(--phone-scale));
  transform-origin: 0 0;
}

@media (max-width: 1024px) {
  .hero {
    /* portrait crop of the same photo; the mosque stays in frame on phones */
    background-image:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.6) 100%),
      url('hero-morocco-mobile.jpg');
    background-image:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.6) 100%),
      image-set(
        url('hero-morocco-mobile.webp') type('image/webp'),
        url('hero-morocco-mobile.jpg') type('image/jpeg')
      );
    background-position: center top;
  }

  .hero-phone {
    --phone-w: 18rem;
    --phone-scale: 0.7556; /* (18rem - 1rem) / 360px */
    justify-self: center;
    margin-top: 4.75rem; /* room for the hand-written note above the phone */
  }

  /* phones: the note sits above the phone, arrow pointing down-right onto the screen */
  .hero-phone__note {
    right: auto;
    left: 0.25rem;
    top: -4.5rem;
    width: 9rem;
    text-align: left;
  }

  .hero-phone__note-text {
    font-size: 1.625rem;
    transform-origin: left bottom;
  }

  .hero-phone__note-arrow {
    width: 4.5rem;
    margin: -0.25rem 0 0 2.25rem;
    transform: rotate(50deg);
    transform-origin: left top;
  }

  /* phones: a small print clipped to the phone's top-right corner. It covers only
     the bezel and the demo's top bar (quest name and progress, nothing tappable),
     so the controls stay free; a tap opens the full photo in the lightbox. */
  .hero-place {
    left: auto;
    right: -1.5rem;
    top: -1.5rem;
    bottom: auto;
    z-index: 3;
    width: 5.75rem;
    padding: 0.3rem 0.3rem 0.4rem;
    transform: rotate(6deg);
    transform-origin: top right;
  }

  .hero-place img {
    aspect-ratio: 1 / 1;
  }

  .hero-place figcaption {
    display: none; /* the caption is shown in the lightbox */
  }

  /* small magnifier badge: the print is tappable */
  .hero-place::after {
    content: "";
    position: absolute;
    right: -0.5rem;
    bottom: -0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 1rem no-repeat;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
  }

  @keyframes hero-place-in {
    from { opacity: 0; transform: rotate(6deg) scale(0.6); }
    to   { opacity: 1; transform: rotate(6deg) scale(1); }
  }
}

/* full-screen view of the place photo (opened by a tap on the print) */
.hero-place-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
  animation: hero-place-lightbox-in 0.2s ease-out;
}

.hero-place-lightbox[hidden] {
  display: none;
}

body.hero-place-lightbox-open {
  overflow: hidden; /* no page scroll behind the photo */
}

@keyframes hero-place-lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-place-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 0.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.6);
}

.hero-place-lightbox figcaption {
  max-width: 28rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}

.hero-place-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* =============================================================
   Single tour page layout (explorecity-product-page.php,
   product-page.js). Sections of the synced description, buy
   blocks, practical questions (<details>), sticky buy bar.
   ============================================================= */

/* Nothing on a tour page may widen the layout past the screen. */
body.single-product {
  overflow-x: clip;
}

body.single-product .wp-block-columns.alignwide,
body.single-product .wp-block-columns.alignwide > .wp-block-column,
body.single-product .wp-block-woocommerce-product-details,
.ec-pp,
.ec-pp__section,
.ec-buy,
.ec-specs--compact {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ec-pp img,
.ec-pp iframe {
  max-width: 100%;
}

/* Compact specs row under the excerpt */
.ec-specs--compact {
  border-top: 0;
  padding: 0;
}

.ec-specs--compact .ec-specs__row {
  font-size: 0.9rem;
}

/* Buy block: price + unit, "one phone" line, button, fine print */
.ec-buy {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.25rem 0 0;
  padding: 1.1rem 1.2rem;
  border: 0.0625rem solid var(--card-light-border);
  border-radius: var(--radius-md);
  background: var(--bg-light-soft);
}

.ec-buy p {
  margin: 0;
}

.ec-buy__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.3;
}

.ec-buy__amount,
.ec-buy__amount .woocommerce-Price-amount {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

.ec-buy__amount del,
.ec-buy__amount del .woocommerce-Price-amount {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark-dim);
}

.ec-buy__amount ins {
  text-decoration: none;
}

.ec-buy__unit {
  color: var(--text-dark-muted);
  font-size: 0.95rem;
}

.ec-buy__shared {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.ec-buy__shared i {
  color: var(--text-dark-dim);
  font-size: 0.85rem;
}

.ec-buy__fine {
  color: var(--text-dark-dim);
  font-size: 0.8rem;
  line-height: 1.4;
}

body.single-product .ec-buy .single_add_to_cart_button,
body.single-product .ec-buy__button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(18rem, 100%);
  height: 3rem !important;
  min-height: 0;
  padding: 0.5rem 1.5rem !important;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--accent) !important;
  color: #111 !important;
  font-family: inherit !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  line-height: 1 !important;
  margin: 0 !important;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0.5rem 1.375rem rgba(249, 225, 76, 0.25);
  transition: background 0.2s ease, opacity 0.2s ease;
}

body.single-product .ec-buy__button:hover {
  background: var(--accent-hover) !important;
}

body.single-product .ec-buy__button:focus-visible {
  outline: 0.1875rem solid var(--text-dark);
  outline-offset: 0.125rem;
}

body.single-product .ec-buy__button.is-busy,
body.single-product .ec-buy__button:disabled {
  opacity: 0.65;
  cursor: progress;
  box-shadow: none;
}

body.single-product .ec-buy__button.is-busy::after {
  content: '';
  width: 0.9rem;
  height: 0.9rem;
  margin-left: 0.6rem;
  border: 0.15rem solid rgba(0, 0, 0, 0.25);
  border-top-color: #111;
  border-radius: 50%;
  animation: ec-spin 0.8s linear infinite;
}

@keyframes ec-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  body.single-product .ec-buy .single_add_to_cart_button,
  body.single-product .ec-buy__button {
    width: 100%;
  }
}

/* Description area */
body.single-product .wp-block-woocommerce-product-details {
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.ec-pp {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ec-pp__section > * + * {
  margin-top: 0.9rem;
}

.ec-pp__title {
  margin: 0 0 1rem;
  color: var(--text-dark);
  font-family: inherit;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ec-pp__title--small {
  font-size: 1.15rem;
}

.ec-pp p,
.ec-pp li {
  color: var(--text-dark-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.ec-pp strong {
  color: var(--text-dark);
  font-weight: 800;
}

.ec-pp ul,
.ec-pp ol {
  margin: 0.75rem 0 0;
  padding-left: 1.4rem;
}

.ec-pp li + li {
  margin-top: 0.35rem;
}

.ec-pp a:not(.btn) {
  color: var(--text-dark);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}


/* Reviews on a tour page: the landing carousel; bottom room clears the dots */
.ec-pp .ec-product-reviews {
  margin-top: 0;
  padding: 1.5rem 0 2.5rem;
}

.reviews-single {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.reviews-list {
  display: grid;
  gap: 1rem;
}

.review-card--static,
.review-card--static.review-card {
  height: auto;
  max-width: 44rem;
}

.review-card--static .review-body {
  overflow: visible;
}

.review-card--static .review-body::after {
  display: none;
}

.review-card--static .review-foot:empty {
  display: none;
}

.reviews-more-btn {
  align-self: flex-start;
  padding: 0.7rem 1.3rem;
  border: 0.0625rem solid var(--text-dark);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-dark);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.reviews-more-btn:hover {
  background: var(--text-dark);
  color: #fff;
}

.reviews-more-btn:focus-visible {
  outline: 0.1875rem solid var(--accent);
  outline-offset: 0.125rem;
}

.ec-title-mobile {
  display: none;
}

/* Practical questions: native <details>, several may be open at once.
   Same card treatment as the FAQ on the front page. */
.ec-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ec-faq-list .ec-pp__title {
  margin-bottom: 0.25rem;
}

/* flex gap does the spacing; cancel the generic section rhythm */
.ec-faq-list > .ec-faq {
  margin-top: 0;
}

.ec-faq {
  background: var(--card-light-bg);
  border: 0.0625rem solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

.ec-faq__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  color: var(--text-dark);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ec-faq__summary::-webkit-details-marker {
  display: none;
}

.ec-faq__summary:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* WP global styles draw a 2px outline on any :focus; the card's overflow
   clips it to a bare bottom line after a mouse click. Keyboard focus keeps its ring. */
.ec-faq__summary:focus:not(:focus-visible) {
  outline: none;
}

.ec-faq__summary:focus-visible {
  outline: 0.1875rem solid var(--accent);
  outline-offset: -0.1875rem;
  border-radius: var(--radius-md);
}

.ec-faq__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bg-light-soft);
  color: var(--text-dark);
  font-size: 0.75rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ec-faq[open] .ec-faq__chevron {
  transform: rotate(180deg);
  background: var(--accent);
}

.ec-faq__body {
  padding: 0 1.5rem 1.35rem;
}

.ec-faq__body > * + * {
  margin-top: 0.75rem;
}

@media (max-width: 40rem) {
  .ec-faq__summary {
    padding: 1rem 1.1rem;
  }

  .ec-faq__body {
    padding: 0 1.1rem 1.15rem;
  }
}

.ec-faq__start {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.ec-faq__start i {
  margin-top: 0.4em;
  color: var(--text-dark-dim);
}

.ec-faq__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  gap: 0.4rem;
}

.ec-faq__list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
}

.ec-faq__list i {
  flex: 0 0 1.1rem;
  margin-top: 0.45em;
  text-align: center;
  font-size: 0.85rem;
}

.ec-faq__list--yes i {
  color: #1f9d8a;
}

.ec-faq__list--no i {
  color: var(--text-dark-dim);
}

.ec-faq__list-title {
  margin-top: 1rem !important;
  color: var(--text-dark);
  font-weight: 700;
}

/* Bottom buy block + support */
.ec-buy--bottom {
  max-width: 32rem;
}

.ec-pp__support p {
  margin: 0;
}

/* Sticky buy bar (narrow screens; product-page.js toggles [hidden]) */
.ec-sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.96);
  border-top: 0.0625rem solid var(--card-light-border);
  box-shadow: 0 -0.375rem 1.125rem rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(0.5rem);
  -webkit-backdrop-filter: blur(0.5rem);
}

.ec-sticky-buy[hidden] {
  display: none;
}

.ec-sticky-buy__text {
  min-width: 0;
}

.ec-sticky-buy__text .ec-buy__price {
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}

.ec-sticky-buy__text .ec-buy__amount,
.ec-sticky-buy__text .ec-buy__amount .woocommerce-Price-amount {
  font-size: 1.2rem;
}

.ec-sticky-buy__text .ec-buy__unit {
  font-size: 0.75rem;
}

body.single-product .ec-sticky-buy__button {
  width: auto;
  flex: 0 0 auto;
  height: 2.75rem !important;
  padding: 0.5rem 1.25rem !important;
  font-size: 0.75rem !important;
}

/* Room for the bar at the end of the page; the chat launcher moves up. */
body.ec-sticky-on {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
}

body.ec-sticky-on .ec-support__launcher {
  bottom: calc(5.75rem + env(safe-area-inset-bottom, 0));
}

body.ec-sticky-on .ec-support {
  bottom: calc(10rem + env(safe-area-inset-bottom, 0));
}

@media (min-width: 56.3125rem) {
  .ec-sticky-buy {
    display: none !important;
  }
}

/* Desktop: the summary card sets the height of the first row; the gallery
   column stretches to it instead of pushing the row taller with its photo. */
@media (min-width: 901px) {
  body.single-product .wp-block-columns.alignwide > .wp-block-column:first-child {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  body.single-product .wp-block-columns.alignwide > .wp-block-column:first-child > .wp-block-woocommerce-product-image-gallery {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
  }
}

/* The WooCommerce add-to-cart form inside the buy block: a plain block,
   no grid columns, gaps or padding, so the button lines up with the text. */
body.single-product .ec-buy .wp-block-add-to-cart-form,
body.single-product .ec-buy form.cart {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  gap: 0 !important;
  width: 100%;
}

body.single-product .ec-buy form.cart > * {
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.single-product .ec-buy form.cart > .single_add_to_cart_button {
  padding: 0.5rem 1.5rem !important;
}

/* Buy block: the button spans the whole block on every width, so the
   block reads as one unit instead of text on the left and air on the right. */
body.single-product .ec-buy .single_add_to_cart_button,
body.single-product .ec-buy .ec-buy__button {
  width: 100%;
}

/* "Что входит в стоимость?" as an open section: the same list styling as inside a question. */
.ec-included .ec-faq__list {
  margin-top: 0.25rem !important;
}

.ec-included > p {
  margin-top: 0.9rem;
}
