:root {
    color: #1f2933;
    background: #f4f5f6;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f4f5f6; color: #1f2933; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(16px, 5vw, 64px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e1e5e8;
}

.brand {
    font-weight: 800;
    color: #c52828;
    font-size: 1.1rem;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #3e4c59;
    flex-wrap: wrap;
}

.nav a.active {
    color: #c52828;
    font-weight: 700;
}

.nav-user {
    color: #6b7780;
    font-weight: 700;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: #d6dce1;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border: 1px solid #d6dce1;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
}

.language-switcher a {
    padding: 2px 6px;
    border-radius: 999px;
}

.language-switcher a.active {
    background: #c52828;
    color: #fff;
}

.hero {
    min-height: 72vh;
    display: grid;
    align-items: end;
    padding: 72px clamp(16px, 6vw, 80px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(20, 24, 28, 0.86), rgba(20, 24, 28, 0.52)),
        url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero > div { max-width: 760px; }
.hero h1 { margin: 8px 0 16px; font-size: clamp(3rem, 8vw, 6rem); line-height: 1; color: #fff; }
.hero p { max-width: 620px; font-size: 1.15rem; color: #eef1f3; }

.eyebrow {
    text-transform: uppercase;
    color: #c52828;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0;
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.admin-actions { margin: 0 0 20px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: #c52828;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.button.secondary { background: #2f3a43; }
.button.danger { background: #a61f1f; }
.button.compact { min-height: 34px; padding: 0 12px; font-size: 0.88rem; }
.button:hover { color: #fff; filter: brightness(0.95); }

.section { padding: 56px clamp(16px, 6vw, 80px); }
.narrow { max-width: 860px; margin: 0 auto; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
h1, h2, h3 { line-height: 1.1; color: #18212a; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 8px 0 18px; }
h2 { font-size: 1.5rem; }

.category-grid, .metric-grid, .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
    align-items: stretch;
    gap: 16px;
}

.category-tile, .product-card, .form-panel, .table-panel, .metric, .result-box, .info-grid > div, .empty-state {
    background: #fff;
    border: 1px solid #e1e5e8;
    border-radius: 8px;
    padding: 18px;
}

.category-tile { display: flex; flex-direction: column; gap: 8px; min-height: 112px; }
.category-tile span, .muted { color: #6b7780; }
.info-grid > div { display: grid; gap: 8px; }
.info-grid > div span { color: #52616d; }
.product-card { width: 100%; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-image { height: 300px; display: grid; place-items: center; overflow: hidden; padding: 16px; border-bottom: 1px solid #eef1f3; background: linear-gradient(180deg, #fff, #f2f5f7); color: #52616d; font-weight: 800; }
.product-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; border-radius: 4px; }
.product-body { padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product-body h3 { margin: 0; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stock { font-size: 0.75rem; font-weight: 800; color: #166534; }

.why-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: #2f3a43;
    color: #fff;
}

.why-band div { padding: 24px; display: grid; gap: 4px; background: #202a32; }
.why-band strong { color: #fff; }
.why-band span { color: #dfe3e6; }

.filter-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #dfe3e6; border-radius: 8px; padding: 10px; margin-bottom: 18px; }
.filter-bar input { flex: 1; border: 0; outline: 0; min-width: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.page-button { min-width: 42px; min-height: 40px; padding: 0 14px; border: 1px solid #d6dce1; border-radius: 6px; background: #fff; color: #2f3a43; font-weight: 800; cursor: pointer; }
.page-button:hover:not(:disabled), .page-button.active { border-color: #c52828; background: #c52828; color: #fff; }
.page-button:disabled { cursor: not-allowed; opacity: 0.45; }
.product-detail, .split, .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.detail-media { min-height: 420px; display: grid; place-items: center; overflow: hidden; padding: 24px; border-radius: 8px; background: linear-gradient(180deg, #fff, #f2f5f7); color: #52616d; font-weight: 800; }
.detail-media img { width: 100%; height: 100%; object-fit: contain; object-position: center; border-radius: 4px; }
.price { font-size: 2rem; font-weight: 900; color: #c52828; margin: 16px 0; }
.spec-list { display: grid; gap: 8px; margin: 18px 0; }
.spec-list div, .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #eef1f3; padding: 12px 0; }

.form-panel { display: grid; gap: 14px; }
.auth-panel { max-width: 520px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cbd2d9; border-radius: 6px; padding: 10px 12px; background: #fff; }
textarea { min-height: 130px; resize: vertical; }
.success { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #dcfce7; color: #166534; font-weight: 700; }
.form-message { margin: 0; color: #c52828; font-weight: 800; }
.status-message { margin: 16px 0; }
.result-box { margin-top: 18px; overflow: auto; }

.footer { padding: 24px clamp(16px, 6vw, 80px); display: flex; justify-content: space-between; gap: 16px; background: #18212a; color: #fff; }
.footer-map { color: #fff; font-weight: 800; text-decoration: underline; }
.sticky-cta { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; }
.sticky-cta a { display: inline-flex; align-items: center; gap: 8px; background: #c52828; color: #fff; padding: 10px 14px; border-radius: 999px; font-weight: 800; box-shadow: 0 8px 20px rgba(0,0,0,0.18); }

.metric strong { display: block; font-size: 2rem; color: #c52828; }
.dimension-note { color: #52616d; font-weight: 700; }
.contact-list { display: grid; gap: 12px; }
.contact-list a, .contact-list span { display: flex; align-items: center; gap: 10px; }
.redirecting { padding: 24px; }
.quote-list { display: grid; gap: 14px; }
.quote-card { display: grid; gap: 16px; padding: 16px 0 0; border-top: 1px solid #eef1f3; }
.quote-card:first-child { padding-top: 0; border-top: 0; }
.quote-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.quote-card-header h2 { margin: 0 0 4px; font-size: 1.2rem; }
.quote-card-header span, .quote-detail-grid span, .quote-detail-grid p { color: #52616d; }
.quote-status { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; background: #fff4d6; color: #7a4f00; font-weight: 800; white-space: nowrap; }
.quote-contact-grid, .quote-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.quote-contact-grid a, .quote-detail-grid > div { display: grid; gap: 4px; padding: 12px; border: 1px solid #eef1f3; border-radius: 8px; background: #f8fafb; }
.quote-notes { grid-column: 1 / -1; }
.quote-notes p { margin: 0; white-space: pre-wrap; }

.admin-title { align-items: flex-start; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.form-grid label:last-child { grid-column: 1 / -1; }
.image-upload-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dfe3e6;
    border-radius: 8px;
    background: #f8fafb;
}
.image-upload-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.image-upload-header h2 { margin: 0 0 4px; font-size: 1.05rem; }
.image-upload-header span { color: #6b7780; font-weight: 700; }
.upload-status { color: #166534; }
.image-upload-layout {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.image-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 10px;
    border: 1px solid #cbd2d9;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #eef1f3);
}
.image-preview img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.image-upload-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-message { width: 100%; margin: 0; }
.image-confirm { width: 100%; }
.admin-product-list { display: grid; gap: 0; }
.admin-product-row {
    display: grid;
    grid-template-columns: 72px minmax(220px, 1fr) minmax(110px, auto) minmax(120px, auto) auto;
}
.admin-product-thumb { width: 64px; height: 64px; padding: 4px; object-fit: contain; object-position: center; border: 1px solid #dfe3e6; border-radius: 6px; background: #f8fafb; }
.admin-product-name { display: grid; gap: 2px; }
.admin-product-name small { color: #6b7780; font-weight: 700; }
.confirm-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin: 0 0 10px;
    border: 1px solid #f2b8b8;
    border-radius: 8px;
    background: #fff7f7;
}
.confirm-panel p { margin: 4px 0 0; }
.compact-actions { margin-top: 0; display: flex; flex-wrap: wrap; gap: 8px; }

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

@media (max-width: 820px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .nav { gap: 12px; }
    .nav-divider { display: none; }
    .product-detail, .split, .two-col { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .image-upload-layout { grid-template-columns: 1fr; }
    .image-upload-header { flex-direction: column; }
    .admin-product-row { grid-template-columns: 1fr; align-items: start; }
    .admin-product-thumb { width: 100%; height: 180px; }
    .confirm-panel { align-items: stretch; flex-direction: column; }
    .footer { flex-direction: column; }
}
