/* ================================================================
   Home-V2 hero "Pictures from our Customers" gallery + admin editor
   Loaded by home-v2.php (theme template). Paired with home-v2-hero.js.
   - Normal mode (desktop): 3x3 grid of all 9 pictures.
   - Carousel mode (mobile, or Promo at any width): 3 visible + arrows.
   - Promo mode: carousel + one large promo image (replaces the other 6).
   ================================================================ */
.hero-cust { width: 100%; }
.hero-cust__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hero-cust__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #111;
  line-height: 1.15;
}
.hero-cust__edit {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(224, 123, 48, .4);
  border-radius: 50%;
  background: #fff;
  color: #e07b30;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.hero-cust__edit:hover {
  background: #e07b30;
  color: #fff;
  transform: scale(1.06);
}

.hero-cust__body { width: 100%; }
.hero-cust__viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.hero-cust__track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.hero-cust__card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  aspect-ratio: 63 / 88;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid rgba(0,0,0,.3);
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  cursor: zoom-in;
  background: #ddd;
}
.hero-cust__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-cust__card:hover {
  transform: scale(1.05) translateY(-2px);
  border-color: #e07b30;
  box-shadow: 0 8px 20px rgba(0,0,0,.32);
  z-index: 5;
}
/* Play-button overlay so the video tile reads as a video. */
.hero-cust__card--video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 1;
  pointer-events: none;
}
.hero-cust__card--video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #e07b30 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/46% no-repeat;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  z-index: 2;
  pointer-events: none;
}

/* Nav arrows — hidden by default (grid mode), shown in carousel mode */
.hero-cust__nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(7, 17, 39, .82);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.28);
  transition: background .15s ease;
}
.hero-cust__nav:hover { background: #e07b30; }
.hero-cust__nav--prev { left: 4px; }
.hero-cust__nav--next { right: 4px; }

/* Carousel mode (added by JS): track slides horizontally, arrows visible */
.hero-cust.is-carousel .hero-cust__track {
  display: flex;
  gap: 6px;
  will-change: transform;
  transition: transform .35s ease;
}
.hero-cust.is-carousel .hero-cust__card {
  flex: 0 0 calc((100% - 12px) / 3); /* 3 visible, 2 gaps of 6px */
}
.hero-cust.is-carousel .hero-cust__nav { display: flex; }

/* Promo image — sits below the slideshow, taking the space of the other 6 */
.hero-cust__promo {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(0,0,0,.18);
  box-shadow: 0 6px 18px rgba(0,0,0,.20);
}
.hero-cust__promo img {
  width: 100%;
  height: auto;
  display: block;
}

/* On mobile, force carousel even in normal mode */
@media (max-width: 900px) {
  .hero-cust__track {
    display: flex;
    gap: 6px;
    will-change: transform;
    transition: transform .35s ease;
  }
  .hero-cust__card {
    flex: 0 0 calc((100% - 12px) / 3);
  }
  .hero-cust__nav { display: flex; }
  .hero-cust { max-width: 360px; margin: 0 auto; }
}

/* ================================================================
   Hero mode editor popup (managers only)
   ================================================================ */
.pp-hero-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 17, 39, .55);
}
.pp-hero-modal.is-open { display: flex; }
.pp-hero-modal__box {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.30);
  padding: 26px 26px 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #071127;
}
.pp-hero-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #65718a;
  cursor: pointer;
}
.pp-hero-modal__title {
  margin: 0 0 16px;
  font-size: 19px;
  font-weight: 800;
}
.pp-hero-modal__toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.pp-hero-opt {
  padding: 11px 10px;
  border: 2px solid #e7ebf2;
  border-radius: 12px;
  background: #f7f8fb;
  color: #071127;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pp-hero-opt.is-active {
  border-color: #e07b30;
  background: #fff3ec;
  color: #c5651f;
}
.pp-hero-modal__promo { display: none; }
.pp-hero-modal__promo.is-visible { display: block; }
.pp-hero-modal__hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #65718a;
  line-height: 1.45;
}
.pp-hero-modal__preview { margin-bottom: 10px; }
.pp-hero-modal__preview img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e7ebf2;
  display: block;
}
.pp-hero-modal__upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #071127;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pp-hero-modal__upload:hover { background: #1b2540; }
.pp-hero-modal__status {
  margin: 10px 0 0;
  font-size: 13px;
  color: #65718a;
  min-height: 18px;
}
.pp-hero-modal__status.is-error { color: #c5651f; }
.pp-hero-modal__save {
  margin-top: 18px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8924a, #e07b30);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(224, 123, 48, .26);
}
.pp-hero-modal__save:disabled { opacity: .6; cursor: default; }

/* ================================================================
   Isolated lightbox for the customer pictures (built by JS)
   ================================================================ */
.pp-hero-lb {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 17, 39, .82);
}
.pp-hero-lb.is-open { display: flex; }
.pp-hero-lb__img {
  max-width: min(92vw, 640px);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  display: block;
}
.pp-hero-lb__video {
  max-width: min(92vw, 640px);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  background: #000;
  display: block;
}
.pp-hero-lb__btn,
.pp-hero-lb__close {
  position: absolute;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #071127;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-hero-lb__btn:hover,
.pp-hero-lb__close:hover { background: #e07b30; color: #fff; }
.pp-hero-lb__btn {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 24px;
}
.pp-hero-lb__prev { left: 18px; }
.pp-hero-lb__next { right: 18px; }
.pp-hero-lb__close {
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 26px;
}
