﻿/* ============================================================
   FORWARD23 — интернет-магазин стеклоподъёмников
   Базовые компоненты поверх Tailwind (Play CDN)
   Лёгкий современный дизайн, красный фирменный акцент
   ============================================================ */

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Navigation link ---------- */
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 0;
  color: #3a4151;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: #b01c0d;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ---------- Feature tiles (advantages) ---------- */
.feature {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e6eaf0;
  background: #fbfcfd;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px -22px rgba(14, 16, 23, 0.28);
  border-color: #d5dae2;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fbe6de;
  color: #b01c0d;
  border: 1px solid #f6ccc0;
}

/* ---------- Icon buttons ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #3a4151;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
}

.icon-btn:hover {
  background: #e7ecf3;
  color: #0e1017;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #b01c0d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* ---------- Burger ---------- */
.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3.5px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon-btn.open .burger-line:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.icon-btn.open .burger-line:nth-child(2) { opacity: 0; }
.icon-btn.open .burger-line:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-link {
  padding: 12px 8px;
  font-weight: 600;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-link:hover {
  background: #e7ecf3;
}

/* ---------- Logo placeholder ---------- */
.logo-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #b01c0d;
  color: #ffffff;
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px -10px rgba(176, 28, 13, 0.5);
}

.logo-mark--sm {
  width: 38px;
  height: 38px;
  font-size: 20px;
  border-radius: 10px;
}

/* ---------- Header brand logo ---------- */
.brand-logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}
@media (min-width: 640px) {
  .brand-logo { height: 32px; }
}
@media (min-width: 1024px) {
  .brand-logo { height: 38px; }
}

/* ---------- Contact chip (header) ---------- */
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #e6eaf0;
  background: #ffffff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.contact-chip:hover {
  border-color: #c9d2de;
  background: #f5f7fa;
  transform: translateY(-1px);
}

/* ---------- Hero select (быстрый подбор) ---------- */
.hero-select {
  width: 100%;
  padding: 13px 40px 13px 16px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #181b24 url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f7fa' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 14px center;
  background-size: 16px;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.hero-select::placeholder,
.hero-select option {
  color: #ffffff;
}

.hero-select:focus {
  outline: none;
  border-color: #efa892;
  background-color: #3a4151;
}

.hero-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
              background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.btn:focus-visible {
  outline: 2px solid #b01c0d;
  outline-offset: 2px;
}

.btn-primary {
  background: #b01c0d;
  color: #ffffff;
  box-shadow: 0 12px 30px -10px rgba(176, 28, 13, 0.55);
}

.btn-primary:hover {
  background: #cb3d1c;
  transform: translateY(-2px);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.btn-dark {
  background: #0e1017;
  color: #ffffff;
}

.btn-dark:hover {
  background: #3a4151;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 11px 18px;
  font-size: 13px;
}

/* ---------- Hero badge & labels ---------- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(229, 125, 95, 0.35);
  background: rgba(176, 28, 13, 0.12);
  color: #efa892;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #b01c0d;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #181b24;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-arrow:hover {
  color: #b01c0d;
  border-color: #b01c0d;
}

/* ---------- Brand chips (marquee) ---------- */
.brand-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid #d5dae2;
  background: #f5f7fa;
  color: #525e77;
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.brand-chip:hover {
  border-color: #b01c0d;
  color: #b01c0d;
  background: #fdf4f0;
}

/* ---------- Brand cards (выбор по марке) ---------- */
.brand-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 158px;
  padding: 18px 14px;
  border-radius: 16px;
  border: 1px solid #e6eaf0;
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px -22px rgba(14, 16, 23, 0.28);
  border-color: #b01c0d;
}

.brand-card-letter {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #181b24;
  line-height: 1.1;
}

.brand-card:hover .brand-card-letter {
  color: #b01c0d;
}

.brand-card-logo {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.brand-card-logo svg {
  width: auto;
  height: 30px;
  max-width: 72px;
  fill: #181b24;
  stroke: #181b24;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.brand-card:hover .brand-card-logo svg {
  fill: #b01c0d;
  stroke: #b01c0d;
}

/* Реальный логотип бренда (publisher image) */
.brand-card-logo--img {
  height: 44px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-card-logo--img img {
  max-width: 76px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Заглушка под логотип бренда */
.brand-card-logo--ph {
  height: 46px;
  width: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 1.5px dashed #c9d2de;
  border-radius: 10px;
  background: #f8fafc;
}

.brand-card-logo--ph svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #b1bac9;
  stroke-width: 1.6;
  transition: stroke 0.2s ease;
}

.brand-card:hover .brand-card-logo--ph {
  border-color: #b01c0d;
  background: #fdf4f0;
}

.brand-card:hover .brand-card-logo--ph svg {
  stroke: #b01c0d;
}

.brand-card-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #687690;
  line-height: 1.4;
}

.brand-card-title {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #181b24;
  line-height: 1.2;
}

.brand-card:hover .brand-card-title {
  color: #b01c0d;
}

.brand-card--all {
  border-style: dashed;
  border-color: #c9d2de;
  background: #f5f7fa;
}

.brand-card--all .brand-card-letter {
  font-size: 16px;
  letter-spacing: 0.14em;
  color: #b01c0d;
}

/* ---------- Category tiles ---------- */
.cat-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cat-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.6s ease;
}

.cat-tile-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(14, 16, 23, 0.92) 0%, rgba(14, 16, 23, 0.35) 45%, rgba(14, 16, 23, 0.05) 100%);
  transition: background 0.4s ease;
}

