:root {
  --product-max: 1320px;
  --product-text: #121212;
  --product-muted: #6b7280;
  --product-line: #e7e7e7;
  --product-soft: #f7f7f8;
  --product-card: #ffffff;
  --product-accent: #111111;
  --product-accent-2: #1f2937;
  --product-shadow: 0 18px 40px rgba(17, 17, 17, 0.06);
  --product-radius-xl: 24px;
  --product-radius-lg: 18px;
  --product-radius-md: 14px;
  --product-radius-sm: 10px;
}

.product-page.container {
  max-width: var(--product-max);
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 40px) 56px;
  color: var(--product-text);
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

.product-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.product-gallery,
.product-info {
  min-width: 0;
}

.product-gallery {
  position: sticky;
  top: 24px;
}

.product-main-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, #fcfcfc 0%, #f4f4f5 100%);
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius-xl);
  overflow: hidden;
  box-shadow: var(--product-shadow);
}

.product-main-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  background: transparent;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.thumb-button {
  padding: 0;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius-md);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.thumb-button:hover {
  transform: translateY(-2px);
  border-color: #c8c8cb;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.thumb-button.active-thumb {
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.thumb-button img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-archived .product-main-image img,
.gallery-archived .thumb-button img {
  filter: blur(5px) grayscale(0.08);
  user-select: none;
}

.gallery-archived .product-main-image img {
  transform: scale(1.02);
}

.gallery-archived .thumb-button {
  overflow: hidden;
}

.gallery-archived .thumb-button img {
  transform: scale(1.04);
}

.product-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--product-muted);
  font-size: 0.92rem;
}

.product-breadcrumbs a {
  color: var(--product-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.product-breadcrumbs a:hover {
  color: var(--product-accent);
}

.product-head h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--product-accent);
}

.product-error-message {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1f1;
  border: 1px solid #f2c6c6;
  color: #a61d24;
  font-size: 0.95rem;
}

.product-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 18px;
}

.price {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
}

.compare-at {
  font-size: 1rem;
  color: #7b7b82;
  text-decoration: line-through;
}

.compare-at.is-hidden {
  display: none;
}

.short-desc {
  margin: 0 0 22px;
  font-size: 1rem;
  line-height: 1.7;
  color: #47474f;
  max-width: 58ch;
}

.product-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius-xl);
  background: var(--product-card);
  box-shadow: var(--product-shadow);
}

.option-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-head label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--product-accent);
  letter-spacing: 0.01em;
}

.option-selected {
  font-size: 0.9rem;
  color: var(--product-muted);
}

.option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  position: relative;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #d7d7db;
  border-radius: 999px;
  background: #fff;
  color: #1f1f25;
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.swatch:hover span {
  transform: translateY(-1px);
  border-color: #a9a9af;
}

.swatch input:checked + span {
  border-color: #111;
  background: #111;
  color: #fff;
}

.qty-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qty-row label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--product-accent);
}

.quantity-selector {
  display: inline-flex;
  align-items: center;
  width: 144px;
  height: 48px;
  border: 1px solid #d8d8dc;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.qty-btn {
  width: 46px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.qty-btn:hover {
  background: #f4f4f5;
}

.qty-input {
  width: 52px;
  height: 100%;
  border: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  outline: none;
  background: transparent;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn.add-to-cart {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #191919 0%, #050505 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(17, 17, 17, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn.add-to-cart:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(17, 17, 17, 0.24);
}

.btn.add-to-cart:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.add-to-cart.is-loading {
  opacity: 0.7;
}

.btn.add-to-cart .material-symbols-outlined {
  font-size: 1.3rem;
  line-height: 1;
}

.login-hint {
  margin: 18px 0 0;
  padding: 18px 20px;
  background: #f8f8f9;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius-lg);
  color: #47474f;
  line-height: 1.6;
}

.login-hint a {
  color: #111;
  font-weight: 700;
  text-decoration: underline;
}

.product-inline-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.product-inline-feedback.is-success {
  background: #eefaf1;
  border: 1px solid #bfe5c9;
  color: #17643a;
}

.product-inline-feedback.is-error {
  background: #fff1f1;
  border: 1px solid #f2c6c6;
  color: #a61d24;
}

.product-accordion {
  margin-top: 22px;
  border-top: 1px solid var(--product-line);
}

.acc-item {
  border-bottom: 1px solid var(--product-line);
}

.acc-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  cursor: pointer;
  color: #111;
}

.acc-item summary::-webkit-details-marker {
  display: none;
}

.acc-content {
  height: 0;
  overflow: hidden;
  transition: height 0.28s ease;
}

.acc-inner {
  padding: 0 0 18px;
  color: #47474f;
  line-height: 1.8;
}

.product-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #111;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.26);
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.product-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .product-wrapper {
    grid-template-columns: 1fr;
  }

  .product-gallery {
    position: static;
  }

  .product-main-image {
    aspect-ratio: auto;
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .product-page.container {
    padding: 18px 16px 40px;
  }

  .product-head h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .product-main-image {
    min-height: auto;
    max-height: 58vh;
  }

  .product-main-image img {
    width: 100%;
    max-width: 100%;
    height: 58vh;
    object-fit: contain;
  }

  .product-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 10px;
  }

  .product-form {
    padding: 16px;
    border-radius: 20px;
  }

  .quantity-selector {
    width: 132px;
    height: 46px;
  }

  .product-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
    min-width: 0;
  }
}
.product-inline-feedback {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.product-inline-feedback.is-success {
  background: #eef8f0;
  border: 1px solid #b9dec0;
  color: #1f6a35;
}

.product-inline-feedback.is-error {
  background: #fff1f1;
  border: 1px solid #efc2c2;
  color: #a02121;
}

.compare-at.is-hidden {
  display: none;
}

.acc-content {
  height: 0;
  overflow: hidden;
  transition: height 0.28s ease;
}