

:root{
  color-scheme: dark;

  --bg:#0B1220;
  --surface:#0F172A;
  --surface-2:#111C33;
  --surface-3:#0D1528;

  --text:#E5E7EB;
  --muted:rgba(229,231,235,.68);

  --border:rgba(255,255,255,.08);
  --border-2:rgba(255,255,255,.12);

  --accent:#3B82F6;
  --accent-2:#2563EB;
  --danger:#EF4444;
  --warning:#FBBF24;

  --radius:16px;
  --radius-sm:12px;

  --shadow-sm:0 10px 24px rgba(0,0,0,.35);
  --shadow:0 18px 45px rgba(0,0,0,.50);

  --ring:0 0 0 4px rgba(59,130,246,.28);

  --font:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial;
}

*{ box-sizing:border-box; }
img{ max-width:100%; height:auto; display:block; }

.product{
  font-family:var(--font);
  color:var(--text);
}


.product-container{
  width:min(1100px, 92vw);
  margin:0 auto;
  padding:0 12px;
}


.product-hero{
  border-bottom:1px solid var(--border);
  padding:clamp(1rem, 3.2vw, 2rem) 0;
}

.product-hero__row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

.product-title{
  margin:0;
  font-weight:950;
  letter-spacing:-0.02em;
  font-size:clamp(1.35rem, 1.4vw + 1rem, 2.2rem);
}

.product-meta{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.product-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  font-weight:900;
  font-size:.85rem;
  color:rgba(229,231,235,.92);
}

.product-pill--ok{
  border-color:rgba(34,197,94,.35);
  background:rgba(34,197,94,.10);
}

.product-pill--sale{
  border-color:rgba(239,68,68,.35);
  background:rgba(239,68,68,.12);
  color:#fff;
}


.stars{
  position:relative;
  display:inline-block;
  font-size:18px;
  line-height:1;
  color:rgba(255,255,255,.18);
}
.stars::before{ content:"★★★★★"; }
.stars-fill{
  position:absolute;
  top:0; left:0;
  overflow:hidden;
  white-space:nowrap;
  color:var(--warning);
}
.stars-fill::before{ content:"★★★★★"; }

.product-rating{
  display:flex;
  align-items:center;
  gap:8px;
}
.product-rating__num{ font-weight:950; }
.product-rating__link{
  color:rgba(229,231,235,.8);
  text-decoration:none;
}
.product-rating__link:hover{ text-decoration:underline; }

.product-body{
  padding:16px 0 40px;
}

.product-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

@media (min-width: 992px){
  .product-grid{
    grid-template-columns: 1.25fr .75fr;
    gap:20px;
    align-items:start;
  }
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
}

.card-head{
  padding:16px 16px 0;
}
.card-h2{
  margin:0;
  font-weight:950;
  letter-spacing:-0.01em;
  font-size:1.1rem;
}

.muted{
  color:var(--muted);
  line-height:1.55;
  margin:12px 16px 16px;
}

.product-gallery{
  display:flex;
  flex-direction:column;
  gap:12px;
}


.product-media{
  position:relative;
  background:var(--surface-3);
  border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);

  
  aspect-ratio: 1 / 1;
  width:100%;

  display:grid;
  place-items:center;
  padding:14px;

  overflow:hidden;
}


@media (min-width: 992px){
  .product-media{
    aspect-ratio: 4 / 3;
    padding:16px;
  }
}


#mainImage{
  width:100%;
  height:100%;
  object-fit:contain;     
  object-position:center; 
  max-height: min(70vh, 560px);
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.35));
  transition: opacity .16s ease;
}

#mainImage.is-fading{ opacity:.35; }


.media-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:26px;
  line-height:1;
  user-select:none;
  backdrop-filter: blur(6px);
}
.media-nav:hover{ background:rgba(0,0,0,.50); border-color:var(--border-2); }
.media-nav--prev{ left:10px; }
.media-nav--next{ right:10px; }

@media (max-width: 520px){
  .media-nav{ width:38px; height:38px; font-size:24px; }
}


.thumbs{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:2px 2px 8px;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}

@media (min-width: 992px){
  .thumbs{
    overflow:visible;
    display:grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap:10px;
    padding:0;
  }
}

.thumb{
  flex:0 0 auto;
  width:72px;
  height:72px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  cursor:pointer;
  padding:8px;
  display:grid;
  place-items:center;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.thumb:hover{
  background:rgba(255,255,255,.06);
  border-color:var(--border-2);
}

.thumb.is-active{
  border-color:rgba(59,130,246,.55);
  box-shadow:var(--ring);
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:contain;    
  object-position:center;
}


.product-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  font-weight:900;
  font-size:.9rem;
  color:rgba(229,231,235,.92);
}

.product-buybox{ align-self:start; }

.buybox{
  padding:16px;
}

@media (min-width: 992px){
  .product-buybox{
    position:sticky;
    top:12px;
  }
}

.buybox-price{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
}

.buybox-price__label{
  margin:0;
  color:var(--muted);
  font-weight:800;
  font-size:.9rem;
}

.buybox-price__now{
  margin:4px 0 0;
  font-size:1.6rem;
  font-weight:950;
  letter-spacing:-0.02em;
}

.buybox-price__side{
  text-align:right;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.buybox-price__was{
  color:rgba(229,231,235,.55);
  text-decoration:line-through;
  font-weight:900;
}
.buybox-price__save{
  color:#fff;
  font-weight:950;
  background:rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.35);
  padding:6px 10px;
  border-radius:999px;
  display:inline-block;
}

