/* ============================================
   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: 12px;
}

/* ---- Variant / Weight selector ---- */
.sp-variants {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sp-variant {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 7px 14px;
  border-radius: 14px !important;
  border: 0px !important;
  background: #f0f4f1;
  box-shadow: 0 4px 12px rgba(3, 6, 25, 0.06);
  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: #EF7F1B !important;
  border-color: #EF7F1B !important;
  box-shadow: 0 4px 12px rgba(239, 127, 27, 0.35);
}

.sp-variant.active .sp-variant-val,
.sp-variant.active .sp-variant-unit {
  color: #fff;
}

.sp-variant:hover:not(.active) {
  border-color: #EF7F1B;
}

/* ---- Buy Card (same fit as home .product-card-h) ---- */
.sp-buy-card,
.sp-buy-row,
.sp-qty-col,
.sp-btn-buy,
.sp-btn-add-cart,
.sp-qty-btn,
.sp-variant {
  -webkit-tap-highlight-color: transparent;
}

.sp-buy-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: var(--bg);
  border: 0px !important;
  border-radius: 14px !important;
  padding: 12px 10px 12px 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(3, 6, 25, 0.08) !important;
}

.sp-buy-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

/* Price row */
.sp-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  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: #EF7F1B !important;
}

.sp-dv {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

/* +/qty/- column — right side, same as home .pcard-right */
.sp-qty-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  width: 32px;
  padding: 2px 0;
  background: transparent !important;
  border-radius: 0 !important;
  border: 0px !important;
  box-shadow: none !important;
}

.sp-qty-col .sp-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.sp-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 20px !important;
  border: none !important;
  background: #D6E9D8 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #030619 !important;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  overflow: hidden;
}

.sp-qty-btn:hover {
  background: #c3e0c6 !important;
  color: #030619 !important;
}

.sp-qty-btn:active {
  background: #EF7F1B !important;
  color: #fff !important;
}

.sp-qty-count {
  font-size: 15px;
  font-weight: 700;
  color: #EF7F1B !important;
  line-height: 1;
  min-width: 20px;
  text-align: center;
  margin: 4px 0;
}

/* Buy row — same 8px gap as home listing */
.sp-buy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.sp-btn-buy,
.sp-btn-buy:focus,
.sp-btn-buy:focus-visible,
.sp-btn-add-cart:focus,
.sp-btn-add-cart:focus-visible {
  outline: none;
  box-shadow: none;
}

.sp-btn-buy {
  background: #EF7F1B !important;
  color: #fff !important;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 14px !important;
  border: none !important;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.sp-btn-buy:disabled {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  pointer-events: none;
}

.sp-btn-buy:hover:not(:disabled) {
  background: #d86d0f !important;
  transform: scale(1.03);
}

.sp-btn-add-cart {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  background: #030619 !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: none !important;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 !important;
  gap: 0;
  transition: transform 0.2s, background 0.2s;
}

.sp-btn-add-cart:hover {
  background: #111738 !important;
  color: #fff;
  transform: scale(1.06);
}

.sp-seller {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
}

/* ---- 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;
  }
}