/* Container layout */
.container {
  margin-top: 80px;
  display: flex;
  gap: -40px;
  align-items: flex-start;
  justify-content: center;
}


/* Product Gallery */
.product-gallery {
  display: flex;
  gap: 0px;
  margin-left: -90px;

  flex: 0 0 1000px;
}

/* Thumbnail Column */
.thumbnail-column {
  display: flex;
  flex-direction: column;
  
}

/* Thumbnail Images */
.thumbnail-column img {
  width: 100px;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #ccc;
  transition: 0.2s;
}

.thumbnail-column img:hover {
  border: 2px solid #000;
}

/* Main Image */
.main-image img {
  width: 100%;
  max-width: 800px;
  
  object-fit: cover;
}


/* Product Info */
.product-info {
  flex: 1;
  justify-content: flex-start; /* align items to left */
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: calc(var(--header-height, 80px) + 16px); /* respects fixed header if present */
  align-self: flex-start;
  max-height: calc(100vh - (var(--header-height, 80px) + 32px)); /* keep it inside viewport */
   /* allow internal scrolling if content is tall */
  padding-right: 16px; /* optional spacing from right edge */
  box-sizing: border-box;
}
.product-info {
  background: transparent; /* or rgba(255,255,255,0.98) if you want a subtle panel */
}


.price {
  font-size: 22px;
  margin: 15px 0;
}

.regular-price {
  text-decoration: line-through;
  color: #888;
}
.discount-price {
  color: #e63946;
  font-weight: bold;
}

/* Variant form */
.variant-form {
  flex:1;
  flex-direction: column; 
  justify-content: flex-start;
  align-items: flex-start; 
  gap: 20px;
}

/* Sizes */
.variant.sizes .options,
.variant.colors .options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.option-box {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
  min-width: 40px;
  transition: 0.2s;
  cursor: pointer;
}
.option-box:hover {
  border: 2px solid black;
}
input[type="radio"] {
  display: none; /* hide radio buttons */
}
input[type="radio"]:checked + .option-box {
  border: 2px solid black;
  background-color: #f0f0f0;
}

/* Colors */
.color-circle {
  width: 30px;
  height: 30px;
  border: 1px solid #ccc;
  border-radius: 50%;
  transition: 0.2s;
  cursor: pointer;
}
.color-circle:hover {
  border: 2px solid black;
}
input[type="radio"]:checked + .color-circle {
  border: 2px solid black;
}

/* Add to Cart button */
.add-to-cart-btn {
  padding: 20px 170px;
  background: #222;
  font-size: 17px;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.add-to-cart-btn:hover {
  background: #444;
}
@media screen and (max-width: 992px) {
  .product-info {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .container {
    align-items: stretch;
  }
}

@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 20px;
    margin-top: -50px;
  }
  .product-gallery {
    flex: 1 1 100%;
    margin-left:0;
    
  }
   .product-info{
    flex: 1 1 100%;
    margin-left: 50px;
   }
  .main-image img {
    height: 400px;
  }
  .thumbnail-column {
    flex-direction: row;
    display: flex;
    overflow-x: auto;
    width: 100%;
    gap: 5px;
    display:none !important;
  }
  .thumbnail-column img {
    width: 70px;
    height: 100px;
  }
}

/* ----- Responsive: Mobile 480px ----- */
@media screen and (max-width: 480px) {
  .container {
    flex-direction: column;
    margin-top: -40px;
    
  }
  .product-gallery {
    
    margin-top: -150px;
  }
  .main-image img {
    height: 300px;
     margin-top: 0 !important;
  }
  .thumbnail-column{
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
  }
  .thumbnail-column img {
    width: 100%;
    height: 75px;
    display:none;
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
  }
  .option-box {
    padding: 8px 12px;
    min-width: 35px;
  }
  .color-circle {
    width: 25px;
    height: 25px;
  }
  .add-to-cart-btn {
    width: 100%;
    padding:15px 100px;
    text-align: center;
  }
}

.slider { display: none; }
.slider-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  display: flex !important;      /* temporary strong override */
  gap: 8px;
  z-index: 9999;
  pointer-events: auto;
  user-select: none;
}

/* Dot appearance — high contrast */
.slider-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.slider-dots .dot.active {
  background: rgba(0,0,0,0.85);
  border-color: rgba(255,255,255,0.9);
}

/* Slider base styles (used on mobile only) */
.slider { position: relative; width: 100%; overflow: hidden; }
.slides { display: flex; transition: transform 0.4s ease; will-change: transform; }
.slide { min-width: 100%; display:flex; align-items:center; justify-content:center; }
.slide img { width:100%; height:auto; object-fit:contain; display:block; }

/* Mobile-only controls hidden by default until mobile media query */
.slider-btn, .slider-dots { display: none; }

/* ---------------- MOBILE / TABLET (<=768px) ---------------- */
@media screen and (max-width: 768px) {
  /* Hide desktop gallery on small screens */
  .main-image { display: none; }

  /* Show the slider on small screens */
  .slider { display: block; }
  .slider-btn, .slider-dots { display: flex; }

  /* Make slider full-screen minus header (if you set --header-height) */
  .main-image.slider, .slider {
    width: 100vw;
    height: calc(100vh - var(--header-height, 0px));
  }
  .slides, .slide { height: 100%; }
  .slide img { width: 100%; height: 100%; object-fit: contain; }

  /* slider buttons */
  .slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 20; background: rgba(0,0,0,0.45); border: none; color:#fff;
    font-size:20px; width:44px; height:44px; border-radius:50%;
    display:flex; align-items:center; justify-content:center; cursor:pointer;
  }
  .slider-btn.prev { display:none;}
  .slider-btn.next { display:none; }
  .slider-dots {display: flex !important; position:absolute; left:50%; transform:translateX(-50%); bottom:12px; display:flex; gap:8px; z-index:25; }
  .dot { width:10px; height:10px; border-radius:50%; border:none; background:rgba(255,255,255,0.5); }
  .dot.active { background:rgba(255,255,255,0.95); }
}

/* Extra small phones tweak */
@media screen and (max-width: 480px) {
  .slider-btn { width:52px; height:52px; font-size:24px; }
  .slider-dots { bottom:10px; gap:6px; }
}
.related-products {
  margin:15px auto;
  text-align: center;
  
}

.related-products h2 {
  margin:100px auto;
  font-size: 1.8rem;
}

@media screen and (max-width: 480px) {
  .related-products {
    margin: 0px auto; /* reduce top/bottom space */
    text-align: center;
    padding: 0 10px; /* optional: add some side padding */
  }

  .related-products h2 {
    margin: 20px auto; /* reduce huge top margin */
    font-size: 1.4rem; /* smaller font for mobile */
  }
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
