/* =========================
   PRODUCT PAGE CSS (ONLY)
   - Updated to match product.php markup
   - Keeps legacy selectors to avoid breaking anything
========================= */

/* Page background + base text color */
.product-page{
  padding: 46px 0 30px;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(209,174,101,.12), transparent 60%),
    radial-gradient(900px 520px at 80% 30%, rgba(44,94,92,.22), transparent 60%),
    linear-gradient(180deg, #071010 0%, #0b1212 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.90);
}

/* Layout wrapper (NEW markup) */
.product-grid{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 16px;
  align-items: start;
}

/* Layout wrapper (LEGACY markup kept) */
.product-wrap{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* Cards */
.product-gallery,
.product-info{
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: 0 26px 70px rgba(0,0,0,.35);
  padding: 16px;
}

/* Main image (NEW markup) */
.product-main-img{
  margin: 0;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  aspect-ratio: 4 / 3;
}
.product-main-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transform: scale(1.02);
}

/* Main image (LEGACY markup kept) */
.product-main{
  margin: 0;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  aspect-ratio: 4 / 3;
}
.product-main img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transform: scale(1.02);
}

/* Optional badge (if used later) */
.product-badge{
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #071010;
  background: linear-gradient(135deg, #d1ae65, #a38343);
  box-shadow: 0 14px 26px rgba(209,174,101,.14);
}

/* Thumbnails grid */
.product-thumbs{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* Thumb button (NEW markup) */
.thumb{
  padding: 0;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.thumb:hover{
  transform: translateY(-1px);
  border-color: rgba(209,174,101,.28);
}
.thumb.active{
  border-color: rgba(209,174,101,.55);
  box-shadow: 0 0 0 4px rgba(209,174,101,.12);
}
.thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumb button (LEGACY markup kept) */
.thumb-btn{
  padding: 0;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.thumb-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(209,174,101,.28);
}
.thumb-btn.is-active{
  border-color: rgba(209,174,101,.55);
  box-shadow: 0 0 0 4px rgba(209,174,101,.12);
}
.thumb-btn img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Title + summary */
.product-title{
  margin: 0 0 10px;
  font-size: clamp(22px, 2.8vw, 34px);
  color: rgba(255,255,255,.94);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.product-short{
  margin: 0 0 12px;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
}

/* Rating */
.product-rating{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.stars{
  --star-size: 14px;
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: var(--star-size);
  letter-spacing: 2px;
}
.stars::before{ content: "★★★★★"; color: rgba(255,255,255,.22); }
.stars::after{
  content: "★★★★★";
  position: absolute;
  left: 0; top: 0;
  width: calc((var(--rating) / 5) * 100%);
  overflow: hidden;
  color: #d1ae65;
}

/* Support both naming styles */
.rating-num,
.product-rating-num{
  font-weight: 900;
  color: rgba(255,255,255,.86);
}

/* Price */
.product-price{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.price-now{
  font-weight: 900;
  font-size: 22px;
  color: rgba(255,255,255,.94);
}

.price-was{
  color: rgba(255,255,255,.55);
  text-decoration: line-through;
}

/* Stock badge */
.product-stock{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-size: 13px;
  font-weight: 800;
  width: fit-content;
}
.product-stock.in{
  border-color: rgba(33,197,142,.35);
  background: rgba(33,197,142,.12);
}
.product-stock.out{
  border-color: rgba(255,183,3,.35);
  background: rgba(255,183,3,.12);
}

/* Shipping note */
.product-shipping-note{
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.product-shipping-note strong{
  display: block;
  color: rgba(255,255,255,.92);
  margin-bottom: 6px;
}
.product-shipping-note .muted{
  color: rgba(255,255,255,.68);
  font-size: 13px;
  line-height: 1.55;
}

/* Trust badges (below shipping note) */
.trust-badges{
  margin: 10px 0 2px;
  display: grid;
  gap: 10px;
}

.trust-badge{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.86);
  font-weight: 800;
  font-size: 13px;
}

.trust-ico{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(209,174,101,.35);
  background: rgba(209,174,101,.10);
}

/* Review badge: Verified Purchase */
.verified-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(209,174,101,.35);
  background: rgba(209,174,101,.12);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 900;
}

/* Fix select dropdown readability on some browsers (options were white-on-white) */
.product-page select option{
  color: #071010;
  background: #ffffff;
}

/* Buy form (NEW markup) */
.product-buy{
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.qty-row{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
}

.qty-label{
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 800;
}

.qty-box{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  overflow: hidden;
}

.qty-btn{
  height: 44px;
  border: 0;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
}
.qty-btn:hover{ background: rgba(255,255,255,.07); }

.qty-box input,
.qty input{
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(255,255,255,.92);
  text-align: center;
  font-weight: 900;
  width: 100%;
}

/* Button helpers (product page needs these) */
.btn-block{
  width: 100%;
  justify-content: center;
}

/* Description block (product.php uses .product-desc > h3 + .text) */
.product-desc{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.product-desc h3{
  margin: 0 0 10px;
  color: rgba(255,255,255,.94);
  font-size: 18px;
  letter-spacing: -0.2px;
}
.product-desc .text{
  color: rgba(255,255,255,.72);
  line-height: 1.75;
}

/* Tags/meta (product.php uses .product-meta .tag) */
.product-meta{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 980px){
  .product-grid,
  .product-wrap{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px){
  .product-thumbs{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .qty-row{
    grid-template-columns: 1fr;
  }
}

/* =========================
   PRODUCT SECTION 2: TABS + PANELS
   (kept for upcoming Reviews tab integration)
========================= */
.product-details{
  background: #071010;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 18px;
}

.details-card{
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  box-shadow: 0 26px 70px rgba(0,0,0,.35);
  overflow: hidden;
}

/* Tabs */
.tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.tab{
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.tab:hover{
  transform: translateY(-1px);
  border-color: rgba(209,174,101,.28);
  background: rgba(255,255,255,.08);
}

.tab.is-active{
  color: #071010;
  border: 0;
  background: linear-gradient(135deg, #d1ae65, #a38343);
  box-shadow: 0 16px 34px rgba(209,174,101,.16);
}

.tab-panels{ padding: 16px; }

/* Panels */
.panel{ display: none; }
.panel.is-open{ display: block; }

.panel-title{
  margin: 0 0 10px;
  color: rgba(255,255,255,.94);
  font-size: 20px;
  letter-spacing: -0.2px;
}

.panel p{
  margin: 0 0 12px;
  color: rgba(255,255,255,.72);
  line-height: 1.7;
}

.panel-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.panel-box{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 12px;
}

.panel-box strong{
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.92);
}

.panel-box ul{
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,.72);
  line-height: 1.7;
}

.clean-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,.72);
  line-height: 1.8;
}

.panel-note{
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

/* Reviews (UI styles for later) */
.review-summary{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: start;
  margin: 12px 0 14px;
}

.review-score{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 12px;
  text-align: center;
}

.score-big{
  font-size: 44px;
  font-weight: 900;
  color: rgba(255,255,255,.94);
  line-height: 1;
  margin-bottom: 8px;
}

.score-count{
  margin-top: 8px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

.review-bars{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 12px;
  display: grid;
  gap: 10px;
}