.cat-tile:hover .cat-tile-img {
  transform: scale(1.06);
}

.cat-tile:hover {
  box-shadow: 0 25px 50px -20px rgba(14, 16, 23, 0.5);
}

.cat-tile-content {
  display: flex;
  flex-direction: column;
  color: #ffffff;
  padding: 24px;
  width: 100%;
}

.cat-tile-num {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: #efa892;
  margin-bottom: 8px;
}

/* ---------- Product card ---------- */
.product-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -22px rgba(14, 16, 23, 0.3);
  border-color: #c9d2de;
}

.product-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.07);
}

.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-hit { background: #b01c0d; color: #ffffff; }
.tag-ours { background: rgba(14, 16, 23, 0.85); color: #ffffff; backdrop-filter: blur(4px); }
.tag-new { background: #ffffff; color: #181b24; }

.product-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.product-card:hover .product-actions {
  transform: translateY(0);
  opacity: 1;
}

.act-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.act-btn-add { background: #b01c0d; color: #ffffff; box-shadow: 0 8px 20px -6px rgba(14,16,23,0.4); }
.act-btn-add:hover { background: #cb3d1c; transform: translateY(-1px); }
.act-btn-view { background: rgba(255, 255, 255, 0.96); color: #181b24; backdrop-filter: blur(4px); }
.act-btn-view:hover { background: #ffffff; }

.stock-dot { width: 8px; height: 8px; border-radius: 999px; background: #3caf62; display: inline-block; margin-right: 6px; }
.stock-dot.soon { background: #df8f2c; }

.product-media-link {
  position: absolute;
  inset: 0;
  display: block;
}

/* ---------- Advantages ---------- */
.adv-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.adv-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fbe6de;
  color: #b01c0d;
  border: 1px solid #f6ccc0;
}

.check-dot {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(176, 28, 13, 0.18);
  border: 1px solid rgba(229, 125, 95, 0.5);
  position: relative;
}

.check-dot::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: #b01c0d;
}

/* ---------- Form fields (dark) ---------- */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b1bac9;
  margin-bottom: 7px;
}

.field-label.on-light { color: #687690; }

.field-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 11px;
  border: 1px solid #3a4151;
  background: #181b24;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field-input::placeholder { color: #687690; }
.field-input:focus { outline: none; border-color: #b01c0d; background: #3a4151; }

.form-success {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 11px;
  background: rgba(60, 175, 98, 0.14);
  border: 1px solid rgba(60, 175, 98, 0.45);
  color: #7be0a3;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Marquee ---------- */
.marquee {
  animation: marquee 30s linear infinite;
  width: max-content;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Pattern (hero) ---------- */
.pattern-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ---------- Hero background ---------- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(90% 120% at 16% 8%, rgba(223, 85, 52, 0.16), transparent 55%),
    radial-gradient(70% 90% at 100% 100%, rgba(176, 28, 13, 0.34), transparent 60%),
    #0e1017;
}
.hero-bg--glow {
  position: absolute;
  right: -10%;
  top: -22%;
  width: 46vw;
  height: 46vw;
  min-width: 400px;
  min-height: 400px;
  border-radius: 9999px;
  z-index: 0;
  background: radial-gradient(circle, rgba(203, 61, 28, 0.3), rgba(176, 28, 13, 0.12) 42%, transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(203, 61, 28, 0.5);
  background: rgba(176, 28, 13, 0.16);
  color: #fbe6de;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Hero product (window-lift cutout) ---------- */
.hero-product {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-product__glow {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 20%;
  bottom: 4%;
  z-index: 0;
  background: radial-gradient(circle, rgba(203, 61, 28, 0.5), rgba(176, 28, 13, 0.22) 45%, transparent 70%);
  filter: blur(34px);
  animation: heroPulse 6s ease-in-out infinite;
}
.hero-product__img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  max-width: 460px;
  filter: drop-shadow(0 32px 56px rgba(0, 0, 0, 0.55));
  animation: heroFloat 7s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes heroPulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 23, 0.72);
  backdrop-filter: blur(4px);
  animation: fade-in 0.25s ease;
}

.modal-panel {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  animation: pop-in 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(14, 16, 23, 0.07);
  color: #3a4151;
  transition: background 0.2s ease;
}

.modal-close:hover { background: rgba(14, 16, 23, 0.16); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Chips (variants) ---------- */
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #c9d2de;
  background: transparent;
  color: #3a4151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover { border-color: #b01c0d; }

.chip-active {
  background: #0e1017;
  border-color: #0e1017;
  color: #ffffff;
}

.chip-clear {
  margin-left: auto;
  color: #687690;
  border-color: transparent;
}
.chip-clear:hover {
  color: #b01c0d;
  border-color: #b01c0d;
}

/* ---------- Filter panel ---------- */
.filter-panel {
  border: 1px solid #e6eaf0;
  border-radius: 20px;
  background: #ffffff;
  padding: 24px 24px 26px;
  box-shadow: 0 1px 2px rgba(14, 16, 23, 0.04);
}

.filter-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3a4151;
  margin-bottom: 12px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  background: #f5f7fa;
  border: 1px solid #e6eaf0;
  color: #181b24;
  font-size: 13px;
  font-weight: 600;
}
.filter-tag-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 800;
  color: #8794aa;
}
.filter-tag-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e7ecf3;
  color: #3a4151;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: all 0.15s ease;
}
.filter-tag-x:hover {
  background: #b01c0d;
  color: #ffffff;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  background: #0e1017;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.55);
  animation: toast-in 0.3s ease;
}

.toast svg { color: #3caf62; }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f5f7fa; }
::-webkit-scrollbar-thumb { background: #c9d2de; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b01c0d; }

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #b01c0d;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  .product-actions {
    transform: none;
    opacity: 1;
  }

  .btn { padding: 14px 20px; }

  /* Табы — компактнее на узких экранах */
  .tab-btn { font-size: 14px; padding: 13px 2px; }

  /* Характеристики — одна колонка на очень узких экранах */
  .spec-grid > div { grid-template-columns: 1fr; gap: 3px; }

  /* Херо: уменьшаем декоративное свечение и картинку на мобиле, чтобы
     элемент не доминировал над заголовком и не выступал за экран */
  .hero-bg--glow {
    min-width: 0;
    right: -30%;
    top: -16%;
    width: 80vw;
    height: 80vw;
  }

  .hero-product__img { max-width: 420px; }
}

/* ---------- Header on very small screens ---------- */
@media (max-width: 639px) {
  .logo-mark { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
  .icon-btn { width: 38px; height: 38px; }
  .btn-sm { padding: 9px 12px; font-size: 13px; }
}

/* Очень узкие экраны — ещё компактнее */
@media (max-width: 380px) {
  .logo-mark { width: 32px; height: 32px; font-size: 18px; }
  .icon-btn { width: 34px; height: 34px; }
  .btn-sm { padding: 8px 10px; font-size: 12px; }

  /* Компактнее логотип и картинку, чтобы шапка не переполнялась */
  .brand-logo { height: 22px; }
  .hero-product__img { max-width: 340px; }

  /* Заголовок херо не переносить на слишком много строк */
  .hero h1, .hero section h1, section:has(.hero-product) h1 { font-size: 26px; }
}

/* Средние экраны (планшеты, крупные телефоны): 1 колонка —
   ограничиваем квадратное фото, чтобы оно не занимало всю ширину */
@media (min-width: 768px) and (max-width: 1023px) {
  .gallery-main-wrap,
  #gallery-thumbs { max-width: 560px; margin-inline: auto; }
}

/* На сенсорных устройствах (телефоны/планшеты) нет курсора — зум не нужен */
@media (hover: none), (pointer: coarse) {
  #gallery-main { cursor: default; }
  #gallery-main.zoomed { transform: none; }
}

/* ============================================================
   Страница товара (PDP)
   ============================================================ */

/* ---------- Хлебные крошки ---------- */
.pdp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: #687690;
  line-height: 1.5;
  row-gap: 4px;
}
.pdp-breadcrumb a { color: #687690; transition: color 0.2s ease; }
.pdp-breadcrumb a:hover { color: #b01c0d; }
.pdp-breadcrumb .sep { margin: 0 8px; color: #c9d2de; }

/* ---------- Галерея ---------- */
.gallery-main-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #e6eaf0;
  background: #f5f7fa;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
#gallery-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
  cursor: crosshair;
  will-change: transform;
}
#gallery-main.zoomed { transform: scale(1.75); }

/* Заглушка галереи */
.gallery-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8794aa;
}
.gallery-ph svg { width: 52px; height: 52px; opacity: 0.55; }
.gallery-ph span {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8794aa;
}

.thumb {
  width: 76px;
  height: 76px;
  padding: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: #f5f7fa;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .gallery-ph { width: 100%; height: 100%; }
.thumb .gallery-ph svg { width: 22px; height: 22px; }
.thumb:hover { opacity: 1; }
.thumb-active { border-color: #b01c0d; opacity: 1; }

/* ---------- Количество ---------- */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9d2de;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}
.qty button {
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 700;
  color: #181b24;
  cursor: pointer;
  transition: background 0.2s ease;
}
.qty button:hover { background: #f5f7fa; }
.qty span {
  width: 48px;
  text-align: center;
  font-weight: 700;
}

/* ---------- Табы ---------- */
.tab-btn {
  position: relative;
  padding: 14px 4px;
  font-size: 15px;
  font-weight: 700;
  color: #687690;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.tab-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #b01c0d;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.tab-btn:hover { color: #181b24; }
.tab-btn-active { color: #181b24; }
.tab-btn-active::after { transform: scaleX(1); }

/* ---------- Характеристики ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.spec-grid > div {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #e6eaf0;
}
.spec-grid dt { color: #687690; font-size: 14px; }
.spec-grid dd { font-weight: 600; font-size: 14px; }
@media (min-width: 768px) {
  .spec-grid { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

