/* ===== Zmienne – tu najłatwiej zmienić kolorystykę strony ===== */
:root {
    --color-primary: #f59e0b;
    --color-primary-dark: #b45309;
    --color-dark: #1f2933;
    --color-text: #2d3748;
    --color-muted: #6b7280;
    --color-bg: #f7f7f5;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .04);
    --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

body { min-height: 100vh; display: flex; flex-direction: column; }
#app { display: flex; flex-direction: column; flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--color-primary-dark); }
a:hover { color: var(--color-dark); }
h1, h2, h3 { color: var(--color-dark); line-height: 1.25; }
h1 { font-size: 2rem; margin: .25rem 0 .5rem; }
h1:focus { outline: none; }
h2 { font-size: 1.5rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.page { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }
.lead { font-size: 1.15rem; color: var(--color-muted); margin-top: 0; }
.muted { color: var(--color-muted); }
.small { font-size: .875rem; }

/* ===== Przyciski ===== */
.btn {
    display: inline-block;
    padding: .6rem 1.2rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: var(--color-dark); }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--color-dark); }
.btn-large { font-size: 1.25rem; padding: .8rem 1.6rem; }

/* ===== Nagłówek ===== */
.site-header { background: var(--color-dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding-top: .75rem; padding-bottom: .75rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand:hover { color: var(--color-primary); }
.brand-mark { width: 32px; height: 32px; }
.main-nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.main-nav a { color: #e5e7eb; text-decoration: none; padding: .4rem .75rem; border-radius: 6px; }
.main-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main-nav a.active { color: var(--color-primary); }

/* ===== Stopka ===== */
.site-footer { background: var(--color-dark); color: #cbd5e1; padding: 2rem 0 1rem; font-size: .95rem; }
.site-footer a { color: #e5e7eb; }
.site-footer a:hover { color: var(--color-primary); }
.site-footer strong { color: #fff; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.footer-links { display: flex; flex-direction: column; gap: .25rem; }
.footer-copy { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: #94a3b8; }

/* ===== Strona główna ===== */
.hero {
    background: linear-gradient(135deg, rgba(31, 41, 51, .92), rgba(31, 41, 51, .75)),
                repeating-linear-gradient(45deg, var(--color-primary) 0 20px, var(--color-dark) 20px 40px);
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}
.hero h1 { color: #fff; font-size: 2.4rem; }
.hero .lead { color: #e5e7eb; max-width: 40rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.section { margin: 2.5rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.about p { max-width: 50rem; }
.cta { background: var(--color-surface); border-radius: var(--radius); padding: 1.5rem 2rem; box-shadow: var(--shadow); }
.steps li { margin-bottom: .5rem; }

/* ===== Siatka kafelków ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.grid-small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 1rem; }
.subheading { font-size: 1.25rem; margin-top: 1.5rem; }

.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); color: inherit; }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--color-border); }
.card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.card-body p { margin: 0 0 .5rem; font-size: .95rem; }
.price-tag { margin-top: auto !important; color: var(--color-primary-dark); font-size: 1rem !important; }
.price-tag strong { font-size: 1.2rem; }

/* ===== Okruszki ===== */
.breadcrumbs { font-size: .9rem; color: var(--color-muted); margin-bottom: .75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs [aria-current] { color: var(--color-text); }

/* ===== Szczegóły sprzętu ===== */
.details { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.gallery-main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--color-border); }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; cursor: pointer; background: none; width: 90px; }
.thumb img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.thumb.active { border-color: var(--color-primary); }

.price-box, .contact-box, .panel {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}
.price-box h2 { margin-top: 0; font-size: 1.2rem; }
.price-table, .spec-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td, .spec-table th, .spec-table td { padding: .5rem 0; border-bottom: 1px solid var(--color-border); text-align: left; }
.price-table td { text-align: right; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.price-table .deposit th, .price-table .deposit td { color: var(--color-muted); font-weight: 400; font-size: 1rem; }
.spec-table { max-width: 40rem; }
.spec-table th { font-weight: 400; color: var(--color-muted); width: 45%; }
.contact-box p { margin-top: 0; }
.details-text { max-width: 50rem; }

/* ===== Kontakt ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.panel h2 { margin-top: 0; }
.contact-phone { font-size: 1.5rem; font-weight: 700; }
.contact-phone a { text-decoration: none; }
.plain-list { list-style: none; padding: 0; }

/* ===== Regulamin ===== */
.terms { max-width: 50rem; }
.terms h2 { font-size: 1.2rem; margin-top: 2rem; }
.terms li { margin-bottom: .35rem; }
.notice { background: #fef3c7; border-left: 4px solid var(--color-primary); padding: .75rem 1rem; border-radius: 4px; }

/* ===== Telefon / wąskie ekrany ===== */
@media (max-width: 800px) {
    .details { grid-template-columns: 1fr; }
    .header-inner { gap: .5rem 1rem; }
    .main-nav { order: 3; flex-basis: 100%; }
    .header-phone { margin-left: auto; padding: .4rem .8rem; }
    .hero { padding: 2rem 1.25rem; }
    .hero h1 { font-size: 1.8rem; }
}

/* ===== Elementy Blazora (ładowanie, błędy) ===== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Wystąpił błąd."; }

.loading-progress { position: absolute; display: block; width: 8rem; height: 8rem; inset: 20vh 0 auto 0; margin: 0 auto; }
.loading-progress circle { fill: none; stroke: #e0e0e0; stroke-width: 0.6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child {
    stroke: var(--color-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(20vh + 3.25rem) 0 auto 0.2rem; }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Wczytywanie"); }

/* ===== Kategorie sprzętu (etykiety na stronie szczegółów) ===== */
.category-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.tag { background: #fef3c7; color: var(--color-primary-dark); padding: .2rem .7rem; border-radius: 999px; font-size: .85rem; text-decoration: none; }
.tag:hover { background: var(--color-primary); color: var(--color-dark); }
.highlights li { margin-bottom: .3rem; }
