/* Storenest PHP storefront — shared + per-theme (sn-theme-{code}) */
.sn-body { font-family: system-ui, -apple-system, sans-serif; margin: 0; color: #111; background: #fafafa; line-height: 1.5; }
.sn-body--dark { background: #0f172a; color: #f8fafc; }
.sn-body--dark .sn-header { background: #1e293b; border-color: #334155; }
.sn-body--dark .sn-product-card { border-color: #334155; background: #1e293b; }
.sn-body--dark .sn-footer { color: #94a3b8; }

.sn-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 2rem; background: #fff; border-bottom: 1px solid #e5e7eb; }
.sn-header__brand { text-decoration: none; color: inherit; }
.sn-header__logo { max-height: 40px; width: auto; }
.sn-header__search { display: flex; flex: 1; min-width: 200px; max-width: 420px; gap: 0.5rem; }
.sn-header__search input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 6px; }
.sn-header__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-left: auto; }
.sn-header__nav a { color: inherit; text-decoration: none; }
.sn-header__nav a:hover { text-decoration: underline; }
.sn-nav-dropdown summary { cursor: pointer; list-style: none; }
.sn-nav-dropdown ul { position: absolute; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 0.5rem; margin: 0.25rem 0 0; list-style: none; min-width: 180px; z-index: 10; }
.sn-body--dark .sn-nav-dropdown ul { background: #1e293b; border-color: #334155; }

.sn-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.sn-footer { text-align: center; padding: 2rem; color: #6b7280; border-top: 1px solid #e5e7eb; margin-top: 3rem; }
.sn-footer__nav { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; }
.sn-footer__nav a { color: inherit; }

.sn-hero { padding: 2rem 0 3rem; }
.sn-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.sn-lead { font-size: 1.125rem; color: #4b5563; max-width: 40rem; }
.sn-body--dark .sn-lead { color: #cbd5e1; }
.sn-badge { display: inline-block; background: #2563eb; color: #fff; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; margin-bottom: 0.5rem; }
.sn-muted { color: #6b7280; }
.sn-muted-box { background: #f3f4f6; border-radius: 8px; padding: 1.5rem; margin-top: 1.5rem; }
.sn-error { color: #b91c1c; }
.sn-flash--error { background: #fef2f2; border: 1px solid #fecaca; padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }

.sn-btn { display: inline-block; padding: 0.65rem 1.25rem; background: #111; color: #fff; text-decoration: none; border: none; border-radius: 6px; cursor: pointer; font-size: 1rem; }
.sn-btn:hover { opacity: 0.9; }
.sn-btn--light { background: #fff; color: #111; border: 1px solid #e5e7eb; }
.sn-btn--ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.sn-btn--sm { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
.sn-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sn-input { padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; }
.sn-input--qty { width: 4rem; }
.sn-form label { display: block; margin-bottom: 1rem; }
.sn-search-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; max-width: 480px; }

.sn-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.sn-product-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem; background: #fff; }
.sn-product-card img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; }
.sn-product-card__placeholder { height: 160px; background: #e5e7eb; border-radius: 4px; }
.sn-product-card h3 { font-size: 1rem; margin: 0.5rem 0; }
.sn-price { font-weight: 600; }
.sn-product-card button { margin-top: 0.5rem; width: 100%; padding: 0.5rem; cursor: pointer; }

.sn-product-detail__image { max-width: 400px; border-radius: 8px; }
.sn-cart-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.sn-cart-table th, .sn-cart-table td { border-bottom: 1px solid #e5e7eb; padding: 0.75rem; text-align: left; vertical-align: middle; }
.sn-cart-total { font-size: 1.125rem; }
.sn-cart-qty-form { display: flex; align-items: center; }
.sn-pagination { margin-top: 2rem; }
.sn-category-list { list-style: none; padding: 0; }
.sn-category-list > li { margin-bottom: 1rem; }
.sn-category-list ul { margin-top: 0.5rem; padding-left: 1.25rem; }
.sn-prose { max-width: 65ch; }

/* Per-theme accents */
.sn-theme-2nrn .sn-badge { background: #0ea5e9; }
.sn-theme-fmn .sn-hero--fmn { border-left: 4px solid #dc2626; padding-left: 1rem; }
.sn-theme-solar .sn-hero--solar { background: linear-gradient(135deg, #fef3c7, #fde68a); padding: 2rem; border-radius: 12px; }
.sn-theme-karate .sn-hero--karate { border-bottom: 3px solid #111; }
.sn-theme-focus .sn-hero--focus h1 { letter-spacing: -0.02em; font-size: 2.5rem; }
.sn-theme-customizor .sn-hero--customizor { border: 2px dashed #6366f1; padding: 2rem; border-radius: 8px; }

@media (max-width: 640px) {
  .sn-header { flex-direction: column; align-items: stretch; }
  .sn-header__nav { margin-left: 0; justify-content: flex-start; }
}
