/* --- BASE RESET & TYPOGRAPHY --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #0f0b08;
  color: #fff;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- CART MODAL --- */
.cart-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-modal.active {
  visibility: visible;
  opacity: 1;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.cart-content {
  position: relative;
  background: #1a1410;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 80%;
  overflow-y: auto;
}

/* --- CONTAINER --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* --- PRODUCT PAGE LAYOUT (UNCHANGED) --- */
.product-page {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
  padding-bottom: 80px;
}

.product-gallery {
  flex: 1 1 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==================================================
   IMAGE SLIDER (NEW – SAFE ADDITION)
================================================== */

.product-slider {
  width: 100%;
  max-width: 450px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.product-track {
  display: flex;
  transition: transform 0.4s ease;
}

.product-slide {
  min-width: 100%;
}

.product-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* =================
   </> Button
==================*/

/* ==================================================
   PRODUCT IMAGE SLIDER CONTROLS
================================================== */

.product-slider {
  position: relative;
}

/* Arrow buttons */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-btn.prev {
  left: 10px;
}

.slide-btn.next {
  right: 10px;
}

.slide-btn:hover {
  background: rgba(255,179,71,0.8);
  color: #0f0b08;
}

/* Hide arrows on small screens (mobile swipe instead) */
@media (max-width: 768px) {
  .slide-btn {
    display: none;
  }
}

.product-slider {
  position: relative;
  overflow: hidden;
}

.product-track {
  display: flex;
  transition: transform 0.4s ease;
}

.product-slide {
  min-width: 100%;
}

.product-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 26px;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 10;
}

.product-arrow.left { left: 10px; }
.product-arrow.right { right: 10px; }

/* Hide arrows on mobile */
@media (max-width: 768px) {
  .product-arrow {
    display: none;
  }
}

/* =================
    DOT INDICATORS
==================== */

.product-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.product-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.product-dot.active {
  background: #ffb347;
  transform: scale(1.2);
}

/* --- PRODUCT DETAILS (UNCHANGED) --- */
.product-details {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-details h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffb347;
}

.product-details p {
  font-size: 1rem;
  color: #ddd;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e84545;
}

/* --- PRODUCT OPTIONS --- */
.product-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.product-options label {
  font-weight: 500;
  display: block;
}

.product-options select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #212b38;
  color: #fff;
}

/* --- BUTTONS --- */
#add-to-cart,
#buy-now {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#add-to-cart {
  background: #ffb347;
  color: #0f0b08;
}

#buy-now {
  background: #e84545;
  color: #fff;
}

#add-to-cart:hover,
#buy-now:hover {
  transform: translateY(-2px);
}

/* --- RESPONSIVE (UNCHANGED LOGIC) --- */
@media (max-width: 1024px) {
  .product-page {
    flex-direction: column;
    gap: 30px;
  }

  .product-slider {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .product-details h1 {
    font-size: 1.5rem;
  }

  #add-to-cart,
  #buy-now {
    width: 100%;
  }

  .product-options {
    flex-direction: column;
  }
}