/* ============================================
   SINGLE PRODUCT PAGE — singlepage.css
   ============================================ */

/* No top padding — image goes edge to edge */
.sp-main {
  padding-bottom: calc(var(--nav-h) + 36px);
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.sp-gallery {
  position: relative;
  background: #fdf8ee;          /* warm cream like reference */
  width: 100%;
}

/* Image slider */
.sp-img-slider {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.sp-slide {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.sp-slide.active {
  display: flex;
  animation: spFadeIn 0.35s ease;
}

@keyframes spFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.sp-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

/* Fade bottom of image into white */
.sp-gallery::after {
  content: '';
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #fdf8ee 90%);
  pointer-events: none;
}

/* Overlay action buttons */
.sp-overlay-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.sp-overlay-right {
  display: flex;
  gap: 8px;
}

.sp-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--dark);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.sp-icon-btn:hover { background: #fff; transform: scale(1.05); }

.sp-wishlist.active { color: var(--primary); }

/* Dot indicators */
.sp-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 14px;
  position: relative;
  z-index: 5;
}

.sp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s;
}

.sp-dot.active {
  background: var(--dark);
  width: 20px;
  border-radius: 4px;
}

/* ============================================
   PRODUCT DETAILS SECTION
   ============================================ */
.sp-details {
  background: var(--bg);
  padding: 16px 16px 0;
}

/* Product title */
.sp-product-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 16px;
}

/* ---- Variant / Weight selector ---- */
.sp-variants {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sp-variant {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 7px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-light);
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.2;
}

.sp-variant-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
}

.sp-variant-unit {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.sp-variant.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(255,96,64,0.35);
}

.sp-variant.active .sp-variant-val,
.sp-variant.active .sp-variant-unit {
  color: #fff;
}

.sp-variant:hover:not(.active) {
  border-color: var(--primary);
}

/* ---- Buy Card ---- */
.sp-buy-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px 14px 12px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

/* Price row */
.sp-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  position: relative;
}

.sp-price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.sp-price-current sup { font-size: 10px; }

.sp-price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.sp-price-original sup { font-size: 9px; }

.sp-price-off {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.sp-dv {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

/* +/qty/- column — right side */
.sp-qty-col {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sp-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s;
}

.sp-qty-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sp-qty-count {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  min-width: 20px;
  text-align: center;
}

/* Buy row */
.sp-buy-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sp-btn-buy {
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.sp-btn-buy:hover {
  background: var(--primary-dk);
  transform: scale(1.02);
}

.sp-seller {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
}

/* ---- Description ---- */
.sp-description {
  padding-bottom: 8px;
}

.sp-desc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.sp-desc-text {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 14px;
}

/* ============================================
   RESPONSIVE — desktop centering
   ============================================ */
@media (min-width: 768px) {
  .sp-img-slider {
    height: 340px;
  }

  .sp-product-title {
    font-size: 22px;
  }
}
