/* ═══════════════════════════════════════════════════════════════════════
   Moneta Marketplace – Single Product Page
   Gold: #F4AE01  |  Dark: #1a1a2e  |  Radius: 12px
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset within scope ──────────────────────────────────────────────── */
.sp-wrap *, .sp-wrap *::before, .sp-wrap *::after { box-sizing: border-box; }
.sp-wrap { --gold: #F4AE01; --gold-d: #d49700; --radius: 12px; }

/* ── Breadcrumb ───────────────────────────────────────────────────────── */
.sp-breadcrumb {
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}
.sp-breadcrumb__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: .82rem;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.sp-breadcrumb a { color: #555; text-decoration: none; }
.sp-breadcrumb a:hover { color: var(--gold-d); }
.sp-bc-sep { color: #bbb; }

/* ── Outer wrap ──────────────────────────────────────────────────────── */
.sp-wrap {
  background: #f4f4f7;
  min-height: 70vh;
  padding-bottom: 60px;
}

/* ── Container ───────────────────────────────────────────────────────── */
.sp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

/* ── Main two-column grid ────────────────────────────────────────────── */
.sp-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  padding: 32px;
  margin-bottom: 32px;
}

/* ════════════════════════════════════════════════════════════
   GALLERY
   ════════════════════════════════════════════════════════════ */
.sp-gallery { position: relative; }

.sp-gallery__main {
  position: relative;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}
.sp-gallery__main:hover .sp-gallery__main-img { transform: scale(1.04); }

.sp-gallery__no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #ccc;
  padding: 40px;
}
.sp-gallery__no-image p { font-size: .85rem; }

/* Badge */
.sp-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.sp-badge--sale  { background: #ef4444; color: #fff; }
.sp-badge--stock { background: #22c55e; color: #fff; }
.sp-badge--oos   { background: #9ca3af; color: #fff; }

/* Thumbnails */
.sp-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.sp-gallery__thumb {
  width: 68px;
  height: 68px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #fafafa;
  transition: border-color .15s;
  flex-shrink: 0;
}
.sp-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-gallery__thumb:hover,
.sp-gallery__thumb.active { border-color: var(--gold); }

/* ════════════════════════════════════════════════════════════
   INFO PANEL
   ════════════════════════════════════════════════════════════ */

/* Category chips */
.sp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.sp-cat-chip {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold-d);
  background: rgba(244,174,1,.1);
  border: 1px solid rgba(244,174,1,.3);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
  transition: background .15s;
}
.sp-cat-chip:hover { background: rgba(244,174,1,.2); }

/* Title */
.sp-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.25;
  margin: 0 0 16px;
}

/* Price */
.sp-price-wrap { margin-bottom: 16px; }
.sp-price { font-size: 1.85rem; font-weight: 800; color: #1a1a2e; }
.sp-price ins { text-decoration: none; color: var(--gold-d); }
.sp-price del { font-size: 1.1rem; color: #9ca3af; font-weight: 400; }
.sp-price--none { font-size: 1.1rem; color: #6b7280; font-weight: 500; }
.sp-price .amount { font-size: inherit; font-weight: inherit; color: inherit; }
/* WooCommerce outputs .price span.amount – style it */
.sp-price > .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: var(--gold-d); }

/* Short description */
.sp-short-desc {
  font-size: .92rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}

/* Stock / SKU */
.sp-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .82rem;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sp-stock {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.sp-stock--in  { color: #16a34a; }
.sp-stock--out { color: #dc2626; }
.sp-stock svg  { flex-shrink: 0; }
.sp-sku { color: #6b7280; }

/* ── Add to cart + Buy Now ────────────────────────────────────────── */
.sp-atc-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* Row: qty stepper + ATC button */
.sp-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Quantity stepper */
.sp-qty-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  height: 48px;
}
.sp-qty-btn {
  width: 40px;
  height: 100%;
  background: #f9fafb;
  border: 0;
  font-size: 1.3rem;
  color: #374151;
  cursor: pointer;
  transition: background .15s;
}
.sp-qty-btn:hover { background: #f1f5f9; }
.sp-qty-input {
  width: 52px;
  height: 100%;
  text-align: center;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  -moz-appearance: textfield;
}
.sp-qty-input::-webkit-inner-spin-button,
.sp-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ATC button */
.sp-btn-atc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #1a1a2e;
  font-weight: 700;
  font-size: .95rem;
  padding: 0 28px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}
.sp-btn-atc:hover  { background: var(--gold-d); }
.sp-btn-atc:active { transform: scale(.97); }
.sp-btn-atc.loading,
.sp-btn-atc.success { opacity: .85; cursor: default; }
.sp-btn-atc.success { background: #22c55e; color: #fff; }

/* Buy Now button */
.sp-btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a1a2e;
  color: #fff;
  border: 2px solid #1a1a2e;
  border-radius: 8px;
  height: 48px;
  padding: 0 24px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
  flex: 1;
  justify-content: center;
}
.sp-btn-buy:hover  { background: #2d2d4e; border-color: #2d2d4e; }
.sp-btn-buy:active { transform: scale(.97); }
.sp-btn-buy.loading { opacity: .8; cursor: default; }

/* ATC button also flex: 1 so both buttons share the row evenly */
.sp-cta-row .sp-btn-atc {
  flex: 1;
  justify-content: center;
}

/* Status message */
.sp-atc-status {
  font-size: .85rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.sp-atc-status.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sp-atc-status.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Notices */
.sp-notice {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 12px;
}
.sp-notice--warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.sp-notice--oos  { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

/* ── Delivery box ─────────────────────────────────────────────────── */
.sp-delivery-box {
  background: #f8fafc;
  border: 1px solid #e8ecf0;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.sp-delivery-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .83rem;
  color: #4b5563;
}
.sp-delivery-item svg { color: var(--gold-d); flex-shrink: 0; }
.sp-delivery-item strong { color: #1a1a2e; }

/* Back link */
.sp-back-link {
  display: inline-block;
  font-size: .82rem;
  color: #6b7280;
  text-decoration: none;
  transition: color .15s;
}
.sp-back-link:hover { color: var(--gold-d); }

/* ════════════════════════════════════════════════════════════
   DESCRIPTION / SPECS TABS
   ════════════════════════════════════════════════════════════ */
.sp-tabs-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  padding: 0 32px 28px;
  margin-bottom: 32px;
}
.sp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}
.sp-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 16px 20px;
  font-size: .9rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.sp-tab:hover  { color: #1a1a2e; }
.sp-tab.active { color: #1a1a2e; border-bottom-color: var(--gold); }

.sp-tab-panel { display: none; }
.sp-tab-panel.active { display: block; }

.sp-description {
  font-size: .92rem;
  color: #374151;
  line-height: 1.75;
}
.sp-description h2, .sp-description h3 { margin: 1em 0 .4em; color: #1a1a2e; }
.sp-description ul, .sp-description ol { padding-left: 1.4em; }

.sp-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.sp-specs-table th, .sp-specs-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}
.sp-specs-table th {
  width: 180px;
  color: #6b7280;
  font-weight: 500;
}
.sp-specs-table td { color: #1a1a2e; font-weight: 600; }
.sp-specs-table a  { color: var(--gold-d); text-decoration: none; }
.sp-specs-table tr:last-child th,
.sp-specs-table tr:last-child td { border-bottom: 0; }

/* ════════════════════════════════════════════════════════════
   RELATED PRODUCTS
   ════════════════════════════════════════════════════════════ */
.sp-related { margin-bottom: 48px; }
.sp-related__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
}
.sp-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sp-related__card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
  display: block;
}
.sp-related__card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  transform: translateY(-3px);
}
.sp-related__card-img {
  aspect-ratio: 1;
  background: #f8f8f8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-related__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.sp-related__card:hover .sp-related__card-img img { transform: scale(1.06); }
.sp-related__no-img { width: 100%; height: 100%; background: #f3f4f6; }
.sp-related__card-info { padding: 12px 14px; }
.sp-related__card-name {
  font-size: .85rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-related__card-price {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gold-d);
  margin: 0;
}
.sp-related__card-price .amount { color: inherit; }
.sp-related__card-price ins { text-decoration: none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sp-main { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .sp-related__grid { grid-template-columns: repeat(2, 1fr); }
  .sp-container { padding: 16px 16px 0; }
  .sp-tabs-section { padding: 0 16px 20px; }
}
@media (max-width: 500px) {
  .sp-title { font-size: 1.3rem; }
  .sp-price { font-size: 1.5rem; }
  .sp-btn-atc { font-size: .85rem; padding: 0 18px; }
  .sp-related__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