.buybox-facts{
  margin:12px 0 0;
  display:grid;
  gap:10px;
}
.buybox-fact{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
}
.buybox-fact dt{
  color:var(--muted);
  font-weight:900;
}
.buybox-fact dd{
  margin:0;
  font-weight:900;
}


.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  text-decoration:none;
  font-weight:950;
  cursor:pointer;
  user-select:none;
}

.btn-primary{
  background:var(--accent);
  color:#fff !important;
  box-shadow:0 12px 24px rgba(59,130,246,.18);
}
.btn-primary:hover{
  background:var(--accent-2);
  box-shadow:0 18px 34px rgba(59,130,246,.22);
}

.btn-full{ width:100%; }
.btn-lg{ padding:13px 14px; }

.buybox-row{ margin-top:14px; }


.product-sections{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
}

@media (min-width: 992px){
  .product-sections{
    grid-template-columns: 1fr 1fr;
  }
}

.spec-title{
  margin:14px 16px 8px;
  font-weight:950;
  color:rgba(229,231,235,.92);
}

.specs{
  margin:0 16px 16px;
  display:grid;
  gap:10px;
}

.spec-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
}
.spec-row dt{ color:var(--muted); font-weight:900; }
.spec-row dd{ margin:0; font-weight:900; text-align:right; }


.product-reviews{ margin-top:18px; padding:16px; }

.reviews-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
}

.reviews-summary{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  padding-top:14px;
}

@media (min-width: 768px){
  .reviews-summary{ grid-template-columns: 260px 1fr; align-items:start; }
}

.reviews-score__num{
  font-size:2.2rem;
  font-weight:950;
  margin-bottom:8px;
}

.reviews-dist{ display:grid; gap:8px; }
.dist-row{
  display:grid;
  grid-template-columns: 54px 1fr 32px;
  gap:10px;
  align-items:center;
}
.dist-star{ color:rgba(229,231,235,.85); font-weight:900; }
.dist-bar{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.dist-fill{
  height:100%;
  background:rgba(59,130,246,.7);
}
.dist-count{ color:rgba(229,231,235,.75); font-weight:900; text-align:right; }

.reviews-list{
  margin-top:16px;
  display:grid;
  gap:12px;
}

.review{
  display:grid;
  grid-template-columns: 44px 1fr;
  gap:12px;
  padding:12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
}

.review-avatar{
  width:44px; height:44px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-weight:950;
  background:rgba(59,130,246,.18);
  border:1px solid rgba(59,130,246,.28);
}

.review-name{ margin:0; font-weight:950; }
.review-text{ margin:8px 0 0; color:rgba(229,231,235,.82); line-height:1.5; }


:where(.product a, .product button, .product input):focus-visible{
  outline:none;
  box-shadow:var(--ring);
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}



.product .product-media{
  overflow: visible !important;          
  box-shadow: var(--shadow-sm);          
}


.product #mainImage{
  filter: none !important;

  
  object-fit: contain !important;
  object-position: center !important;

  width: 100%;
  height: 100%;
  max-height: none;                      
}


@media (max-width: 991.98px){
  .product .product-media{
    aspect-ratio: auto !important;       
    min-height: 280px;
  }

  .product .thumbs{
    justify-content: center;
    flex-wrap: wrap;                     
    overflow-x: visible;
  }
}




@media (min-width: 992px){
  .product .thumbs{
    gap: 4px !important;   
  }
}
@media (min-width: 992px){
  .product .thumb{
    width: 64px;
    height: 64px;
    padding: 6px;          
  }
}

@media (min-width: 992px){
  .product .thumbs{
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 72px) !important; 
    justify-content: start !important;                         
    gap: 4px !important;                                       
  }
}
/* Smartphone color picker */
.color-picker{
  margin-top: 14px;
  border: 0;
  padding: 0;
}

.color-picker__legend{
  font-weight: 950;
  margin: 0 0 10px;
  color: rgba(229,231,235,.92);
}

.color-picker__grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-opt{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  cursor: pointer;
  user-select: none;
}

.color-opt:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border-2);
}

.color-opt input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-opt__swatch{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--swatch, #6b7280);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 0 0 2px rgba(0,0,0,.25) inset;
}

.color-opt__label{
  font-weight: 900;
  color: rgba(229,231,235,.85);
  font-size: .92rem;
}

/* Checked + focus states (no :has needed) */
.color-opt input:checked + .color-opt__swatch{
  border-color: rgba(59,130,246,.55);
  box-shadow:
    0 0 0 3px rgba(59,130,246,.28),
    0 0 0 2px rgba(0,0,0,.25) inset;
}

.color-opt input:checked ~ .color-opt__label{
  color: rgba(255,255,255,.95);
}

.color-opt input:focus-visible + .color-opt__swatch{
  box-shadow: var(--ring);
}
.color-picker{
  margin-top: 14px;
  border: 0;
  padding: 0;
}

.color-picker__grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Each option */
.color-dot{
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

/* Hide native radio */
.color-dot input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-dot__swatch{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--swatch, #6b7280);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 0 0 2px rgba(0,0,0,.25) inset;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.color-dot:hover .color-dot__swatch{
  transform: scale(1.06);
  border-color: rgba(255,255,255,.35);
}

/* Checked ring */
.color-dot input:checked + .color-dot__swatch{
  border-color: rgba(59,130,246,.55);
  box-shadow:
    0 0 0 4px rgba(59,130,246,.28),
    0 0 0 2px rgba(0,0,0,.25) inset;
}

/* Keyboard focus */
.color-dot input:focus-visible + .color-dot__swatch{
  box-shadow: var(--ring);
}
