:root {
  --product-split-ratio: 50%;
}

/* ── LAYOUT ────────────────────────────────────── */
.product-page-wrapper {
  display: flex;
  flex-direction: column;
  /*padding-top: 86px;*/
  padding-top: 40px;
}

.product-main-section {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
}

.p-quantity-message {
  display: none;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.p-quantity-message.is-error {
  display: block;
  color: #b42318;
}

@media (max-width: 1024px) {
  .product-main-section {
    flex-direction: column;
  }
}

/* ── LEFT: STICKY GALLERY ────────────────────────── */
.product-gallery-side {
  width: var(--product-split-ratio);
  height: calc(100vh - 86px);
  position: sticky;
  top: 86px;
  background: #F8F8F8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.p-variations {
  margin-bottom: 24px;
}

.p-variation-group {
  padding-top: 10px !important;
}

.variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variation-btn {
  padding: 10px 20px;
  border: 1px solid #ddd;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #555;
}

.variation-btn:hover {
  border-color: #111;
  color: #111;
}

.variation-btn.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.variation-btn.has-error {
  border-color: #e04f4f;
  color: #e04f4f;
}

@media (max-width: 1024px) {
  .product-gallery-side {
    width: 100%;
    height: 70vh;
    position: relative;
    top: 0;
  }
}

.gallery-main-display {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main-display>#main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  will-change: opacity;
}

/* Thumbnails Overlay */
.gallery-thumbs-overlay {
  position: absolute;
  bottom: 30px;
  left: 30px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.thumb-item {
  width: 60px;
  height: 60px;
  background: #fff;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item.active,
.thumb-item:hover {
  opacity: 1;
  border-color: #000;
}

/* ── RIGHT: SCROLLING INFO ──────────────────────── */
.product-info-side {
  width: var(--product-split-ratio);
  padding: 80px 8% 80px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .product-info-side {
    width: 100%;
    padding: 40px 5%;
  }
}

.p-breadcrumb {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
  margin-bottom: 40px;
}

.p-breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.p-breadcrumb a:hover {
  color: #111;
}

.p-category {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 10px;
  display: block;
}

.p-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 15px;
  color: #111;
}

.p-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 30px;
  font-style: italic;
}

.p-price-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 40px;
}

.p-price {
  font-family: var(--font-serif);
  font-size: 32px;
  color: #111;
}

.p-price-old {
  font-size: 18px;
  color: #bbb;
  text-decoration: line-through;
  display: none;
}

/* Buy Box */
.p-buy-box {
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.p-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  width: fit-content;
}

.qty-btn {
  width: 45px;
  height: 45px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  -webkit-appearance: none;
  appearance: none;
  color: var(--black);
}

.qty-input {
  width: 40px;
  text-align: center;
  border: none;
  outline: none;
  -moz-appearance: textfield;
  -webkit-appearance: none;
  appearance: none;
  color: var(--black);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-add-cart {
  width: 100%;
  background: #111;
  color: #fff;
  padding: 20px;
  border: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-add-cart:hover {
  background: #333;
}

.btn-add-cart.is-loading {
  cursor: not-allowed !important;
  user-select: none;
  opacity: 0.7;
}

/* ── PAIR IT WITH ────────────────────────────────── */
.p-pair-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.p-pair-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
}

.pair-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 15px;
  scrollbar-width: none;
}

.pair-slider::-webkit-scrollbar {
  display: none;
}

.pair-item {
  min-width: 160px;
  text-decoration: none;
  color: #111;
}

.pair-img {
  width: 100%;
  aspect-ratio: 1;
  background: #f7f7f7;
  margin-bottom: 10px;
  padding: 15px;
}

.pair-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pair-name {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
}

.pair-price {
  font-size: 11px;
  color: #888;
}

/* ── ACCORDIONS ──────────────────────────────────── */
.p-accordions {
  margin-top: 40px;
}

.acc-item {
  border-bottom: 1px solid #eee;
}

.acc-trigger {
  width: 100%;
  padding: 25px 0;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  text-align: left;
  color: var(--black);
}

.acc-icon {
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.3s;
  color: var(--black);
}

.acc-item.open .acc-icon {
  transform: rotate(45deg);
}

.acc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.acc-item.open .acc-content {
  max-height: 500px;
  padding-bottom: 30px;
}

.acc-inner {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

/* ── BOTTOM SECTIONS ────────────────────────────── */
.product-bottom-sections {
  padding: 120px 0 120px;
  background: #fff;
  border-top: 1px solid #eee;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 5%;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
}

.shop-scroll-wrapper {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 30px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.shop-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.shop-scroll-wrapper .shop-card {
  flex: 0 0 calc(25% - 1.5px);
  scroll-snap-align: start;
  opacity: 1 !important;
  transform: none !important;
  border: none;
}

@media (max-width: 1200px) {
  .shop-scroll-wrapper .shop-card {
    flex: 0 0 calc(33.333% - 2px);
  }
}

@media (max-width: 900px) {
  .shop-scroll-wrapper .shop-card {
    flex: 0 0 calc(50% - 2px);
    min-width: 240px;
  }
}

@media (max-width: 580px) {
  .shop-scroll-wrapper .shop-card {
    flex: 0 0 calc(80% - 2px);
    min-width: 200px;
  }
}


/* ==========================================================
   PRODUCT ADD-TO-CART ASYNC STATES
   ========================================================== */

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.btn-add-cart::after {
  display: inline-block;
  width: 0;
  height: 16px;
  flex: 0 0 auto;
  overflow: hidden;
  opacity: 0;
  content: "";
  transform: scale(0.7);
  transition:
    width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-add-cart.is-loading,
.btn-add-cart.is-success {
  pointer-events: none;
}

.btn-add-cart.is-loading::after {
  width: 16px;
  opacity: 1;
  border: 1px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  transform: scale(1);
  animation: academieButtonSpin 0.82s linear infinite;
}

.btn-add-cart.is-success::after {
  width: 16px;
  height: auto;
  overflow: visible;
  opacity: 1;
  content: "✓";
  border: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  transform: scale(1);
  animation: academieButtonConfirm 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.btn-add-cart.is-error {
  animation: academieButtonNudge 280ms ease both;
}

@keyframes academieButtonSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes academieButtonConfirm {
  from {
    opacity: 0;
    transform: scale(0.65) translateY(2px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes academieButtonNudge {

  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-3px);
  }

  70% {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .btn-add-cart.is-loading::after,
  .btn-add-cart.is-success::after,
  .btn-add-cart.is-error {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================
   RELATED PRODUCTS — PRICE + STOCK
   ========================================================== */

.product-bottom-sections .shop-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-bottom-sections .shop-card__price {
  display: block !important;
  margin-top: 0 !important;
  margin-bottom: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #111;
}

.product-bottom-sections .shop-card__price del {
  color: #777;
  opacity: 1;
  margin-right: 5px;
  font-weight: 400;
}

.product-bottom-sections .shop-card__price ins {
  color: #111;
  text-decoration: none;
  font-weight: 500;
}

.product-bottom-sections .shop-card__stock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #999;
}

.product-bottom-sections .shop-card__stock::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ccc;
}

.product-bottom-sections .shop-card__stock.is-out-of-stock {
  color: #999;
}

.product-bottom-sections .shop-card__stock.is-out-of-stock::before {
  background: #999;
}