/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette — light theme */
    --bg-main: #eef1f6;
    --bg-sidebar: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.92);
    --border-color: rgba(15, 23, 42, 0.1);

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-on-accent: #ffffff;

    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.12);
    --secondary: #7c3aed;
    --secondary-glow: rgba(124, 58, 237, 0.1);

    --accent-cyan: #0891b2;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;

    --surface-input: #f9fafb;
    --surface-input-focus: #ffffff;
    --surface-subtle: rgba(15, 23, 42, 0.04);
    --surface-hover: rgba(15, 23, 42, 0.07);
    --header-bg: rgba(255, 255, 255, 0.92);
    --overlay: rgba(15, 23, 42, 0.45);

    --font-heading: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Layout Variables */
    --header-height: 70px;
    --sidebar-width: 320px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 18px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-blur: blur(12px);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

body.fonts-loaded {
    --font-heading: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.25);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-header {
    height: var(--header-height);
    background-color: var(--header-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-container {
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.category-nav {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: center;
    max-width: 420px;
    margin: 0 auto;
}

.category-nav .category-tab {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border-color);
    background: var(--surface-input);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.category-nav .category-tab:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--text-primary);
}

.category-nav .category-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: var(--text-on-accent);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28);
}

.category-nav .category-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-on-accent);
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-text .site-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    background: linear-gradient(to right, #111827, #6d28d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text .site-tagline {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin: -2px 0 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--text-on-accent);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
}

.page-hero {
    margin-bottom: 20px;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.page-hero-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 52rem;
}

.site-footer {
    margin: 32px auto 24px;
    padding: 20px 24px;
    max-width: 1400px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.site-footer p {
    margin: 0 0 8px;
}

.site-footer-note {
    font-size: 0.75rem;
    opacity: 0.9;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.site-footer-nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.site-footer-nav a:hover {
    text-decoration: underline;
}

.site-footer-yazlabs {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.site-footer-yazlabs a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
}

.site-footer-yazlabs a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.site-top-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    font-size: 0.9rem;
}

.site-top-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.site-top-nav a:hover,
.site-top-nav a.is-active {
    color: var(--primary);
}

.site-top-nav a.is-active {
    font-weight: 600;
}

.site-top-nav-header {
    margin-left: 0;
    margin-right: 8px;
}

@media (max-width: 900px) {
    .site-top-nav-header {
        display: none;
    }
}

.static-page-body {
    background: linear-gradient(180deg, var(--bg-main) 0%, #f4f6fb 100%);
}

.static-page {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 24px) 24px 48px;
}

.static-page-card {
    padding: 28px 32px;
}

.static-page-card h1 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    margin: 0 0 12px;
}

.static-page-card h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin: 24px 0 10px;
}

