/**
 * Single Product Page - Base Styles
 * Container, layout, loading/error states, section headers
 */

/* ============================================================================
   CONTAINER & LAYOUT - Compact Professional
   ============================================================================ */

.single-product-page {
    min-height: 100vh;
    padding: 24px 0 80px;
    background-color: var(--bg-primary);
}

.single-product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 2vw, 1.25rem);
}

/* ============================================================================
   SEO H1 - Server-side rendered for crawlers
   Hidden when Alpine.js loads (x-cloak)
   ============================================================================ */

.product-seo-h1 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px clamp(0.75rem, 2vw, 1.25rem) 0;
    font-size: clamp(1.25rem, 3vw + 0.25rem, 1.75rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ============================================================================
   LOADING & ERROR STATES
   ============================================================================ */

.product-loading,
.product-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.product-error__title {
    font-size: clamp(1.25rem, 3vw + 0.25rem, 1.75rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   SECTION HEADERS - Compact Professional
   ============================================================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    margin-bottom: clamp(1rem, 1.5vw, 1.25rem);
    padding-bottom: clamp(0.75rem, 1vw, 0.875rem);
    border-bottom: 2px solid var(--accent);
}

.section-header__title {
    font-size: clamp(1rem, 2vw + 0.1rem, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-header__count {
    font-size: clamp(0.7rem, 1vw, 0.75rem);
    color: var(--text-secondary);
    font-weight: 500;
}

.section-header__link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: clamp(0.75rem, 1.2vw, 0.8125rem);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.section-header__link:hover {
    gap: 8px;
    text-decoration: underline;
}

.section-header__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.section-header__updated {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 3px 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    font-weight: 600;
}

.section-header__updated svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* ============================================================================
   X-CLOAK & UTILITIES
   ============================================================================ */

[x-cloak] {
    display: none !important;
}
