/* =========================================================================
   SUGANDH INK - Product Detail Page CSS
   Clean Editorial Product Details Layout
   ========================================================================= */

.product-main {
  padding-top: var(--nav-h);
  padding-bottom: 80px;
  background: var(--cream);
}

.product-details-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  margin-top: 24px;
  margin-bottom: 60px;
  align-items: start;
}

/* ── Left Side: Gallery ────────────────────────────────────────────────────── */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-image-wrap {
  aspect-ratio: 1 / 1.1;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

.main-image-wrap img {
  max-height: 80%;
  object-fit: contain;
  transition: filter 0.4s var(--ease);
}
.main-image-wrap:hover img {
  filter: brightness(1.03);
}

.thumb-gallery {
  display: flex;
  gap: 12px;
}

.thumb {
  width: 76px;
  height: 76px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: border-color 0.25s, transform 0.2s;
}

.thumb:hover, .thumb.active {
  border-color: var(--gold);
}

.thumb img {
  max-height: 85%;
  object-fit: contain;
}

/* ── Right Side: Specs ────────────────────────────────────────────────────── */
.product-specs {
  display: flex;
  flex-direction: column;
}

.specs-code {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.specs-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.rating-num {
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-weight: 400;
}

.specs-price {
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.specs-desc {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* Size Selection */
.selection-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 12px;
}

.specs-size-wrap {
  margin-bottom: 36px;
}

.size-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.size-pill {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  color: var(--ink-mid);
  background: transparent;
  transition: all 0.25s;
}

.size-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.size-pill.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.size-disclaimer {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-top: 12px;
  font-style: italic;
  opacity: 0.8;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Stepper and Add to Cart */
.purchase-wrap {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.stepper-cart-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  height: 48px;
  background: var(--white);
}

.stepper button {
  width: 44px;
  height: 100%;
  display: grid;
  place-content: center;
  font-size: 1.1rem;
  color: var(--ink-mid);
  transition: background 0.2s, color 0.2s;
}
.stepper button:hover {
  background: var(--cream-2);
  color: var(--ink);
}

.stepper span {
  width: 36px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.add-to-cart-btn {
  flex-grow: 1;
  height: 48px;
}

.whatsapp-checkout-btn {
  display: flex;
  width: 100%;
  height: 48px;
  font-size: 0.72rem;
  gap: 8px;
}

/* ── Tabs Section ─────────────────────────────────────────────────────────── */
.product-tabs-section {
  margin-bottom: 60px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 32px;
}

.tab-link {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-bottom: 12px;
  position: relative;
  transition: color 0.3s;
}

.tab-link:hover {
  color: var(--ink);
}

.tab-link::after {
  content: "";
  position: absolute;
  bottom: -17px;
  left: 0; right: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

.tab-link.active {
  color: var(--ink);
}
.tab-link.active::after {
  transform: scaleX(1);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s var(--ease);
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab contents */
.editorial-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 12px 0;
}

.story-col h5 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.story-col p {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.85;
}

/* Olfactory Profile Section */
.notes-pyramid-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  padding: 32px var(--px);
  background: var(--cream-2);
  border: 1px solid var(--cream-3);
  box-shadow: 0 10px 40px rgba(72,64,54,0.02);
}

.pyramid-tier {
  display: grid;
  grid-template-columns: 140px 1fr 240px;
  align-items: center;
  gap: 36px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.pyramid-tier:last-child {
  border-bottom: none;
}

.tier-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive-3);
}

.tier-bar-wrap {
  position: relative;
  height: 6px;
  background: var(--cream-3);
  overflow: hidden;
  border-radius: 3px;
}
.tier-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transform-origin: left;
  transform: scaleX(0.7); /* default scale */
}
.pyramid-tier:nth-child(1) .tier-bar-fill { transform: scaleX(0.85); background: var(--olive-2); }
.pyramid-tier:nth-child(2) .tier-bar-fill { transform: scaleX(0.65); background: var(--olive-3); }
.pyramid-tier:nth-child(3) .tier-bar-fill { transform: scaleX(0.95); background: var(--dark-olive); }

.tier-ingredients {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  text-align: right;
  line-height: 1.2;
}

.tier-desc {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--ink-3);
  grid-column: 2;
  margin-top: -12px;
  line-height: 1.4;
  font-weight: 300;
}

/* Tab: Reviews styling */
.product-reviews-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.reviews-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.product-reviews-layout .review-card {
  border: 1px solid var(--cream-3);
  background: var(--cream-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(72,64,54,0.01);
  transition: transform 0.4s var(--ease);
}
.product-reviews-layout .review-card:hover {
  transform: translateY(-2px);
}


/* Related section */
.related-products-section {
  border-top: 1px solid var(--border);
  padding-top: 60px;
}

/* Carousel rail for related products */
.product-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--cream-3);
}
.product-rail::-webkit-scrollbar { height: 3px; }
.product-rail::-webkit-scrollbar-track { background: var(--cream-3); }
.product-rail::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
.carousel-card {
  flex: 0 0 calc(20% - 16px);
  min-width: 200px;
  scroll-snap-align: start;
}
.carousel-card .pcard-wa {
  font-size: 0.65rem;
}
@media (max-width: 768px) {
  .carousel-card { flex: 0 0 calc(45% - 10px); min-width: 160px; }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .product-details-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .editorial-story {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 576px) {
  .stepper-cart-row {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .stepper {
    width: 100%;
    justify-content: space-between;
  }
  .stepper button {
    flex-grow: 1;
  }
  .stepper span {
    flex-grow: 2;
  }
  .add-to-cart-btn {
    width: 100%;
  }
}

/* =========================================================================
   Image Zoom Lens & Result
   ========================================================================= */
.img-zoom-lens {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1.5px solid var(--gold);
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  z-index: 5;
  display: none;
}

.img-zoom-result {
  position: absolute;
  top: 0;
  left: calc(100% + 20px);
  width: 320px;
  height: 320px;
  border: 1px solid var(--border);
  background-repeat: no-repeat;
  background-color: var(--white);
  z-index: 10;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.product-gallery {
  position: relative;
}

@media (max-width: 1100px) {
  .img-zoom-result {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 768px) {
  .img-zoom-lens,
  .img-zoom-result {
    display: none !important;
  }
}

/* =========================================================================
   Social Share Section
   ========================================================================= */
.social-share-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.share-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-mid);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.25s;
}

.share-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--cream-2);
}

.share-btn svg {
  display: block;
}

/* ── Perfume Precautions ─────────────────────────────────────────────────── */
.precautions-section {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.precautions-header {
  text-align: center;
  margin-bottom: 40px;
}

.precautions-header .section-title {
  margin-bottom: 12px;
}

.precautions-sub {
  font-size: 0.88rem;
  color: var(--ink-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.precautions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.precaution-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.3s var(--ease-out);
}

.precaution-card:hover {
  border-color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(155, 122, 66, 0.06);
}

.pc-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: grid;
  place-content: center;
  color: var(--gold);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pc-text {
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.7;
}

.pc-text strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 600px) {
  .precautions-grid {
    grid-template-columns: 1fr;
  }
  .precaution-card {
    padding: 14px 16px;
  }
}