.static-page-card p {
    margin: 0 0 12px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.static-page-lead {
    font-size: 1.05rem;
    color: var(--text-primary) !important;
    font-weight: 500;
}

.static-page-list {
    margin: 0 0 16px;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.static-page-meta {
    margin-top: 28px !important;
    font-size: 0.9rem;
}

.static-page-meta-small {
    margin-top: 16px !important;
    font-size: 0.85rem;
}

.contact-form-wrap {
    margin: 20px 0;
    min-height: 200px;
}

.contact-form-iframe {
    display: block;
    width: 100%;
    max-width: 640px;
    min-height: 720px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: #fff;
}

@media (max-width: 768px) {
    .static-page-card {
        padding: 20px;
    }

    .site-top-nav {
        gap: 12px;
        font-size: 0.85rem;
    }

    .contact-form-iframe {
        min-height: 600px;
    }
}

.site-footer-account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.site-footer-user {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.data-badge {
    background-color: var(--surface-subtle);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

.pulse-dot.inactive {
    background-color: var(--text-muted);
    box-shadow: none;
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 24px) 24px 40px;
    display: flex;
    gap: 24px;
    min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR & FILTERS
   ========================================================================== */
.filters-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: flex-start;
    max-height: calc(100dvh - var(--header-height) - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bg-sidebar);
    box-shadow: 0 8px 12px -8px var(--bg-sidebar);
}

.category-filter-panel[hidden] {
    display: none !important;
}

.filter-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.chip-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
}

.chip-filter-item .brand-label {
    font-size: 12px;
    line-height: 1.3;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 22px;
}

.filter-group-row {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.filter-group.half {
    flex: 1;
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.filter-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-label-row .filter-label {
    margin-bottom: 0;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.filter-actions .btn-text.btn-xs {
    padding: 2px 0;
    font-size: 11px;
    white-space: nowrap;
}

.filter-actions .btn-text.btn-xs:disabled {
    opacity: 0.45;
    cursor: default;
}

.filter-value {
    font-size: 13px;
    color: var(--accent-cyan);
    font-weight: 500;
}

/* Form Elements */
.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    background-color: var(--surface-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px 10px 38px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--surface-input-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.custom-select {
    width: 100%;
    background-color: var(--surface-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--surface-input);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.custom-checkbox input:checked + .checkbox-box {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkbox-box::after {
    content: '';
    width: 8px;
    height: 4px;
    border-left: 2px solid var(--text-on-accent);
    border-bottom: 2px solid var(--text-on-accent);
    transform: rotate(-45deg) translate(1px, -1px);
}

.custom-checkbox:hover .checkbox-box {
    border-color: var(--text-secondary);
}

.store-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Capacity Tag Selectors (Grid Items looking like buttons) */
.capacity-tag {
    cursor: pointer;
    user-select: none;
}

.capacity-tag input {
    display: none;
}

.capacity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-subtle);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.capacity-tag input:checked + .capacity-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: var(--text-on-accent);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.capacity-tag:hover .capacity-btn {
    border-color: var(--text-muted);
}

/* Range Slider */
.range-slider-container {
    position: relative;
    height: 6px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.range-slider {
    position: absolute;
    width: 100%;
    height: 6px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
}

.range-slider::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--primary);
    cursor: pointer;
    pointer-events: auto;
    -webkit-appearance: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
    transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-track {
    position: absolute;
    height: 100%;
    left: 0;
    right: 0;
    background-color: var(--surface-hover);
    border-radius: 3px;
    z-index: 1;
}

/* ==========================================================================
   DASHBOARD CONTENT
   ========================================================================== */
.dashboard-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Glass Card */
.glass-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: var(--glass-blur);
    transition: border-color 0.3s, transform 0.3s;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.metric-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.metric-card-link:hover:not(.is-disabled) {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: var(--shadow-md);
}

.metric-card-link.is-disabled {
    cursor: default;
    pointer-events: none;
}

.metric-card-cta {
    position: absolute;
    right: 20px;
    bottom: 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.metric-card-link:hover:not(.is-disabled) .metric-card-cta {
    opacity: 1;
}

/* Cards glowing accents */
.purple-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    pointer-events: none;
}
.blue-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}
.green-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--surface-input);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.purple-glow .metric-icon {
    color: var(--secondary);
    background-color: var(--secondary-glow);
    border-color: rgba(139, 92, 246, 0.3);
}

.blue-glow .metric-icon {
    color: var(--primary);
    background-color: var(--primary-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.green-glow .metric-icon {
    color: var(--accent-emerald);
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.metric-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.metric-value-row .value {
    font-size: 26px;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.metric-value-row .unit {
    font-size: 14px;
    color: var(--text-secondary);
}

.metric-info .desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    padding: 24px;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.chart-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-body {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chart-body-compact {
    min-height: 0;
    gap: 0;
}

.chart-card-compact {
    min-width: 0;
}

.chart-more-hint {
    margin: 10px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state.compact {
    padding: 24px 16px;
    font-size: 13px;
}

/* Custom CSS/HTML Progress Bar Chart */
.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.chart-bar-row:last-child {
    margin-bottom: 0;
}

.chart-bar-row-btn {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-sm);
    padding: 6px 8px;
    margin: 0 -8px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.chart-bar-row-btn:hover {
    background: var(--surface-hover);
}

.chart-bar-row-btn.is-active {
    background: var(--primary-glow);
    outline: 1px solid rgba(79, 70, 229, 0.25);
}

.chart-bar-label {
    width: 72px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-container {
    flex-grow: 1;
    height: 12px;
    background-color: var(--surface-input);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
    transition: width 0.8s cubic-bezier(0.1, 0.76, 0.55, 0.94);
}

.chart-bar-fill.seagate {
    background: linear-gradient(90deg, #10b981, #059669);
}

.chart-bar-fill.wd {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.chart-bar-fill.toshiba {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.chart-bar-value {
    width: 72px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-primary);
    flex-shrink: 0;
    text-align: right;
}

/* SVG Distribution Chart */
.svg-chart-container {
    width: 100%;
    height: 180px;
}

.svg-chart {
    width: 100%;
    height: 100%;
}

.svg-bar {
    fill: var(--primary);
    opacity: 0.8;
    transition: opacity 0.2s, fill 0.3s;
    cursor: pointer;
}

.svg-bar:hover {
    opacity: 1;
    fill: var(--secondary);
}

.svg-text {
    fill: var(--text-secondary);
    font-size: 11px;
    font-family: var(--font-body);
}

.svg-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
    stroke-dasharray: 4, 4;
}

/* Results header bar */
.results-header-bar {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.results-view-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-selector label {
    font-size: 13px;
    color: var(--text-muted);
}

.custom-select.compact {
    padding: 6px 12px;
    font-size: 13px;
    width: auto;
}

.view-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    background-color: var(--surface-subtle);
    border-radius: var(--border-radius-sm);
    padding: 2px;
}

.btn-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}

.btn-toggle.active {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.btn-toggle:hover:not(.active) {
    color: var(--text-secondary);
}

/* ==========================================================================
   PRODUCTS VIEWS (GRID & TABLE)
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100%;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.product-card-link:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.product-card-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.product-image-wrap {
    margin-bottom: 16px;
}

/* Store Badge overlay */
.store-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-sm);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.store-badge.de,
.store-badge.co-uk {
    border-color: rgba(217, 119, 6, 0.35);
}

.store-badge.nl {
    border-color: rgba(234, 88, 12, 0.35);
}

.store-badge.fr,
.store-badge.it,
.store-badge.es {
    border-color: rgba(79, 70, 229, 0.3);
}

.store-badge.scan-co-uk {
    border-color: rgba(37, 99, 235, 0.35);
}

.store-filters-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.store-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.store-filter-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 2px 0 4px;
}

.store-filter-item {
    margin: 0;
    width: 100%;
    min-width: 0;
}

.store-filter-item.custom-checkbox {
    padding: 4px 0;
    align-items: flex-start;
}

.store-filter-item .store-label-with-name {
    overflow: visible;
}

.store-label-with-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.store-label-with-name .flag-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.store-label-with-name .store-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    flex: 1 1 auto;
}

.store-label-flag-only {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    line-height: 1;
}

.store-label-flag-only .flag-icon {
    font-size: 20px;
}

.store-badge.store-flag-only {
    padding: 4px 7px;
    font-size: 18px;
    line-height: 1;
    cursor: help;
    gap: 0;
}

.comparison-table .store-badge.store-flag-only {
    position: static;
    display: inline-flex;
}

.product-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
}

.product-image-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.product-image-link .product-image-container {
    margin-bottom: 0;
}

/* Product Image container */
.product-image-container {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-subtle);
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-image {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

/* Specifications row */
.specs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-capacity {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4338ca;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.badge-brand {
    background-color: var(--surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-interface {
    background-color: rgba(8, 145, 178, 0.1);
    color: #0e7490;
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.badge-interface.sas {
    background-color: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge-interface.nvme {
    background-color: rgba(234, 88, 12, 0.1);
    color: #c2410c;
    border: 1px solid rgba(234, 88, 12, 0.2);
}

.badge-factor {
    background-color: var(--surface-subtle);
    color: var(--text-secondary);
}

/* Product Info */
.product-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.product-title-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.product-card-link .product-title span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-link:hover .product-title span {
    color: var(--primary);
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.stars {
    color: var(--accent-amber);
    letter-spacing: -2px;
}

/* Value & Pricing */
.price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push to bottom of card */
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-val {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.price-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.value-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.value-tb-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    background-color: rgba(6, 182, 212, 0.08);
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(6, 182, 212, 0.15);
}

/* Buy CTA (visual only — card is the link) */
.buy-button {
    margin-top: 14px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--surface-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    pointer-events: none;
}

.product-card-link:hover .buy-button {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-accent);
}

/* Product Comparison Table View */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.comparison-table th {
    background-color: var(--bg-sidebar);
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.comparison-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}

.comparison-table tr:hover td {
    background-color: var(--surface-subtle);
}

.comparison-table tr.table-row-link {
    cursor: pointer;
}

.comparison-table tr.table-row-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.table-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background-color: var(--surface-subtle);
}

.table-title {
    max-width: 350px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-price-tb {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 500;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-on-accent);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    padding: 8px 16px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s;
}

.btn-text:hover {
    color: var(--text-secondary);
}

.btn-text.btn-xs {
    font-size: 11px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.btn-close:hover {
    color: var(--text-primary);
}

/* Loading placeholders */
.loading-placeholder {
    height: 100px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.04) 25%, rgba(15, 23, 42, 0.08) 50%, rgba(15, 23, 42, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-md);
    width: 100%;
}

.loading-placeholder.mini {
    height: 60px;
}

.loading-placeholder.large {
    height: 350px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 16px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
}

.toast.error {
    border-left-color: var(--accent-rose);
}

.toast.success {
    border-left-color: var(--accent-emerald);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .app-container {
        flex-direction: column;
    }
    
    .filters-sidebar {
        width: 100%;
        position: static;
        max-height: min(70dvh, calc(100dvh - var(--header-height) - 120px));
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .category-nav {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .logo-text .site-tagline {
        display: none;
    }

    .data-badge {
        font-size: 11px;
    }

    .metric-card-cta {
        display: none;
    }
}

/* ==========================================================================
   AUTH (Google Sign-In), WATCHLIST DRAWER
   ========================================================================== */

.auth-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-signin-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    max-width: min(320px, 42vw);
}

.site-footer-debug.auth-setup-hint {
    margin: 12px 0 0;
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.85;
}

.auth-setup-hint {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-muted);
}

.auth-setup-label {
    display: block;
}

.auth-origin-copy {
    display: inline-block;
    margin: 2px 0;
    padding: 1px 6px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    background: var(--surface-subtle);
    color: var(--primary);
    font-family: ui-monospace, monospace;
    font-size: 10px;
    cursor: pointer;
}

.auth-origin-copy:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.auth-setup-also {
    display: block;
    margin-top: 2px;
}

.auth-setup-warn {
    display: block;
    margin-top: 4px;
    color: var(--accent-amber);
}

.auth-setup-link {
    display: inline-block;
    margin-top: 4px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-setup-link:hover {
    text-decoration: underline;
}

.auth-status {
    color: var(--text-muted);
    font-size: 12px;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-subtle);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-hover);
    flex-shrink: 0;
}

.user-avatar[hidden] {
    display: none !important;
}

.user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary);
    background: var(--primary-glow);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.user-name {
    max-width: 180px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.watchlist-count {
    color: var(--text-on-accent);
    font-weight: 600;
}

/* Drawer */
.watchlist-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 1500;
}

.watchlist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 420px;
    max-width: calc(100vw - 24px);
    z-index: 1501;
    background-color: rgba(255, 255, 255, 0.97);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 16px 16px 20px;
    overflow-y: auto;
}

.watchlist-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.watchlist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.watchlist-item {
    border: 1px solid var(--border-color);
    background-color: var(--surface-subtle);
    border-radius: var(--border-radius-md);
    padding: 12px;
}

.watchlist-item-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.watchlist-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.watchlist-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.watch-button {
    pointer-events: auto;
    margin-top: 10px;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--surface-subtle);
    color: var(--text-primary);
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card-link .watch-button {
    pointer-events: auto;
}

.watch-button:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.45);
}

.watch-button.is-watched {
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.35);
}

.watch-button .watch-icon {
    font-size: 16px;
}

.table-watch-btn {
    padding: 8px 10px;
}

.table-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-row-actions .btn {
    padding: 8px 10px;
}

.admin-panel {
    margin-top: 14px;
    padding: 14px 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--surface-subtle);
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.admin-status {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 12px;
}

.admin-subtitle {
    margin: 16px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-products-section {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.admin-product-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.custom-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--surface-input);
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-input-focus);
}

.admin-product-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.admin-product-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.admin-product-result:hover {
    border-color: rgba(79, 70, 229, 0.45);
    background: var(--surface-subtle);
}

.admin-product-result-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-product-result-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.admin-product-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-form-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.admin-form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.admin-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.admin-checkbox {
    margin-top: 4px;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

/* SEO product landing page */
.product-page-body {
    background: linear-gradient(180deg, var(--bg-main) 0%, #f4f6fb 100%);
}

.product-header-container {
    width: 100%;
}

.product-logo-link {
    text-decoration: none;
    color: inherit;
}

.product-header-cta {
    flex-shrink: 0;
}

.product-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 20px) 24px 48px;
}

.product-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.product-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.product-breadcrumb a:hover {
    text-decoration: underline;
}

.product-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 24px;
    background: linear-gradient(145deg, #fff 0%, var(--surface-subtle) 100%);
}

.product-gallery-image {
    max-width: 100%;
    max-height: 360px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius-md);
}

.product-gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.product-buy-panel {
    padding: 24px;
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.product-buy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.product-badge-store {
    background: var(--surface-subtle);
    color: var(--text-secondary);
    border-color: var(--border-color);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.product-chip {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.product-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.product-brand-line {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.product-rating {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-rating-stars {
    color: var(--accent-amber);
}

.product-price-block {
    margin: 16px 0 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.product-price-main {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.product-metric-secondary {
    margin: 6px 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-metric-unit {
    font-weight: 500;
    font-size: 0.95rem;
}

.product-cta-row {
    margin-bottom: 12px;
}

.product-buy-btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
}

.product-affiliate-note {
    margin: 0 0 12px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.product-updated {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-panel-wide {
    margin-bottom: 20px;
    padding: 22px 24px;
}

.product-summary {
    margin: 0 0 14px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-primary);
    font-weight: 500;
}

.product-detail-p {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.product-detail-p:last-child {
    margin-bottom: 0;
}

.product-reviews-text,
.product-price-note {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.product-price-note {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--surface-subtle);
    border-radius: var(--border-radius-md);
    border-left: 3px solid var(--primary);
}

.product-badge-nas {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.25);
}

.product-badge-shuck {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.product-badge-warn {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-amber);
    border-color: rgba(245, 158, 11, 0.25);
}

.product-badge-muted {
    background: var(--surface-subtle);
    color: var(--text-muted);
    border-color: var(--border-color);
}

.product-highlights {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.product-highlights li {
    line-height: 1.45;
}

.product-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.product-panels .product-panel:has(#product-history-heading) {
    grid-column: 1 / -1;
}

.product-panel {
    padding: 22px 24px;
}

.product-panel h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0 0 6px;
}

.product-panel-lead {
    margin: 0 0 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.product-panel-muted .product-panel-lead {
    margin-bottom: 0;
}

.product-spec-grid {
    margin: 0;
    display: grid;
    gap: 0;
}

.product-spec-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.product-spec-row:last-child {
    border-bottom: none;
}

.product-spec-row dt {
    margin: 0;
    font-weight: 600;
    color: var(--text-muted);
}

.product-spec-row dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 500;
}

.product-price-chart {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.product-chart-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.product-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.product-site-footer {
    margin-top: 0;
}

@media (max-width: 900px) {
    .product-hero {
        grid-template-columns: 1fr;
    }

    .product-buy-panel {
        position: static;
    }

    .product-gallery {
        min-height: 240px;
    }

    .product-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .product-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .product-header-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .product-spec-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ==========================================================================
   COOKIE CONSENT & LEGAL PAGES
   ========================================================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    padding: 16px;
    pointer-events: none;
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent-inner {
    pointer-events: auto;
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 22px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.cookie-consent-inner h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cookie-consent-inner p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.cookie-consent-inner a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-link-btn:hover {
    color: var(--primary);
}

.legal-doc h1 {
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.legal-doc h2 {
    font-size: 1.05rem;
    margin: 1.5rem 0 0.5rem;
}

.legal-doc p,
.legal-doc li {
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
}

.legal-doc code {
    font-size: 0.88em;
    background: var(--surface-subtle);
    padding: 2px 6px;
    border-radius: 4px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin: 1rem 0;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--surface-subtle);
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 700px) {
    .legal-table {
        display: block;
        overflow-x: auto;
    }
}
