
/* =========================
   PRODUCT PAGE LAYOUT
========================= */
/* PRODUCT PAGE GRID FIX */
.product-page {
  max-width: 1400px;
  margin: auto;
  padding: 96px 24px 64px;
  display: grid;
  grid-template-columns: 560px 1fr;
  gap: 64px;
  align-items: center; /* 🔥 FIX */
}
.product-card{
  position:relative;
  overflow:hidden;
}

.product-card .details{
  opacity:.85;
  font-size:13px;
  line-height:1.4;
}

.product-card:hover .details{
  opacity:1;
}

.product-card img{
  transition:transform .4s ease;
}
.product-card:hover img{
  transform:scale(1.08);
}


/* =========================
   ADVANCED GALLERY
========================= */
/* MEDIA FIX */
.product-media {
  display: flex;
  align-items: center;     /* 🔥 FIX */
  justify-content: center;
}


/* THUMBNAILS */
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  opacity: .6;
  transition: all .25s ease;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
  opacity: 1;
  border-color: #000;
  transform: scale(1.06);
}

/* MAIN IMAGE */
/* MAIN IMAGE FIX */
.gallery-main {
  width: 520px;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ZOOM EFFECT */
.gallery-main:hover img {
  transform: scale(1.08);
  cursor: zoom-in;
}
/* GALLERY WRAP FIX */
.gallery-wrap {
  display: flex;
  gap: 16px;
  align-items: center;     /* 🔥 FIX */
}

/* =========================
   PRODUCT INFO
========================= */
.product-info {
  padding-top: 32px;
}

.product-info h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}

.product-desc {
  font-size: 14px;
  color: var(--gray);
  max-width: 460px;
  margin-bottom: 28px;
}

/* PRICE + CTA */
.product-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 26px;
}

.price {
  font-size: 26px;
  font-weight: 700;
}

#addToCartBtn {
  padding: 14px 34px;
  border-radius: 30px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .25s ease;
}

#addToCartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* TRUST */
.product-trust {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--gray);
}

/* =========================
   RELATED PRODUCTS
========================= */
.related-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 36px;
}

.related-grid {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 24px;
}

.related-card {
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: all .25s ease;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.related-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 12px;
}

/* =========================
   MOBILE OPTIMIZATION
========================= */
@media (max-width: 1024px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-media {
    flex-direction: column-reverse;
    align-items: center;
  }

  .gallery-thumbs {
    flex-direction: row;
    justify-content: center;
  }

  .gallery-main {
    width: 100%;
    height: 380px;
  }

  .product-info {
    text-align: center;
    padding-top: 0;
  }

  .product-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .product-trust {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .gallery-main {
    height: 300px;
  }

  .gallery-thumbs img {
    width: 56px;
    height: 56px;
  }

  .product-info h1 {
    font-size: 24px;
  }

  .price {
    font-size: 22px;
  }
}
@media (max-width: 768px) {
  .product-page {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .product-media {
    flex-direction: column;
  }

  .gallery-wrap {
    flex-direction: column-reverse;
  }

  .gallery-main {
    width: 100%;
    height: 340px;
  }

  .gallery-thumbs {
    flex-direction: row;
    justify-content: center;
  }
}

.product-page > *{
  animation:fadeUp .6s ease both;
}
@keyframes fadeUp{
  from{opacity:0;transform:translateY(24px)}
  to{opacity:1;transform:none}
}
.product-price { font-size: 26px; font-weight: 700; }

.gallery-main{
  cursor:zoom-in;
}
.gallery-main:hover{
  box-shadow:0 40px 100px rgba(0,0,0,.18);
}
.product-info h1{
  letter-spacing:-.02em;
}
.product-info h1::after{
  content:"";
  display:block;
  width:42px;
  height:3px;
  background:#000;
  margin-top:10px;
}
.price{
  position:relative;
}
.price::after{
  content:"";
  position:absolute;
  left:0;bottom:-6px;
  width:100%;
  height:2px;
  background:linear-gradient(90deg,#000,transparent);
}
#addToCartBtn{
  background:linear-gradient(135deg,#000,#333);
}
#addToCartBtn:hover{
  background:linear-gradient(135deg,#111,#000);
}
#addToCartBtn:active{
  transform:scale(.96);
}
.product-trust span{
  background:#f5f5f5;
  padding:10px 14px;
  border-radius:999px;
  font-weight:600;
}
/* DESCRIPTION */
#productDesc {
  font-size: 15px;
  color: #555;
  margin: 10px 0 6px;
}

#longDesc {
  font-size: 14px;
  color: #777;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* PRICE */
#productMrp {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  margin-right: 8px;
}

/* SIZES */
#sizes {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

#sizes .size {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

#sizes .size:hover {
  border-color: #000;
}

/* COLORS */
#colors {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

#colors .color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #ccc;
  cursor: pointer;
}

#colors .color:hover {
  border-color: #000;
}
#colors .color.active {
  outline: 3px solid #000;
  transform: scale(1.1);
}
.color.active, .size.active {
  border: 2px solid #000;
}

#sizes .size.active {
  border: 2px solid #000;
  background: #000;
  color: #fff;
}
@media (max-width: 360px) {
  .gallery-main {
    height: 260px;
  }
}
@media (hover: none) {
  .gallery-main { cursor: default; }
}
