/* Product page layout — hydrates #mq-product-shell. */

/* Full-bleed white surface — the theme body bg is #131917 (dark navy) but
   product pages need a light surface so the dark type is readable. */
#mq-product-shell {
  background: #ffffff;
  color: #131917;
  padding: 60px 4vw;
  font-family: var(--font-body--family);
}
#mq-product-shell .mq-product {
  max-width: 1400px;
  margin: 0 auto;
}
.mq-product-loading {
  text-align: center;
  color: rgba(19, 25, 23, 0.6);
  padding: 60px 0;
}

.mq-product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: start;
}
@media (max-width: 899px) {
  .mq-product {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  #mq-product-shell { padding: 32px 20px; }
}

/* ---- Gallery --------------------------------------------------------- */
.mq-product__gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 20px;
}
@media (max-width: 899px) {
  .mq-product__gallery { position: static; }
}
.mq-product__main-image {
  aspect-ratio: 1 / 1;
  background: #f2f2f2;
  border-radius: 6px;
  overflow: hidden;
}
.mq-product__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .25s ease;
}
.mq-product__thumbs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.mq-product__thumb {
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .2s ease;
}
.mq-product__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.mq-product__thumb:hover { border-color: rgba(19, 25, 23, 0.3); }
.mq-product__thumb.is-active { border-color: #131917; }

/* ---- Info column ---------------------------------------------------- */
.mq-product__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #131917;
}
.mq-product__vendor {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: rgba(19, 25, 23, 0.55);
}
.mq-product__title {
  font-family: var(--font-heading--family);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: var(--font-heading--weight);
  line-height: 1.2;
  margin: 0;
}
.mq-product__price {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.mq-product__price-value {
  color: #131917;
}
.mq-product__price-sale {
  color: #F15A27;
}
.mq-product__price-compare {
  color: rgba(19, 25, 23, 0.55);
  text-decoration: line-through;
  font-size: 16px;
  font-weight: 400;
}

/* ---- Options / variant picker --------------------------------------- */
.mq-product__options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid rgba(19, 25, 23, 0.08);
  padding-top: 20px;
}
.mq-product__option {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mq-product__option-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(19, 25, 23, 0.85);
  padding: 0;
}
.mq-product__option-value {
  font-weight: 400;
  color: rgba(19, 25, 23, 0.65);
  margin-left: 4px;
}
.mq-product__option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mq-product__swatch {
  display: inline-block;
  position: relative;
  cursor: pointer;
}
.mq-product__swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mq-product__swatch span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid rgba(19, 25, 23, 0.2);
  border-radius: 4px;
  background: #ffffff;
  font-size: 13px;
  color: #131917;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
  user-select: none;
}
.mq-product__swatch:hover span { border-color: #131917; }
.mq-product__swatch.is-active span,
.mq-product__swatch input:checked + span {
  border-color: #131917;
  background: #131917;
  color: #ffffff;
}

/* ---- Buy row: qty + ATC --------------------------------------------- */
.mq-product__buy {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}
.mq-product__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(19, 25, 23, 0.25);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}
.mq-product__qty-btn {
  width: 44px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #131917;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.mq-product__qty-btn:hover { background: rgba(19, 25, 23, 0.05); }
/* Context selector `.mq-product__qty` bumps specificity to (0,2,0) so we
   beat Horizon base.css's `input:not([type=checkbox],[type=radio])` rule
   at (0,1,1) — otherwise it forces --color-input-background (dark) here
   and the "1" is invisible against a dark box. */
.mq-product__qty .mq-product__qty-input {
  width: 48px;
  height: 48px;
  border: 0;
  text-align: center;
  font-family: var(--font-body--family);
  font-size: 14px;
  color: #131917;
  background: #ffffff;
  outline: none;
  -moz-appearance: textfield;
}
.mq-product__qty-input::-webkit-outer-spin-button,
.mq-product__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.mq-product__atc {
  flex: 1 1 auto;
  padding: 0 24px;
  height: 48px;
  border: 0;
  background: #131917;
  color: #ffffff;
  border-radius: 6px;
  font-family: var(--font-body--family);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease;
}
.mq-product__atc:hover:not(:disabled) { background: #F15A27; }
.mq-product__atc:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.mq-product__atc[data-mq-busy] { opacity: 0.8; }

/* ---- Stock note + description --------------------------------------- */
.mq-product__stock {
  min-height: 18px;
  font-size: 13px;
  color: rgba(19, 25, 23, 0.7);
  margin: 0;
}
.mq-product__description {
  border-top: 1px solid rgba(19, 25, 23, 0.08);
  padding-top: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(19, 25, 23, 0.85);
}
.mq-product__description p { margin: 0 0 12px 0; }
.mq-product__description ul,
.mq-product__description ol { padding-left: 20px; margin: 0 0 12px 0; }
.mq-product__description a { color: #F15A27; }

/* ---- Skeleton + error ---------------------------------------------- */
.mq-skel {
  background: linear-gradient(90deg, #eeeeee 0%, #f6f6f6 50%, #eeeeee 100%);
  background-size: 200% 100%;
  animation: mq-skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}
.mq-skel--title { height: 32px; width: 65%; }
.mq-skel--price { height: 22px; width: 30%; }
.mq-skel--block { height: 60px; width: 100%; }
.mq-product__main-image.mq-skel { aspect-ratio: 1 / 1; }
@keyframes mq-skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mq-skel { animation: none; background: #f0f0f0; }
  .mq-product__main-image img,
  .mq-product__atc,
  .mq-product__swatch span,
  .mq-product__thumb { transition: none; }
}

.mq-product-error {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed rgba(19, 25, 23, 0.2);
  border-radius: 8px;
  color: rgba(19, 25, 23, 0.75);
}
.mq-product-error p { margin: 0 0 16px 0; font-size: 15px; }
.mq-product-error code {
  background: rgba(19, 25, 23, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}
.mq-product-error__retry {
  padding: 8px 20px;
  border: 1px solid #131917;
  background: transparent;
  color: #131917;
  border-radius: 4px;
  font-family: var(--font-body--family);
  font-size: 13px;
  cursor: pointer;
  margin-right: 8px;
}
.mq-product-error__retry:hover { background: #131917; color: #ffffff; }
.mq-product-error__back {
  color: #131917;
  font-size: 13px;
  text-decoration: underline;
}

/* ===== Mobile fixes (a11y audit item 1) =================================
   Quantity input bumped to 16px to prevent iOS Safari's auto-zoom on
   focus. Field is already 48×48, only the font changes on mobile. */
@media (max-width: 749px) {
  .mq-product__qty .mq-product__qty-input {
    font-size: 16px;
  }
}
