/* Modern Product Detail Styles */
:root {
  --sp-font: 'Inter', 'Sarabun', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --sp-text: #0f172a;
  --sp-muted: #64748b;
  --sp-border: #e5e7eb;
  --sp-bg: #ffffff;
  --sp-soft: #f8fafc;
  --sp-primary: #2563eb;
  --sp-primary-dark: #1e40af;
}

.sp-container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; font-family: var(--sp-font); }
.sp-breadcrumb { font-size: 0.9rem; color: var(--sp-muted); margin-bottom: 0.75rem; }
.sp-title { font-size: 1.75rem; font-weight: 700; color: var(--sp-text); margin: 0.25rem 0 0.75rem; }
.sp-subtitle { color: var(--sp-muted); }

.sp-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2rem; align-items: start; }

/* Gallery */
.sp-gallery { position: relative; background: var(--sp-bg); border: 1px solid var(--sp-border); border-radius: 12px; overflow: hidden; }
.sp-gallery-main { position: relative; aspect-ratio: 1 / 1; background: var(--sp-soft); display: grid; place-items: center; }
.sp-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.sp-nav { position: absolute; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; width: 100%; padding: 0 0.5rem; }
.sp-nav button { border: none; background: rgba(255,255,255,0.85); color: var(--sp-text); width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.08); cursor: pointer; }
.sp-thumbs { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--sp-border); overflow-x: auto; }
.sp-thumb { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.sp-thumb.active { border-color: var(--sp-primary); }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Info */
.sp-info-card { background: var(--sp-bg); border: 1px solid var(--sp-border); border-radius: 12px; padding: 1rem; }
.sp-price { font-size: 1.25rem; font-weight: 700; color: var(--sp-primary); margin-bottom: 0.5rem; }
.sp-meta { color: var(--sp-muted); font-size: 0.95rem; }
.sp-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1px solid var(--sp-border); background: var(--sp-soft); color: var(--sp-text); padding: 0.6rem 0.9rem; border-radius: 8px; cursor: pointer; text-decoration: none; }
.sp-btn-primary { background: linear-gradient(135deg, var(--sp-primary), var(--sp-primary-dark)); color: #fff; border: none; }

/* Tabs */
.sp-tabs { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.sp-tab-btn { background: transparent; border: none; padding: 0.5rem 0.75rem; font-weight: 600; color: var(--sp-muted); cursor: pointer; }
.sp-tab-btn.active { color: var(--sp-text); }
.sp-tab { display: none; padding: 0.75rem 0; }
.sp-tab.active { display: block; }

/* Related */
.sp-related { margin-top: 2rem; }
.sp-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.sp-card { background: var(--sp-bg); border: 1px solid var(--sp-border); border-radius: 12px; overflow: hidden; }
.sp-card img { width: 100%; height: 160px; object-fit: cover; }
.sp-card-body { padding: 0.75rem; }
.sp-card-title { font-size: 1rem; font-weight: 600; color: var(--sp-text); }
.sp-card-price { color: var(--sp-primary); font-weight: 600; }
.sp-card-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

@media (max-width: 960px) {
  .sp-layout { grid-template-columns: 1fr; }
}