@import url(reset.css);
@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.breadcrumbs {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --txt: #0b1020; /* основной текст */
  --muted: #66708f; /* вторичный текст */
  --brand: #3a64ff; /* бренд 1 */
  --brand-2: #8b5cf6; /* бренд 2 */
  --success: #22c55e; /* статус: в наличии */
  --warn: #f59e0b; /* статус: мало */
  --danger: #9aa3b2; /* статус: нет на складе */
  --card: rgba(255, 255, 255, 0.72); /* прозрачная карточка */
  --edge: rgba(10, 15, 35, 0.1); /* тонкая рамка */
  --shadow: 0 30px 70px rgba(12, 16, 32, 0.14);
  --radius-xl: 26px;
  --radius: 18px;
  --radius-sm: 12px;
  --bg: #f6f7fb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --txt: #eef2ff;
    --muted: #b6bfde;
    --card: rgba(255, 255, 255, 0.06);
    --edge: rgba(255, 255, 255, 0.12);
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    --bg: #0c1124;
  }
}
body {
  margin: 0;
  color: var(--txt);
  background:
    radial-gradient(
      1200px 800px at 15% -10%,
      rgba(124, 156, 248, 0.12),
      transparent
    ),
    radial-gradient(
      1400px 900px at 110% 10%,
      rgba(155, 110, 243, 0.12),
      transparent
    ),
    var(--bg);
  padding: 28px;
}

/* ===== HERO WRAPPER ===== */
.ph {
  width: min(1200px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 28px;
  grid-template-columns: 1.05fr 1fr;
  align-items: start;
  background:
    linear-gradient(180deg, rgba(124, 156, 248, 0.1), transparent), var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: clamp(14px, 2.2vw, 20px);
  position: relative;
  overflow: clip;
  margin: 30px auto;
}
@media (max-width: 980px) {
  .ph {
    grid-template-columns: 1fr;
  }
}

/* декоративная линия */
.ph::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0.25;
}

/* ===== MEDIA/GALLERY ===== */
.ph-media {
  position: relative;
  padding: 14px;
  height: 550px;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.25);
}
@media (prefers-color-scheme: dark) {
  .ph-media {
    background: rgba(255, 255, 255, 0.05);
  }
}
.ph-stage {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  background: #fff;
}
@media (prefers-color-scheme: dark) {
  .ph-stage {
    background: #0e1326;
  }
}
.ph-stage img {
  position: relative;
  z-index: 1;
  transition: 0.6s ease-in-out;
}
.ph-stage:hover img {
  transform: scale(1.02);
}

/* Плавающие теги поверх изображения — НЕ исчезают при hover */
.tag-floating {
  position: absolute;
  left: 18px;
  top: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}
.tag {
  backdrop-filter: blur(6px);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.88);
}
@media (prefers-color-scheme: dark) {
  .tag {
    background: rgba(255, 255, 255, 0.08);
  }
}
.tag.area {
  font-size: 14px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.88);
}
@media (prefers-color-scheme: dark) {
  .status {
    background: rgba(255, 255, 255, 0.08);
  }
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status.ok .dot {
  background: var(--success);
}
.status.low .dot {
  background: var(--warn);
}
.status.out .dot {
  background: var(--danger);
}

.ph-nav {
  position: absolute;
  inset-block: 0;
  inset-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}
.ph-arrow {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.1s;
}
@media (prefers-color-scheme: dark) {
  .ph-arrow {
    background: rgba(255, 255, 255, 0.08);
  }
}
.ph-arrow:active {
  transform: translateY(1px);
}

.ph-thumbs {
  display: grid;
  grid-auto-flow: column;
  gap: 20px;
  overflow: auto;
  margin-top: 10px;
  padding: 10px 65px;
}
.ph-thumb {
  width: 92px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--edge);
  cursor: pointer;
  opacity: 0.82;
  transition:
    opacity 0.2s,
    outline 0.2s;
  background: #fff;
}
@media (prefers-color-scheme: dark) {
  .ph-thumb {
    background: #0e1326;
  }
}
.ph-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph-thumb[aria-current="true"] {
  outline: 2px solid var(--brand);
  opacity: 1;
}

/* ===== INFO SIDE ===== */
.ph-info {
  display: grid;
  gap: 16px;
}

.ph-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
}

.ph-title {
  display: flex;
  align-items: flex-start;
  gap: 12px 14px;
  flex-wrap: wrap;
}
.ph-title h1 {
  --g: conic-gradient(
    from 220deg at 50% 50%,
    var(--brand),
    var(--brand-2),
    var(--brand)
  );
  margin: 0;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  background: var(--g);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 20px rgba(58, 100, 255, 0.25));
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.price {
  position: relative;
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* лёгкий "shine" эффект */
.price::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 80%
  );
  mix-blend-mode: screen;
  transform: translateX(-120%);
  animation: shine 3.5s linear infinite;
}
@keyframes shine {
  to {
    transform: translateX(120%);
  }
}

.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.75);
}
@media (prefers-color-scheme: dark) {
  .pill {
    background: rgba(255, 255, 255, 0.08);
  }
}

