/* ================================================================
   MAURER METALL BAU — style.css
   Technical / Industrial Design System
================================================================ */

/* ── Reset & Variables ───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:          #0d0d0d;
    --bg-panel:    #131313;
    --bg-card:     #191919;
    --bg-input:    #111;
    --border:      #252525;
    --border-hi:   #333;
    --border-acc:  #7c2d12;
    --text:        #d4d4d4;
    --text-muted:  #737373;
    --text-dim:    #404040;
    --accent:      #ea580c;
    --accent-hi:   #f97316;
    --accent-bg:   rgba(234,88,12,0.08);
    --accent-border: rgba(234,88,12,0.3);
    --green:       #166534;
    --green-text:  #4ade80;
    --yellow:      #92400e;
    --yellow-text: #fbbf24;
    --red:         #7f1d1d;
    --red-text:    #f87171;
    --font:        'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --mono:        'Consolas', 'Courier New', 'Liberation Mono', monospace;
    --radius:      2px;
    --transition:  0.15s ease;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hi);
}

img { display: block; max-width: 100%; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    flex: 1;
    padding: 40px 0 80px;
}

/* ── Header / Nav ────────────────────────────────────────────── */
.site-header {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

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

.logo-mark {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-mark svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.logo-text-top {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo-text-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    color: var(--accent) !important;
    padding: 7px 14px !important;
    border-radius: var(--radius) !important;
    font-family: var(--mono) !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.05em;
}

.cart-link:hover {
    background: rgba(234,88,12,0.15) !important;
    color: var(--accent-hi) !important;
}

.cart-link svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
}

.cart-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

/* ── Page Title Bar ──────────────────────────────────────────── */
.page-bar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.page-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-bar__title {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-bar__title span {
    color: var(--accent);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--text-dim); }
.breadcrumb .current { color: var(--text); }

/* ── Category Filter ─────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 0 28px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.filter-bar__label {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-right: 8px;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.04em;
}

.filter-btn:hover {
    border-color: var(--border-hi);
    color: var(--text);
    background: rgba(255,255,255,0.04);
}

.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
}

/* ── Product Grid ────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-card {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    transition: background var(--transition);
    position: relative;
}

.product-card:hover {
    background: #1e1e1e;
}

.product-card.hidden {
    display: none;
}

.product-card__icon {
    padding: 28px 28px 20px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__icon svg {
    width: 56px;
    height: 56px;
    stroke: var(--border-hi);
    transition: stroke var(--transition);
}

.product-card:hover .product-card__icon svg {
    stroke: var(--accent);
}

.product-card__body {
    padding: 0 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card__sku {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

.product-card__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.product-card__spec {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 5px 8px;
    background: rgba(255,255,255,0.03);
    border-left: 2px solid var(--border-hi);
}

.product-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.product-card__price {
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.product-card__unit {
    font-size: 0.7rem;
    color: var(--text-dim);
    flex: 1;
}

.product-card__actions {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
    text-decoration: none;
}

.btn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    flex: 1;
}

.btn--primary:hover {
    background: var(--accent-hi);
    border-color: var(--accent-hi);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    border-color: var(--border-hi);
    color: var(--text-muted);
}

.btn--ghost:hover {
    border-color: var(--border-hi);
    color: var(--text);
    background: rgba(255,255,255,0.04);
}

.btn--danger {
    background: transparent;
    border-color: transparent;
    color: var(--text-dim);
}

.btn--danger:hover {
    color: var(--red-text);
    border-color: rgba(248,113,113,0.3);
}

.btn--outline {
    background: transparent;
    border-color: var(--accent-border);
    color: var(--accent);
}

.btn--outline:hover {
    background: var(--accent-bg);
}

.btn--sm {
    font-size: 0.75rem;
    padding: 5px 10px;
}

.btn--lg {
    font-size: 0.9rem;
    padding: 11px 22px;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--mono);
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: var(--radius);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge--green {
    background: rgba(22,101,52,0.25);
    color: var(--green-text);
    border: 1px solid rgba(74,222,128,0.2);
}

.badge--yellow {
    background: rgba(146,64,14,0.25);
    color: var(--yellow-text);
    border: 1px solid rgba(251,191,36,0.2);
}

.badge--red {
    background: rgba(127,29,29,0.25);
    color: var(--red-text);
    border: 1px solid rgba(248,113,113,0.2);
}

/* ── Product Detail Page ─────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
    align-items: start;
}

.detail-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.detail-preview svg {
    width: 120px;
    height: 120px;
    stroke: var(--accent);
}

.detail-preview__label {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-align: center;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-info__header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.detail-info__sku {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.detail-info__name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
}

.detail-info__spec {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-info__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* Spec Table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.spec-table__heading {
    background: rgba(255,255,255,0.03);
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-weight: 400;
}

.spec-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-table td:first-child {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    width: 40%;
    white-space: nowrap;
}

.spec-table td:last-child {
    color: var(--text);
}

/* Add to cart panel */
.add-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.add-panel__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.add-panel__price-main {
    font-family: var(--mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.add-panel__price-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
}

.qty-control button {
    background: rgba(255,255,255,0.04);
    border: none;
    color: var(--text-muted);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all var(--transition);
}

.qty-control button:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

.qty-control input {
    background: var(--bg-input);
    border: none;
    border-left: 1px solid var(--border-hi);
    border-right: 1px solid var(--border-hi);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.9rem;
    padding: 8px 0;
    text-align: center;
    width: 56px;
    -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.qty-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

/* ── Cart Table ──────────────────────────────────────────────── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.section-heading {
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table th {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    text-align: left;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
    white-space: nowrap;
}

.data-table th:not(:first-child) {
    text-align: right;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table td:not(:first-child) {
    text-align: right;
}

.cart-product-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.cart-product-sku {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.cart-product-spec {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-qty-form {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.cart-qty-form input[type="number"] {
    background: var(--bg-input);
    border: 1px solid var(--border-hi);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.82rem;
    padding: 5px 8px;
    border-radius: var(--radius);
    width: 64px;
    text-align: center;
    -moz-appearance: textfield;
}

.cart-qty-form input::-webkit-outer-spin-button,
.cart-qty-form input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.price-col {
    font-family: var(--mono);
    color: var(--text);
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.83rem;
}

.summary-row--total {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.summary-row__label {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.75rem;
}

.summary-row__value {
    font-family: var(--mono);
    color: var(--text);
}

.summary-row--total .summary-row__label {
    color: var(--text);
    font-weight: 600;
    font-size: 0.82rem;
}

.summary-row--total .summary-row__value {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-divider {
    height: 1px;
    background: var(--border);
}

/* ── Empty States ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-dim);
}

.empty-state__icon {
    margin: 0 auto 20px;
    width: 56px;
    height: 56px;
    stroke: var(--border-hi);
}

.empty-state__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.empty-state__text {
    font-size: 0.83rem;
    margin-bottom: 24px;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 18px 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.footer-links a:hover {
    color: var(--text-muted);
}

/* ── Notice ──────────────────────────────────────────────────── */
.notice {
    background: rgba(234,88,12,0.06);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.55;
}

.notice svg {
    width: 15px;
    height: 15px;
    stroke: var(--accent);
    fill: none;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Info Bar (Demo notice) ──────────────────────────────────── */
.info-bar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 7px 0;
}

.info-bar__text {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.06em;
}

.info-bar__text span {
    color: var(--accent);
}

/* ── Modal Overlay (Checkout) ────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}

.modal__icon {
    width: 48px;
    height: 48px;
    stroke: var(--accent);
    fill: none;
    margin: 0 auto 20px;
}

.modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.modal__text {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-mono   { font-family: var(--mono); }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 880px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid  { grid-template-columns: 1fr; }
    .cart-layout  { grid-template-columns: 1fr; }
    .detail-preview { padding: 32px; }
}

@media (max-width: 580px) {
    .product-grid { grid-template-columns: 1fr; }
    .nav-links    { display: none; }
    .header-inner { justify-content: space-between; }
}
