:root {
  --bg: #eef1f4;
  --bg-alt: #e4e9ef;
  --ink: #14181d;
  --muted: #5a6672;
  --line: rgba(20, 24, 29, 0.12);
  --orange: #f26b1f;
  --orange-deep: #d45510;
  --surface: #ffffff;
  --hero-ink: #fffaf6;
  --header-bg: rgba(238, 241, 244, 0.92);
  --panel-bg: #ffffff;
  --input-bg: #fff;
  --radius: 6px;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Golos Text", sans-serif;
  --max: 1140px;
  --header-h: 4.25rem;
}

html[data-theme="dark"] {
  --bg: #12151a;
  --bg-alt: #0e1116;
  --ink: #eef2f6;
  --muted: #9aa7b5;
  --line: rgba(238, 242, 246, 0.12);
  --orange: #ff7a33;
  --orange-deep: #ff945c;
  --surface: #1a2028;
  --hero-ink: #fffaf6;
  --header-bg: rgba(18, 21, 26, 0.92);
  --panel-bg: #1a2028;
  --input-bg: #151a21;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(242, 107, 31, 0.1), transparent 55%),
    radial-gradient(800px 420px at 100% 10%, rgba(40, 70, 100, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
.logo,
.brand-hero,
.card-title,
.stat-num {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 600;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--orange);
  white-space: nowrap;
}

.logo span {
  color: var(--orange);
}

.nav-desktop {
  display: none;
  gap: 1.15rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--ink);
}

.header-phone {
  display: none;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--orange-deep);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.theme-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
}

.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0 0 1rem;
  border-top: 1px solid var(--line);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding-top: 0.35rem;
  color: var(--ink);
  font-weight: 500;
}

.nav-mobile .header-phone {
  display: inline-block;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-deep);
}

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}

.hero {
  position: relative;
  min-height: min(84svh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--hero-ink);
}

/* Головна: фото павільйону на весь екран */
.hero.hero-home {
  width: 100%;
  min-height: 100svh;
  aspect-ratio: auto;
  max-height: none;
  background: #111814;
}

.hero-media,
.page-hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: zoom-in 12s ease-out forwards;
}

.hero-media img.hero-photo {
  transform: none;
  animation: none;
  object-fit: cover;
  object-position: center center;
}

.hero-media img.hero-photo-mobile {
  display: none;
}

.hero-veil,
.page-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 14, 18, 0.35), rgba(12, 14, 18, 0.78)),
    linear-gradient(90deg, rgba(12, 14, 18, 0.55), rgba(12, 14, 18, 0.2) 60%);
}

/* Майже без затемнення зверху — вивіска читається */
.hero.hero-home .hero-veil {
  background:
    linear-gradient(
      180deg,
      rgba(8, 12, 18, 0) 0%,
      rgba(8, 12, 18, 0.05) 45%,
      rgba(8, 12, 18, 0.55) 72%,
      rgba(8, 12, 18, 0.82) 100%
    );
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 6rem 0 3.5rem;
  animation: rise 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero.hero-home .hero-content {
  padding: 1.5rem 0 2.2rem;
  max-width: 36rem;
}

.brand-hero {
  margin: 0 0 0.85rem;
  color: var(--orange);
  font-size: clamp(2.2rem, 8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.45rem, 3.4vw, 2.4rem);
  font-weight: 500;
}

.hero.hero-home h1 {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero-lead,
.page-lead {
  margin: 1rem 0 0;
  max-width: 42ch;
  color: rgba(255, 250, 246, 0.82);
  font-size: 1.05rem;
}

.hero.hero-home .hero-lead {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.page-hero {
  position: relative;
  min-height: 340px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--hero-ink);
}

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.35);
  border-block: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
}

.section-lead {
  margin: 0.9rem 0 0;
  max-width: 48ch;
  color: var(--muted);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.panel h3,
.card-title {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.panel p,
.muted {
  margin: 0;
  color: var(--muted);
}

.category-link {
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-link:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 107, 31, 0.45);
}

.category-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
}

.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.brand-chip {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  font-weight: 600;
}

.fail-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.fail-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.fail-list li:last-child {
  border-bottom: none;
}

.fail-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.split {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.review {
  display: grid;
  gap: 0.75rem;
}

.review-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.stars {
  color: var(--orange);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.contact-block {
  display: grid;
  gap: 0.85rem;
}

.contact-block a.phone-lg {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
}

.contact-block a.phone-lg:hover {
  color: var(--orange-deep);
}

.map-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 360px;
}

.map-wrap iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}

