/* Modern product page styles */
:root {
  --primary:#8d4e2f;
  --dark:#1f2937;
  --light:#f7f7f7;
  --radius:12px;
}
body.product-body{
  background:var(--light);
}
.product-hero{
  max-width:1200px;margin:auto;padding:2rem 1rem;display:grid;gap:2rem;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
}
.gallery-main{position:relative;background:#fff;border-radius:var(--radius);overflow:hidden;box-shadow:0 2px 10px rgb(0 0 0 / .07);}
.gallery-main img{width:100%;display:block;transition:transform .3s ease;cursor:zoom-in;}
.gallery-main img.zoomed{transform:scale(2);cursor:zoom-out;}
.gallery-thumb-row{display:flex;gap:.5rem;margin-top:.75rem;overflow-x:auto;}
.gallery-thumb-row img{width:60px;height:60px;object-fit:cover;border-radius:var(--radius);cursor:pointer;opacity:.7;transition:opacity .2s;}
.gallery-thumb-row img:hover{opacity:1;}
.product-details{background:#fff;padding:2rem;border-radius:var(--radius);box-shadow:0 2px 10px rgb(0 0 0 / .05);position:relative;}
.product-details h1{font-size:1.75rem;font-weight:600;color:var(--dark);margin-bottom:.75rem;}
.price-wrapper{display:flex;align-items:center;gap:1rem;margin:1rem 0;font-size:1.5rem;font-weight:700;color:var(--primary);}
.price-wrapper .old{font-size:1rem;font-weight:400;color:#9ca3af;text-decoration:line-through;}
.availability{font-weight:500;margin-bottom:1rem;}
.order-btn{display:flex;align-items:center;gap:.5rem;background:#000;color:#fff;border:none;padding:.75rem 1.25rem;border-radius:var(--radius);font-size:1rem;font-weight:600;cursor:pointer;transition:background .2s;}
.order-btn:hover{background:#333;}

.product-description{line-height:1.6;color:#374151;margin:1rem 0;}
.read-toggle{color:var(--primary);cursor:pointer;font-weight:500;}
.related-section{background:#fff;padding:2rem 1rem;margin-top:3rem;}
.related-title{font-size:1.5rem;font-weight:600;color:var(--dark);margin-bottom:1rem;text-align:center;}
.related-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));}
.related-item{background:#fff;border-radius:var(--radius);box-shadow:0 2px 8px rgb(0 0 0 / .05);overflow:hidden;transition:transform .2s;cursor:pointer;}
.related-item:hover{transform:translateY(-4px);}
.related-item img{width:100%;height:160px;object-fit:cover;}

/* === Related products card === */
#related-products .product-item{
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  transition:transform .2s,box-shadow .2s;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
}
#related-products .product-item:hover{transform:translateY(-4px);box-shadow:0 4px 10px rgba(0,0,0,.08);} 
#related-products .product-item img{width:100%;height:160px;object-fit:cover;}
#related-products .product-item .info{padding:1rem;text-align:center;width:100%;}
#related-products .product-item .info h3{font-size:1rem;font-weight:600;color:#1f2937;margin:0 0 .5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#related-products .product-item .info .price{font-size:.95rem;font-weight:700;color:var(--primary);}
.related-item .info{padding:1rem;}
.related-item .info h3{font-size:1rem;font-weight:600;color:var(--dark);margin:0 0 .5rem;}
.related-item .info .price{font-size:.9rem;font-weight:700;color:var(--primary);} 

#prev-related,#next-related{z-index:50!important;pointer-events:auto;}

/* Mobile tweaks */
@media (max-width: 767px) {
  .product-description{text-align:left;}
  .availability{display:block;text-align:left;margin:.5rem 0;}
  [dir="rtl"] .product-description, [dir="rtl"] .availability{text-align:right;}

  .order-btn-svg{width:32px;height:32px;}
  .order-btn-text{font-size:.95rem;}
  .availability{font-size:.9rem;}
  #related-products {
    overflow:hidden;
    position:relative;
    padding-bottom:0;
  }
  #related-products .product-item{
    width:100%;
    max-width:100%;
    margin:0 auto;
  }

  #related-products .product-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:1.25rem;
    border:1px solid #f3f4f6;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
  }
  #related-products .product-item img{height:180px;width:auto;max-width:100%;object-fit:contain;display:block;margin:0 auto;}
  #related-products .product-item .info{padding:0;margin-top:.75rem;width:100%;}
  #related-products .product-item .info h3{font-size:1.25rem;margin-bottom:.25rem;}
  #related-products .product-item .info .price{font-size:1.1rem;}
  #related-products .product-item button{margin-top:1rem;width:100%;}
  .product-details{padding:1.5rem;text-align:center;} /* keep title/price centered, description overridden below */
  .product-details h1{font-size:1.5rem;margin-bottom:.5rem;}
  .product-details nav.breadcrumb{justify-content:center;text-align:center;font-size:.875rem;}
  .product-price{font-size:1.25rem!important;justify-content:center;gap:.25rem;}
  .availability{display:block;text-align:left;margin:.5rem 0;}
  .product-actions{display:flex;justify-content:center;margin-top:1.25rem;}
  .order-btn{width:auto;max-width:220px;padding:.75rem 1rem;display:inline-flex;align-items:center;gap:.5rem;margin:0 auto;}
}
/* End mobile tweaks */

/* spacing fixes */
.product-details nav.breadcrumb{margin-bottom:1.25rem!important;}