.kf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .kf-grid {
    grid-template-columns: 1fr;
  }
}
.kf {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 14px 16px;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .kf {
    background: rgba(255, 255, 255, 0.06);
  }
}
.kf::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(58, 100, 255, 0.12),
    transparent
  );
}
.kf-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.kf-value {
  font-weight: 700;
  margin-top: 6px;
  font-size: 16px;
}

.ph-cta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 2px;
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.85);
}
@media (prefers-color-scheme: dark) {
  .qty {
    background: rgba(255, 255, 255, 0.08);
  }
}
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .qty button {
    background: rgba(255, 255, 255, 0.1);
  }
}
.qty input {
  width: 44px;
  height: 28px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  color: var(--txt);
}

.btn-cart {
  position: relative;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.09s ease;
  transition: 0.5s ease-in-out;
}
.btn-cart::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.15;
}
.btn-cart:active {
  transform: translateY(1px);
}
.btn-cart:hover {
  opacity: 0.8;
  transform: scale(1.03);
}

.ph-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.ph-meta .item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* SKU перенесён в meta справа, как кликабельный бейдж */
.sku-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
}
@media (prefers-color-scheme: dark) {
  .sku-chip {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Sticky CTA для мобилок */
.sticky-cta {
  display: none;
}
@media (max-width: 720px) {
  .sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    border-top: 1px solid var(--edge);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
  }
  .sticky-price {
    font-weight: 900;
    font-size: 18px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .sticky-cta .btn-cart {
    height: 44px;
    padding-inline: 16px;
  }
  body {
    padding-bottom: 84px;
  }
}

/* Toast */
.ph-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* ===================== XXL (>= 1800px) ===================== */
@media (min-width: 1800px) {
  .ph {
    max-width: 1500px;
    gap: 40px;
    padding: 26px;
  }
  .ph-stage {
    aspect-ratio: 16 / 9;
  }
  .ph-title h1 {
    font-size: 48px;
  }
  .price {
    font-size: 52px;
  }
  .ph-thumb {
    width: 128px;
    height: 96px;
  }
}

/* ===================== XL (1600–1799) ===================== */
@media (min-width: 1600px) and (max-width: 1799px) {
  .ph {
    max-width: 1400px;
    gap: 36px;
  }
  .ph-title h1 {
    font-size: 44px;
  }
  .price {
    font-size: 48px;
  }
  .ph-thumb {
    width: 116px;
    height: 88px;
  }
}

/* ===================== 1440–1599 ===================== */
@media (min-width: 1440px) and (max-width: 1599px) {
  .ph {
    gap: 32px;
  }
  .ph-thumb {
    width: 104px;
    height: 80px;
  }
}

/* ===================== <= 1366 ===================== */
@media (max-width: 1366px) {
  .ph {
    gap: 26px;
  }
  .ph-title h1 {
    font-size: 38px;
  }
  .price {
    font-size: 42px;
  }
  .ph-thumbs {
    gap: 18px;
    padding: 10px 50px;
  }
}

/* ===================== <= 1280 ===================== */
@media (max-width: 1280px) {
  .ph {
    gap: 24px;
    padding: 16px;
  }
  .ph-title h1 {
    font-size: 34px;
  }
  .price {
    font-size: 38px;
  }
  .ph-stage {
    aspect-ratio: 16 / 11;
  }
  .ph-arrow {
    width: 44px;
    height: 44px;
  }
  .ph-thumb {
    width: 96px;
    height: 72px;
  }
}

/* ===================== <= 1140 ===================== */
@media (max-width: 1140px) {
  .ph {
    grid-template-columns: 1fr 0.95fr;
  }
  .ph-info {
    gap: 14px;
  }
  .kf-grid {
    gap: 10px;
  }
  .tag-floating {
    left: 16px;
    top: 16px;
  }
}

/* ===================== <= 1024 ===================== */
@media (max-width: 1024px) {
  .ph {
    gap: 22px;
  }
  .ph-title h1 {
    font-size: 32px;
  }
  .price {
    font-size: 36px;
  }
  .ph-thumb {
    width: 90px;
    height: 66px;
  }
}

/* ===================== <= 980 (переход в 1 колонку) ===================== */
@media (max-width: 980px) {
  .ph {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .ph-media {
    padding: 12px;
  }
  .ph-thumbs {
    padding: 8px 20px;
  }
  .ph-stage {
    aspect-ratio: 4 / 3;
  }
}

/* ===================== <= 900 ===================== */
@media (max-width: 900px) {
  .ph-title h1 {
    font-size: 30px;
  }
  .price {
    font-size: 34px;
  }
  .tag-floating .tag.area {
    font-size: 13px;
  }
  .ph-thumb {
    width: 84px;
    height: 62px;
  }
}

/* ===================== <= 860 ===================== */
@media (max-width: 860px) {
  .ph {
    border-radius: 22px;
  }
  .ph::before {
    height: 6px;
  }
}

/* ===================== <= 820 ===================== */
@media (max-width: 820px) {
  .ph-kicker {
    font-size: 10px;
  }
  .kf {
    border-radius: 14px;
    padding: 12px 14px;
  }
  .kf-value {
    font-size: 15.5px;
  }
}

/* ===================== <= 768 ===================== */
@media (max-width: 768px) {
  .ph-cta {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .qty {
    justify-content: space-between;
    padding: 8px 10px;
  }
  .btn-cart {
    height: 46px;
  }
  .ph-meta {
    gap: 12px;
  }
  .ph-stage {
    aspect-ratio: 1 / 1;
  }
}

/* ===================== <= 720 ===================== */
@media (max-width: 720px) {
  .ph-title h1 {
    font-size: 28px;
  }
  .price {
    font-size: 32px;
  }
  .ph-thumb {
    width: 80px;
    height: 60px;
  }
}

/* ===================== <= 680 ===================== */
@media (max-width: 680px) {
  .kf-grid {
    grid-template-columns: 1fr;
  }
  .ph-meta {
    font-size: 13.5px;
  }
}

/* ===================== <= 640 ===================== */
@media (max-width: 640px) {
  .ph {
    gap: 16px;
  }
  .ph-arrow {
    width: 42px;
    height: 42px;
  }
  .ph-meta .item {
    gap: 6px;
  }
  .sku-chip {
    padding: 6px 9px;
  }
}

/* ===================== <= 600 ===================== */
@media (max-width: 600px) {
  .tag,
  .status {
    padding: 6px 10px;
  }
  .status .txt {
    font-size: 13px;
  }
  .dot {
    width: 9px;
    height: 9px;
  }
  .ph-thumb {
    width: 76px;
    height: 58px;
  }
}

/* ===================== <= 560 ===================== */
@media (max-width: 560px) {
  .ph {
    border-radius: 20px;
  }
  .ph-title h1 {
    font-size: 26px;
  }
  .price {
    font-size: 30px;
  }
  .kf-grid {
    gap: 10px;
  }
}

/* ===================== <= 520 ===================== */
@media (max-width: 520px) {
  .ph {
    padding: 12px;
  }
  .ph-meta {
    font-size: 13px;
  }
  .qty input {
    width: 42px;
  }
}

/* ===================== <= 480 ===================== */
@media (max-width: 480px) {
  .ph-kicker {
    display: none;
  }
  .tag-floating {
    left: 12px;
    top: 12px;
  }
  .tag.area {
    font-size: 12px;
  }
  .ph-thumb {
    width: 70px;
    height: 54px;
  }
  .ph-arrow {
    width: 38px;
    height: 38px;
  }
}

/* ===================== <= 440 ===================== */
@media (max-width: 440px) {
  .ph-title h1 {
    font-size: 24px;
  }
  .price {
    font-size: 28px;
  }
  .kf-value {
    font-size: 15px;
  }
}

/* ===================== <= 400 ===================== */
@media (max-width: 400px) {
  .ph {
    gap: 14px;
  }
  .ph-thumb {
    width: 66px;
    height: 50px;
  }
  .kf {
    padding: 10px 12px;
    border-radius: 12px;
  }
  .kf-label {
    font-size: 11px;
  }
}

/* ===================== <= 380 ===================== */
@media (max-width: 380px) {
  .ph {
    padding: 10px;
  }
  .ph-arrow {
    width: 34px;
    height: 34px;
  }
  .ph-thumbs {
    gap: 10px;
    padding: 6px 10px;
  }
}

/* ===================== <= 360 ===================== */
@media (max-width: 360px) {
  .ph-title h1 {
    font-size: 22px;
  }
  .price {
    font-size: 26px;
  }
  .ph-thumb {
    width: 60px;
    height: 46px;
  }
}

/* ===================== <= 340 ===================== */
@media (max-width: 340px) {
  .ph {
    border-radius: 18px;
  }
  .qty button {
    width: 26px;
    height: 26px;
  }
  .qty input {
    width: 38px;
  }
}

/* ===================== Высота экрана ===================== */
@media (max-height: 820px) {
  .ph {
    padding: 14px;
  }
  .ph-stage {
    aspect-ratio: 4 / 3;
  }
}
@media (max-height: 700px) {
  .ph-stage {
    aspect-ratio: 1 / 1;
  }
  .ph-thumbs {
    padding: 6px 14px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .ph-stage {
    aspect-ratio: 16 / 9;
  }
  .ph-thumbs {
    gap: 8px;
    padding: 6px 10px;
  }
}

/* ===================== Тач/плотность/доступность ===================== */
@media (pointer: coarse) {
  .ph-arrow {
    width: 52px;
    height: 52px;
  } /* легче нажимать большим пальцем */
  .ph-thumb {
    margin: 0 2px;
  }
}
@media (min-resolution: 2dppx) {
  .ph-arrow {
    border-width: 1px;
  } /* четче на ретине */
}
@media (prefers-reduced-motion: reduce) {
  .price::after {
    animation: none;
  }
  .ph-stage img {
    transition: none;
  }
}

/* ===================== Safe-area (iOS вырез) ===================== */
@supports (padding: max(0px)) {
  .sticky-cta {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
