/* ============================================
   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: #ffffff;
  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;
}

/* 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: #BAE8BA !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: #BAE8BA !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.6 !important;
  margin-bottom: 14px;
}

.sp-desc-text p,
.sp-desc-text li,
.sp-desc-text div,
.sp-desc-text span,
.sp-desc-text * {
  line-height: 1.6 !important;
}

.sp-desc-text p {
  margin: 0 0 8px;
}

.sp-desc-text ul {
  list-style: disc !important;
  padding-left: 1.4em !important;
  margin: 0 0 10px;
}

.sp-desc-text ol {
  list-style: decimal !important;
  padding-left: 1.4em !important;
  margin: 0 0 10px;
}

.sp-desc-text li {
  margin: 0 0 4px;
}

.sp-desc-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 12px;
}

.sp-desc-text table th,
.sp-desc-text table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}

.sp-desc-text table th {
  background: #f8fafc;
  font-weight: 700;
}

.sp-desc-text img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 0;
  border-radius: 8px;
}

.sp-badge-item {
  cursor: pointer;
}

.sp-badge-item.is-active .sp-badge-icon {
  border-color: #ef7f1b !important;
  box-shadow: 0 0 0 2px rgba(239, 127, 27, 0.18);
}

.sp-badge-note {
  display: none;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  position: relative;
}

.sp-badge-note.is-open {
  display: block;
}

.sp-badge-note-title {
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
  margin: 0 0 4px;
}

.sp-badge-note-text {
  font-size: 12px;
  line-height: 1.5;
  color: #7c2d12;
  margin: 0;
  padding-right: 18px;
}

.sp-badge-note-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #c2410c;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* ============================================
   RESPONSIVE — desktop centering
   ============================================ */
@media (min-width: 768px) {
  .sp-img-slider {
    height: 340px;
  }

  .sp-product-title {
    font-size: 22px;
  }
}

/* ============================================
   PRODUCT RATINGS & REVIEWS SECTION
   ============================================ */
.sp-reviews-section {
  background: #ffffff;
  padding: 20px 16px 28px;
  border-top: 8px solid #f4f4f5;
  margin-top: 12px;
}

.sp-reviews-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.sp-reviews-title {
  font-size: 20px;
  font-weight: 700;
  color: #18181b;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.sp-reviews-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sp-rating-score-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp-rating-score {
  font-size: 32px;
  font-weight: 800;
  color: #ef7f1b;
  line-height: 1;
}

.sp-rating-star {
  font-size: 26px;
  color: #ef7f1b;
}

.sp-rating-counts {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.sp-count-line {
  font-size: 13px;
  color: #52525b;
  line-height: 1.25;
}

.sp-count-line strong {
  color: #18181b;
  font-weight: 700;
}

.sp-btn-add-review,
.sp-add-review-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #ffffff !important;
  background: #ef7f1b !important;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sp-btn-add-review:hover,
.sp-add-review-btn:hover {
  background: #d96e12 !important;
  color: #ffffff !important;
}

.sp-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-review-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sp-review-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sp-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.sp-user-avatar-initial {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-user-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.sp-review-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sp-review-rating-badge {
  background: #ef7f1b;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sp-review-rating-badge i {
  font-size: 10px;
}

.sp-review-dot {
  color: #94a3b8;
  font-size: 12px;
}

.sp-review-date {
  font-size: 12px;
  color: #64748b;
}

.sp-review-text {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.sp-review-media-gallery {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.sp-review-media-item {
  width: 65px;
  height: 65px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.sp-review-media-item:hover {
  transform: scale(1.04);
}

.sp-review-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-review-footer {
  display: flex;
  align-items: center;
}

.sp-helpful-btn {
  border: none;
  background: #f8fafc;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.sp-helpful-btn:hover,
.sp-helpful-btn.active {
  background: #ffedf0;
  color: #ea580c;
}

.sp-helpful-btn.active i {
  font-weight: 900;
}
