:root{
  --brand-red:#E60012;
  --brand-black:#241E2F;
  --muted:#6b7280;
  --glass: rgba(255,255,255,0.7);
  --card-bg: #ffffff;
  --radius:18px;
  --maxwidth:1200px;
  --gap:28px;
}

.container{
  max-width:var(--maxwidth);
  margin:40px auto;
  padding:0 20px;
}
.product-grid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:28px;
  align-items:start;
}
.left-col, .right-col{
  display:flex;
  flex-direction:column;
  gap:28px;
}
.gallery{
  background: linear-gradient(180deg, rgba(255,255,255,0.9), #fff);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: 0 20px 50px rgba(36,30,47,0.06);
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
}
.main-photo{
  width:100%;
  border-radius:12px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #fafafa;
}
.main-photo img{
  width:100%;
  height:500px;
  max-height:320px;
  object-fit:contain;
  transition: transform .6s ease;
}
.main-photo:hover img{transform:scale(1.03)}
.thumbs{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:8px;
}
.thumbs button{
  width:58px; height:58px; border-radius:10px; border:2px solid transparent;
  display:inline-flex; align-items:center; justify-content:center; overflow:hidden;
  background:#fff; cursor:pointer;
  box-shadow: 0 4px 12px rgba(36,30,47,0.05);
  transition:all .28s ease;
}
.thumbs button img{width:100%; height:100%; object-fit:cover}
.thumbs button.active{border-color:var(--brand-red); transform:translateY(-4px)}
.details{
  background: linear-gradient(180deg,#fff, #fff);
  border-radius: var(--radius);
  padding:28px;
  box-shadow: 0 20px 60px rgba(36,30,47,0.06);
  display:flex;
  flex-direction:column;
  gap:18px;
}
.product-title{
  font-size:28px;
  font-weight:800;
  font-family:"Jost",sans-serif;
  margin:0;
  color:var(--brand-black);
}
.product-sub{
  color:var(--muted);
  margin:0;
  font-size:15px;
}
.sku-row{display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.chip {background:#f7f7f8; padding:8px 12px; border-radius:999px; font-weight:600; font-size:13px; color:var(--brand-black)}
.specs-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:10px;
  background:#fbfcfd;
  padding:14px;
  border-radius:12px;
  font-size:14px;
  color:var(--brand-black);
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
}
.specs-grid dt{font-weight:700}
.specs-grid dd{margin:0; color:var(--muted)}
.actions{
  display:flex; 
  gap:12px; 
  flex-wrap:nowrap;
  margin-top:8px
}
.actions a{
  white-space:nowrap;
} 
.btn-primary{
  background:linear-gradient(180deg,var(--brand-black), #111);
  color:#fff;
  padding:14px 26px;
  border-radius:999px;
  font-weight:800;
  text-decoration:none;
  display:inline-flex; gap:10px; align-items:center;
  box-shadow: 0 18px 36px rgba(36,30,47,0.14);
}
.btn-outline{
  border:2px solid var(--brand-red);
  color:var(--brand-red);
  padding:12px 20px;
  border-radius:999px;
  background:transparent;
  font-weight:700;
  text-decoration:none;
  display:inline-flex; gap:8px; align-items:center;
}
.overview{
  background:#fff;
  padding:20px;
  border-radius:12px;
  box-shadow:0 18px 40px rgba(36,30,47,0.04);
}
.related{
  background:linear-gradient(180deg,#fff,#fff);
  padding:18px;border-radius:12px;
  box-shadow: 0 18px 40px rgba(36,30,47,0.04);
}
.related h4{margin:0 0 12px 0; font-size:16px}
.related-list{display:grid; gap:12px}
.related-item{display:flex; gap:12px; align-items:center}
.related-item img{width:74px;height:54px;object-fit:cover;border-radius:8px}
.tabs {
  background: var(--card-bg);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(36,30,47,0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tab-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tab-nav button {
  background: transparent;
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tab-nav button.active {
  background: var(--brand-red);
  color: #fff;
}
.tab-content {
  display: block;
}
.tab-content[aria-hidden="true"] {
  display: none;
}
.tab-content h3, .tab-content h4 {
  margin-top: 0;
  font-family: "Jost", sans-serif;
  color: var(--brand-black);
}
.tab-content p {
  color: var(--muted);
  line-height: 1.6;
}
.tab-content ul {
  margin-top: 10px;
  padding-left: 20px;
}
.tab-content ul li {
  margin-bottom: 6px;
}
.tab-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
.tab-content table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}
.tab-content table td:first-child {
  font-weight: 700;
}

h2{
    font-size: 32px;
    font-weight: 700;
    color: #222;
}

h3{
    font-size: 26px;
    font-weight: 700;
    color: #222;
}

/* =========================
  Responsive fixes for product page
   ========================= */

/* Ensure base product grid behaves well on narrow screens */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 420px; /* you can keep your desktop width here */
  gap: 28px;
  align-items: start;
}

/* Make gallery image scale nicely */
.gallery .main-photo,
.gallery .main-photo img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain; /* preserves product image aspect */
}

/* Thumbnails: horizontal scroll on small screens for better UX */
.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
  -webkit-overflow-scrolling: touch;
}
.thumbs button {
  flex: 0 0 auto; /* prevents shrinking */
  width: 66px;
  height: 66px;
  border-radius: 10px;
  border: 2px solid transparent;
  overflow: hidden;
  padding: 0;
  background: #fff;
}
.thumbs button img { width:100%; height:100%; object-fit:cover; }

/* Action buttons: keep usable on mobile */
.actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.actions .btn-primary,
.actions .btn-outline { white-space:nowrap; }

/* Right column related/details spacing */
.right-col .details,
.right-col .related { margin-bottom: 18px; }

/* ------------------------
   Very large screens (>= 1400px)
   ------------------------ */
@media (min-width: 1400px) {
  :root { --max-width: 1400px; --gap: 30px; }
  .container { max-width: 1400px; }
  .product-grid { grid-template-columns: 2.4fr 1fr; gap: var(--gap); }
  .main-photo img {
    height: 560px;
    max-height: 560px;
    object-fit: contain;
  }
  .thumbs .thumb { width: 72px; height: 72px; border-radius: 12px; }
  .details { padding: 28px; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .related-item .thumb { width: 140px; aspect-ratio: 16/9; }
  .product-title { font-size: clamp(22px, 2.4vw, 30px); }
  .btn-primary { padding: 14px 24px; }
  .btn-outline { padding: 12px 20px; }
}

/* ------------------------
   Large desktop (1200px — 1399px)
   ------------------------ */
@media (min-width: 1200px) and (max-width: 1399px) {
  :root { --max-width: 1200px; --gap: 28px; }
  .container { max-width: 1200px; }
  .product-grid { grid-template-columns: 2.2fr 1fr; }
  .main-photo img {
    height: 520px;
    max-height: 520px;
  }
  .thumbs .thumb { width: 64px; height: 64px; }
  .details { padding: 24px; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .related-item .thumb { width: 120px; aspect-ratio: 16/9; }
  .product-title { font-size: clamp(21px, 2.6vw, 28px); }
  .btn-primary { padding: 13px 22px; }
  .btn-outline { padding: 11px 18px; }
}

/* ------------------------
   Desktop -> Tablet breakpoint (<= 991px)
   Single-column layout
   ------------------------ */
@media (max-width: 991px) {
  .product-grid { grid-template-columns: 1fr; gap: var(--gap); }
  .main-photo img {
    max-height: 420px;
    height: auto; /* allow natural scaling */
    object-fit: contain;
  }
  .thumbs { justify-content: flex-start; }
  .thumbs .thumb { width: 56px; height: 56px; }
  .details { padding: 18px; }
  .specs-grid { grid-template-columns: 1fr; gap: 10px; }
  .related-item { align-items: flex-start; }
  .related-item .thumb { width: 90px; aspect-ratio: 16/9; }
  .product-title { font-size: 20px; }
  .btn-primary { padding: 12px 18px; }
  .btn-outline { padding: 10px 14px; }
}

/* ------------------------
   Narrow tablets / large phones (<= 720px)
   ------------------------ */
@media (max-width: 720px) {
  :root { --gap: 20px; --pad: 16px; }
  .container { padding: 0 14px; margin: 20px auto; }
  .main-photo { min-height: 180px; }
  .main-photo img { max-height: 360px; object-fit: contain; }
  .thumbs .thumb { width: 54px; height: 54px; border-radius: 8px; }
  .details { padding: 16px; }
  .product-title { font-size: 18px; }
  .specs-grid { font-size: 14px; grid-template-columns: 1fr; }
  .related-item .thumb { width: 84px; aspect-ratio: 16/9; }
  .btn-primary { padding: 10px 16px; }
  .btn-outline { padding: 8px 12px; }
}

/* ------------------------
   Small phones (<= 420px)
   ------------------------ */
@media (max-width: 420px) {
  :root { --pad: 12px; --gap: 12px; }
  .container { padding: 0 12px; margin: 14px auto; }
  .site-header { gap: 8px; align-items: flex-start; }
  .brand h1 { font-size: 16px; }
  .brand p { font-size: 12px; }
  .main-photo img { max-height: 280px; }
  .thumbs .thumb { width: 48px; height: 48px; }
  .product-title { font-size: 17px; }
  .specs-grid { grid-template-columns: 1fr; font-size: 13px; }
  .related-item .thumb { width: 72px; }
  .btn-primary { padding: 10px 14px; font-size: 14px; }
  .btn-outline { padding: 8px 12px; font-size: 14px; }
}

/* ------------------------
   Very small phones (<= 360px)
   ------------------------ */
@media (max-width: 360px) {
  .container { padding: 0 8px; margin: 10px auto; }
  .main-photo img { max-height: 220px; }
  .thumbs .thumb { width: 44px; height: 44px; }
  .product-title { font-size: 16px; }
  .brand .logo { width: 48px; height: 48px; font-size: 16px; }
  .related-item .thumb { width: 64px; aspect-ratio: 16/9; }
  .specs-grid { gap: 8px; font-size: 12px; padding: 10px; }
  .btn-primary { padding: 9px 12px; font-size: 13px; }
  .btn-outline { padding: 7px 10px; font-size: 13px; }
}