.maps-stack {
  display: grid;
  gap: 1rem;
}

.map-label {
  margin: 0;
  padding: 0.75rem 0.9rem 0;
  font-weight: 700;
  color: var(--ink);
}

@media (min-width: 780px) {
  .maps-stack {
    gap: 1.1rem;
  }

  .maps-stack .map-wrap {
    min-height: 280px;
  }

  .maps-stack .map-wrap iframe {
    height: 300px;
  }
}

.form {
  display: grid;
  gap: 0.85rem;
}

.form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  padding: 0.75rem 0.85rem;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(242, 107, 31, 0.28);
  border-color: var(--orange);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  margin-top: 1rem;
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-band {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1a1f25, #2a3139);
  color: #fff;
}

.cta-band h2 {
  color: #fff;
  max-width: none;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.cta-band .btn-primary {
  justify-self: start;
}

.table-like {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.table-like th,
.table-like td {
  text-align: left;
  padding: 0.9rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table-like th {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes zoom-in {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

@media (min-width: 780px) {
  .nav-desktop {
    display: flex;
  }

  .header-phone {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .split {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

@media (min-width: 1020px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Catalog */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.catalog-toolbar h2 {
  max-width: none;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 2.6rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
  background: #fff7f1;
}

.product-grid {
  display: grid;
  gap: 1rem;
}

.product-card {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-gallery {
  display: grid;
  gap: 0.45rem;
  background: #dfe5eb;
}

.photo-collage {
  display: grid;
  gap: 3px;
  background: #cfd6dd;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.collage-cell {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: #dfe5eb;
  -webkit-tap-highlight-color: transparent;
}

.collage-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 180ms ease;
  pointer-events: none;
}

.collage-cell:hover img,
.collage-cell:focus-visible img {
  transform: scale(1.04);
}

.photo-collage-1 {
  grid-template-columns: 1fr;
}

.photo-collage-2 {
  grid-template-columns: 1fr 1fr;
}

.photo-collage-3 {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.photo-collage-3 .collage-cell:first-child {
  grid-row: 1 / span 2;
}

.photo-collage-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.photo-collage-5 {
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.photo-collage-5 .collage-cell:first-child {
  grid-row: 1 / span 2;
}

.product-photo {
  position: relative;
  background: #dfe5eb;
  aspect-ratio: 4 / 3;
}

.product-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.product-photo img,
.product-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-photo-badge {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  padding: 0 0.45rem 0.45rem;
}

.product-thumb {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #cfd6dd;
}

.product-thumb.is-active {
  border-color: var(--orange);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-body {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
}

.product-cat {
  margin: 0;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-body h3 {
  margin: 0;
  font-size: 1.1rem;
}

.product-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.product-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}

.product-price {
  color: var(--ink);
  font-size: 1.1rem;
}

.btn-sm {
  min-height: 2.45rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.92rem;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.empty-state h3 {
  margin: 0 0 0.5rem;
}

.empty-state p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.admin-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.admin-layout {
  display: grid;
  gap: 2rem;
}

.admin-form .btn {
  width: 100%;
}

.photo-preview {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.field-hint {
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.55rem;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dfe5eb;
}

.photo-preview-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: transparent;
}

.photo-preview-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.78);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.photo-preview-num {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
}

.admin-item-photo {
  position: relative;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  background: #dfe5eb;
}

.admin-item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-photo-count {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  min-width: 1.2rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.photo-lightbox.is-open {
  display: grid;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.9);
}

.photo-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  display: grid;
  place-items: center;
  gap: 0.5rem;
}

.photo-lightbox-image {
  max-width: 100%;
  max-height: min(72vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  background: #111;
  touch-action: none;
}

.photo-lightbox-close,
.photo-lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}

.photo-lightbox-close {
  top: 0.35rem;
  right: 0.35rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 2;
}

.photo-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
  z-index: 2;
}

.photo-lightbox-prev {
  left: 0.25rem;
}

.photo-lightbox-next {
  right: 0.25rem;
}

.photo-lightbox-counter {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  text-align: center;
}

body.lightbox-open {
  overflow: hidden;
}

.form-status {
  min-height: 1.3em;
  margin: 0;
  color: var(--orange-deep);
  font-weight: 600;
}

.form-status[data-ok="0"] {
  color: #b42318;
}

.backup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.file-btn {
  cursor: pointer;
}

.admin-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.admin-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-item img,
.admin-item-photo img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 4px;
}

.admin-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.admin-desc {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-item .btn {
  grid-column: 1 / -1;
  width: 100%;
}

html[data-theme="dark"] .section-alt {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .brand-chip,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .admin-item,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .map-wrap {
  background: var(--surface);
}

html[data-theme="dark"] .product-gallery,
html[data-theme="dark"] .product-photo,
html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .photo-preview-item,
html[data-theme="dark"] .admin-item-photo,
html[data-theme="dark"] .photo-collage,
html[data-theme="dark"] .collage-cell {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .filter-chip.is-active,
html[data-theme="dark"] .filter-chip:hover {
  background: rgba(255, 122, 51, 0.12);
}

html[data-theme="dark"] .menu-toggle span,
html[data-theme="dark"] .menu-toggle span::before,
html[data-theme="dark"] .menu-toggle span::after {
  background: var(--ink);
}

.fail-list-wide {
  max-width: 720px;
}

.repair-pick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.repair-card {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  color: #fff;
  transition: transform 160ms ease, border-color 160ms ease;
}

.repair-card:hover,
.repair-card[aria-selected="true"] {
  transform: translateY(-2px);
  border-color: var(--orange);
}

.repair-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.repair-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.85rem 0.85rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(12, 14, 18, 0.82));
}

.repair-card[aria-selected="true"] span {
  color: #ffd7bf;
}

.repair-hint {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.repair-panel {
  margin-top: 1.25rem;
  animation: rise 420ms ease both;
}

@media (min-width: 780px) {
  .repair-pick {
    grid-template-columns: repeat(4, 1fr);
  }

  .repair-card span {
    font-size: 1.05rem;
  }
}

.page-hero-sm {
  min-height: 260px;
}

.mobile-call {
  display: none;
}

/* Mobile-first refinements */
@media (max-width: 779px) {
  body {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  }

  .container {
    width: min(100% - 1.25rem, var(--max));
  }

  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .header-inner {
    min-height: 3.6rem;
  }

  .logo {
    font-size: 1.05rem;
  }

  .nav-mobile {
    padding-bottom: 1.1rem;
  }

  .nav-mobile a {
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 100svh;
  }

  .hero.hero-home {
    /* Квадратне фото телефону — без зеленої смуги і без зсуву вивіски */
    min-height: 0;
    aspect-ratio: 1 / 1;
    max-height: min(100svh, 100vw);
    background: #111814;
  }

  .hero-media img.hero-photo-desktop {
    display: none;
  }

  .hero-media img.hero-photo-mobile {
    display: block;
    object-fit: cover;
    object-position: center center;
    background: transparent;
  }

  .hero-media img.hero-photo {
    object-fit: cover;
    object-position: center center;
  }

  .hero.hero-home .hero-content {
    padding: 4.5rem 0 1.5rem;
  }

  .hero.hero-home .hero-veil {
    background:
      linear-gradient(
        180deg,
        rgba(8, 12, 18, 0) 0%,
        rgba(8, 12, 18, 0.08) 40%,
        rgba(8, 12, 18, 0.62) 68%,
        rgba(8, 12, 18, 0.88) 100%
      );
  }

  .hero-content,
  .page-hero-content {
    padding: 5.5rem 0 2.4rem;
  }

  .brand-hero {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-actions .btn,
  .cta-band .btn,
  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .page-hero {
    min-height: 240px;
  }

  .page-hero-sm {
    min-height: 220px;
  }

  .section {
    padding: 2.75rem 0;
  }

  .map-wrap,
  .map-wrap iframe {
    min-height: 280px;
    height: 280px;
  }

  .contact-block a.phone-lg {
    font-size: 1.35rem;
    word-break: break-word;
  }

  .mobile-call {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 60;
    min-height: 3.1rem;
    border-radius: 10px;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(20, 24, 29, 0.22);
  }

  .site-footer {
    padding-bottom: 1.5rem;
  }
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-form .btn {
    width: auto;
    justify-self: start;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .hero.hero-home {
    min-height: 100svh;
    width: 100%;
    max-height: none;
  }

  .hero-media img.hero-photo-desktop {
    display: block;
    object-fit: cover;
    object-position: center center;
  }

  .hero-media img.hero-photo-mobile {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .admin-item {
    grid-template-columns: 88px 1fr auto;
  }

  .admin-item .btn {
    grid-column: auto;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .page-hero-media img,
  .hero-content,
  .page-hero-content,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
