
/* =========================
   PRODUCT PAGE LAYOUT
========================= */
/* PRODUCT PAGE GRID FIX */
.product-page{
  max-width:1200px;
  margin:auto;
  padding:100px 24px 60px;
  display:grid;
  grid-template-columns:520px 1fr;
  gap:60px;
  align-items:start;
}
.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-wrap{
  display:flex;
  gap:16px;
}

.gallery-thumbs{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.gallery-thumbs img{
  width:70px;
  height:70px;
  object-fit:contain;
  border:1px solid #ddd;
  border-radius:10px;
  cursor:pointer;
  opacity:.6;
  transition:.2s;
}

.gallery-thumbs img.active,
.gallery-thumbs img:hover{
  opacity:1;
  border-color:#000;
}

.gallery-main{
  flex:1;
  height:480px;
  border:1px solid #eee;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8f8f8;
  overflow:hidden;
}

.gallery-main img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  transition:.4s;
}

.gallery-main:hover img{
  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 */


/* =========================
   PRODUCT INFO
========================= */
.product-info {
  padding-top: 32px;
}

.product-info h1{
  font-size:32px;
  margin-bottom:10px;
}

#productBrand{
  font-size:13px;
  text-transform:uppercase;
  color:#777;
  margin-bottom:6px;
}

.price{
  font-size:24px;
  font-weight:700;
}

#productMrp{
  text-decoration:line-through;
  color:#999;
  margin-left:10px;
}
.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;
}


#addToCartBtn{
  margin-top:24px;
  width:100%;
  padding:15px;
  border:none;
  border-radius:40px;
  background:linear-gradient(135deg,#ff416c,#ff4b2b);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:.3s;
  box-shadow:0 10px 25px rgba(0,0,0,.25);
}

#addToCartBtn:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 35px rgba(0,0,0,.35);
}

/* TRUST */
.product-trust {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--gray);
}

/* =========================
   RELATED PRODUCTS
========================= */
.related-section{
  padding:80px 24px;
  border-top:1px solid #eee;
}

.related-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:24px;
  max-width:1200px;
  margin:auto;
}

.related-card{
  background:#fff;
  border-radius:14px;
  padding:16px;
  border:1px solid #eee;
  transition:.3s;
}

.related-card:hover{
  transform:translateY(-5px);
  box-shadow:0 15px 35px rgba(0,0,0,.1);
}

.related-card img{
  width:100%;
  height:180px;
  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;
  }

  
}
@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; }
}
/* BRAND */
#productBrand {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 6px;
}

/* DELIVERY BOX */
.delivery-box{
  margin-top:24px;
  padding:18px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fafafa;
}
.delivery-box h4 {
  font-size: 15px;
  margin-bottom: 10px;
}

.delivery-input {
  display: flex;
  gap: 10px;
}

.delivery-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.delivery-input button {
  background: black;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.delivery-result {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
}

.delivery-result.success {
  color: green;
}

.delivery-result.warning {
  color: #c97a00;
}

.delivery-result.error {
  color: red;
}
/* Product Layout */

/* Product Info */
#productBrand{
  font-size:14px;
  color:#777;
  text-transform:uppercase;
  letter-spacing:1px;
}
#productName{
  font-size:28px;
  font-weight:600;
  margin:8px 0;
}
#productPrice{
  font-size:22px;
  font-weight:600;
}
#productMrp{
  text-decoration:line-through;
  color:#999;
  margin-left:10px;
}

/* Colors */
.color{
  width:28px;
  height:28px;
  border-radius:50%;
  display:inline-block;
  margin-right:8px;
  cursor:pointer;
  border:2px solid #ddd;
}
.color.active{
  border:2px solid #000;
}

/* Sizes */
.size{
  padding:8px 14px;
  border:1px solid #ddd;
  border-radius:6px;
  cursor:pointer;
  margin:5px 5px 0 0;
  font-size:13px;
}

.size.active{
  background:#000;
  color:#fff;
  border-color:#000;
}

.color{
  width:26px;
  height:26px;
  border-radius:50%;
  border:2px solid #ddd;
  cursor:pointer;
}

.color.active{
  border-color:#000;
  transform:scale(1.1);
}


/* Delivery */
.delivery-result{
  margin-top:10px;
  font-size:14px;
}
.delivery-result.success{
  color:green;
}
.delivery-result.error{
  color:red;
}

/* Responsive */
@media(max-width:768px){
  .product-wrapper{
    grid-template-columns:1fr;
  }
}

.related-card{
  border:1px solid #eee;
  border-radius:12px;
  overflow:hidden;
  cursor:pointer;
  transition:0.3s;
  background:#fff;
}
.related-card:hover{
  box-shadow:0 8px 20px rgba(0,0,0,0.08);
  transform:translateY(-4px);
}

.related-card img{
  width:100%;
  height:220px;
  object-fit:cover;
}

.card-body{
  padding:15px;
}

.brand{
  text-transform:uppercase;
  font-size:12px;
  color:#777;
}

.related-card h4{
  margin:5px 0;
  font-size:16px;
}

.category{
  font-size:13px;
  color:#999;
}

.desc{
  font-size:13px;
  margin:6px 0;
  color:#555;
  height:35px;
  overflow:hidden;
}

.meta{
  font-size:12px;
  color:#444;
  margin:4px 0;
}


.load-more-btn{
  display:block;
  margin:30px auto;
  padding:10px 25px;
  border:none;
  background:#000;
  color:#fff;
  border-radius:6px;
  cursor:pointer;
}
.load-more-btn:hover{
  background:#333;
}

@media(max-width:1024px){
  .product-page{
    grid-template-columns:1fr;
    gap:40px;
  }

  .gallery-wrap{
    flex-direction:column-reverse;
    align-items:center;
  }

  .gallery-main{
    height:360px;
  }

  .gallery-thumbs{
    flex-direction:row;
    justify-content:center;
  }
}

@media(max-width:480px){
  .gallery-main{
    height:280px;
  }

  .product-info h1{
    font-size:22px;
  }
}

