/* ─── ROOT & GLOBAL ───────────────────────── */
:root {
  --brown: #6b4f3b;
  --brown-dark: #4e3729;
  --text: #2c2c2c;
  --light: #777;
  --bg: #f8f8f8;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Jost", sans-serif;
}


body {
  background: var(--bg);
  color: var(--text);
}


/* 🔥 GLOBAL LINK RESET (MAIN FIX) */
a {
  text-decoration: none;
  color: inherit;
}


/* Allow hover effect only where needed */
a:hover {
  color: inherit;
}


/* ─── PRODUCT PAGE LAYOUT ───────────────── */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 120px 60px 60px;
  max-width: 1200px;
  margin: auto;
}


/* ─── LEFT SIDE (IMAGES) ───────────────── */
.product-images {
  display: flex;
  flex-direction: column;
  gap: 15px;
}


.main-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
}


.main-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  background: transparent;
}


/* THUMBNAILS */
.thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  overflow-x: auto;
}


.thumb {
  width: 75px;
  height: 75px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: 0.3s;
  flex-shrink: 0;
}


.thumb:hover {
  opacity: 0.9;
}


.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


.thumb.active {
  opacity: 1;
  border-color: var(--brown);
}


/* ─── RIGHT SIDE (INFO) ───────────────── */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}


.product-info h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
}


#price {
  font-size: 24px;
  color: var(--brown);
  font-weight: 600;
}


.stock-status {
  font-size: 14px;
  font-weight: 500;
}


.product-info p {
  font-size: 14px;
  color: var(--light);
  line-height: 1.6;
}


/* ─── TAGS ───────────────────────────── */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.tag {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 20px;
  background: #f3f3f3;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: 0.2s;
  color: #333;
}


.tag:hover {
  background: black;
  color: white;
}


/* ─── OPTIONS ───────────────────────── */
.product-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.product-options label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}


.product-options select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
}


/* ─── QUANTITY ───────────────────────── */
.qty-box {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}


.qty-box button {
  width: 35px;
  height: 35px;
  border: none;
  background: #f2f2f2;
  cursor: pointer;
  font-size: 16px;
  transition: 0.2s;
}


.qty-box button:hover {
  background: #ddd;
}


.qty-box input {
  width: 45px;
  height: 35px;
  border: none;
  text-align: center;
  outline: none;
}


/* ─── ACTION BUTTONS ───────────────── */
.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}


.product-actions button {
  flex: 1;
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}


/* BUTTONS */
.btn-cart {
  background: #eee;
  color: var(--text);
}


.btn-cart:hover {
  background: #ddd;
}


.btn-buy {
  background: var(--brown);
  color: white;
}


.btn-buy:hover {
  background: var(--brown-dark);
}


/* ─── RELATED PRODUCTS ───────────────── */
.related-products {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}


.related-products h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text);
}


.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}


.related-card {
  background: transparent;
  border-radius: 10px;
  overflow: visible;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}


.related-card:hover {
  transform: translateY(-5px);
}


.related-card a {
  display: block;
  color: inherit;
}


.related-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 10px;
  display: block;
}


.related-card h3 {
  font-size: 14px;
  padding: 10px 10px 5px;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}


.related-card .price {
  padding: 0 10px 12px;
  color: var(--brown);
  font-weight: 600;
  font-size: 15px;
  margin: 0;
}


/* ─── RESPONSIVE ───────────────────── */


/* TABLET */
@media (max-width: 1024px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 100px 30px;
  }


  .main-image {
    aspect-ratio: 4 / 5;
  }


  .main-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    object-position: center;
    background: transparent;
  }


  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* MOBILE */
@media (max-width: 600px) {
  .product-page {
    padding: 90px 20px;
    gap: 30px;
  }


  .product-info h1 {
    font-size: 22px;
  }


  #price {
    font-size: 20px;
  }


  .main-image {
    aspect-ratio: 4 / 5;
  }


  .main-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    object-position: center;
    background: transparent;
  }


  .thumb {
    width: 60px;
    height: 60px;
  }


  .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }


  .product-actions {
    flex-direction: column;
  }


  .qty-box {
    width: 100%;
    justify-content: space-between;
  }


  .qty-box input {
    width: 100%;
  }


  .related-grid {
    grid-template-columns: 1fr;
  }


  .related-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
  }


  .related-card h3 {
    font-size: 13px;
    padding: 8px 8px 4px;
  }


  .related-card .price {
    padding: 0 8px 10px;
    font-size: 14px;
  }
}


/* SMALL MOBILE */
@media (max-width: 380px) {
  .thumb {
    width: 50px;
    height: 50px;
  }


  .related-grid {
    grid-template-columns: 1fr;
  }


  .related-card h3 {
    font-size: 12px;
  }
}


/* Thumbnail images */
.thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
}


.thumb {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s;
  flex-shrink: 0;
  overflow: hidden;
}


.thumb:hover {
  border-color: #1a1a1a;
}


.thumb.active {
  border-color: var(--brown);
}


.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}