/* =====================================================================
   SPC NACZEPY - style własne (nakładka na Bootstrap 5)

   Kierunek wizualny wzorowany na evo.wielton.com:
   - jasna, "czysta" strona: biel + jasne szarości, dużo powietrza,
   - grafitowy tekst zamiast czerni, zielony akcent marki,
   - przyciski w kształcie pigułki (border-radius 30px), obrys 2 px,
   - typografia Inter, powiększona podstawa (17-18 px),
   - brak ciężkich cieni; separacja elementów cienką linią.
   ===================================================================== */

:root {
    --ink:        #191b22;   /* tekst podstawowy, ciemny grafit */
    --ink-2:      #303641;   /* tekst drugorzędny */
    --muted:      #5f5f5f;   /* opisy, podpisy */
    --line:       #e6e6e6;   /* linie i obrysy */
    --surface:    #f7f7f7;   /* tło sekcji przeplatanych */
    --surface-2:  #fafafa;
    --accent:     #86bc25;   /* zielony akcent (akcje, ceny, ikony) */
    --accent-dark:#6fa01c;
    --info:       #0097ec;
    --radius-pill: 30px;
}

/* ------------------------------ BAZA ------------------------------ */
body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.0625rem;           /* 17 px */
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--ink); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -.01em; color: var(--ink); }

.text-accent  { color: var(--accent) !important; }
.bg-accent    { background-color: var(--accent) !important; }
.bg-surface   { background-color: var(--surface) !important; }
.text-muted-2 { color: var(--muted) !important; }
.border-line  { border-color: var(--line) !important; }

/* --------------------------- PRZYCISKI ---------------------------- */
.btn {
    border-radius: var(--radius-pill);
    font-weight: 600;
    padding: .65rem 1.75rem;
    border-width: 2px;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-lg { padding: .85rem 2.25rem; font-size: 1.0625rem; }
.btn-sm { padding: .4rem 1.1rem; font-size: .9375rem; }

.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-accent:hover, .btn-accent:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}
.btn-outline-accent {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--accent-dark);
}
.btn-outline-accent:hover {
    background-color: var(--accent);
    color: #fff;
}
.btn-ink {
    background-color: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.btn-ink:hover { background-color: var(--ink-2); border-color: var(--ink-2); color: #fff; }

.btn-outline-ink {
    background-color: transparent;
    border-color: var(--ink);
    color: var(--ink);
}
.btn-outline-ink:hover { background-color: var(--ink); color: #fff; }

/* --------------------------- PASEK GÓRNY --------------------------- */
.topbar {
    background: var(--ink);
    color: rgba(255, 255, 255, .8);
    font-size: .9375rem;
    padding: .6rem 0;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--accent); }

/* ------------------------------ MENU ------------------------------ */
.site-nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.site-nav .navbar-brand { font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; padding-block: 0; }

/* Logo TrailerTec - proporcje 812 x 154.88, więc szerokość liczy się sama */
.site-logo {
    display: block;
    height: 38px;
    width: auto;
    max-width: 100%;
}
.site-logo-footer { height: 32px; }
@media (max-width: 575.98px) {
    .site-logo { height: 30px; }
}
.site-nav .nav-link {
    color: var(--ink);
    font-weight: 500;
    padding-inline: 1rem;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active { color: var(--accent-dark); }
.site-nav .navbar-toggler { border-color: var(--line); }

/* ------------------------------ HERO ------------------------------ */
.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.hero h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 700;
    line-height: 1.12;
}
.hero-lead { color: var(--muted); font-size: 1.125rem; max-width: 46ch; }

.hero-stat {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}
.hero-stat .value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.hero-stat .label { color: var(--muted); font-size: .9375rem; }

.hero-figure {
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* --------------------------- PASEK KORZYŚCI ------------------------ */
.benefits { border-bottom: 1px solid var(--line); }
.benefit {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1.5rem 0;
}
.benefit i { color: var(--accent); font-size: 1.5rem; line-height: 1; }
.benefit .t { font-weight: 600; }
.benefit .d { color: var(--muted); font-size: .9375rem; }

/* --------------------------- NAGŁÓWKI SEKCJI ----------------------- */
.section-eyebrow {
    display: inline-block;
    color: var(--accent-dark);
    font-weight: 600;
    font-size: .8125rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 700; margin-bottom: .5rem; }
.section-lead  { color: var(--muted); max-width: 62ch; }

/* ---------------------------- FILTRY ------------------------------ */
.filter-pill {
    border: 2px solid var(--line);
    border-radius: var(--radius-pill);
    padding: .4rem 1.15rem;
    font-weight: 500;
    font-size: .9375rem;
    color: var(--ink-2);
    background: #fff;
    white-space: nowrap;
}
.filter-pill:hover { border-color: var(--ink); color: var(--ink); }
.filter-pill.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.filter-pill .count { opacity: .55; margin-left: .3rem; }

/* -------------------------- KARTA PRODUKTU ------------------------- */
.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color .18s ease, transform .18s ease;
}
.product-card:hover { border-color: var(--ink); transform: translateY(-2px); }

.product-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    overflow: hidden;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.04); }

.product-tag {
    position: absolute;
    top: .8rem;
    left: .8rem;
    background: rgba(25, 27, 34, .88);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .3rem .7rem;
    border-radius: var(--radius-pill);
}
.product-tag.is-new { background: var(--accent); }

/* Plakietka naczepy promowanej w panelu - prawy górny róg zdjęcia */
.product-promo {
    position: absolute;
    top: .8rem;
    right: .8rem;
    background: #f5a524;
    color: #191b22;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .3rem .7rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.product-body { padding: 1.35rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.product-brand {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}
.product-name { font-size: 1.1875rem; font-weight: 600; margin: .25rem 0 .5rem; }
.product-name a:hover { color: var(--accent-dark); }
.product-desc { color: var(--muted); font-size: .9375rem; }

/* Termin gotowości na kafelku - kupujący pyta o niego zaraz po cenie,
   więc nie chowamy go między szare "pigułki" w .product-meta */
.product-readiness {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-top: .9rem;
    padding: .5rem .75rem;
    border-radius: .5rem;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    font-size: .8125rem;
    line-height: 1.35;
    color: var(--ink-2);
}
.product-readiness i      { color: var(--accent); line-height: 1.35; }
.product-readiness .label { color: var(--muted); }
.product-readiness strong { color: var(--ink); }
/* „Na magazynie" to najmocniejszy argument sprzedażowy - własny, zielony wariant.
   Kolor ciemniejszy od akcentu marki, żeby kontrast z tłem był czytelny. */
.product-readiness.is-stock {
    border-left-color: #1a7f37;
    background: rgba(26, 127, 55, .07);
}
.product-readiness.is-stock i,
.product-readiness.is-stock strong { color: #1a7f37; }

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: .9rem 0 1.1rem;
}
.product-meta span {
    font-size: .8125rem;
    color: var(--ink-2);
    background: var(--surface);
    border-radius: var(--radius-pill);
    padding: .2rem .7rem;
}
/* VIN to ciąg liter i cyfr - stała szerokość znaku ułatwia porównanie z dokumentem.
   Nieco mniejszy stopień, bo VIN D-TEC-a ma 17 znaków i inaczej rozpycha wiersz. */
.product-meta span.is-vin {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: .75rem;
    letter-spacing: .01em;
}

.product-price {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    margin-top: auto;
}
.product-price .amount { font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.product-price .note { color: var(--muted); font-size: .8125rem; }

/* ================ DOKUMENTY (regulamin, polityka) ================== */
.legal-doc { max-width: 46rem; }
.legal-doc h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: .35rem; }
.legal-doc h2 {
    font-size: 1.1875rem;
    margin: 2.25rem 0 .85rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    scroll-margin-top: 90px;      /* żeby kotwica nie chowała się pod menu */
}
.legal-doc h2:first-of-type { border-top: 0; padding-top: 0; }
.legal-doc h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; color: var(--ink-2); }
.legal-doc p, .legal-doc li { color: var(--ink-2); }
.legal-doc ol, .legal-doc ul { padding-left: 1.25rem; }
.legal-doc ol > li, .legal-doc ul > li { margin-bottom: .55rem; }
.legal-doc code {
    background: var(--surface);
    padding: .1rem .35rem;
    border-radius: 3px;
    font-size: .875em;
    color: var(--ink);
}
.legal-doc .spec-table { margin: 1rem 0 1.25rem; }
.legal-doc .spec-table td:first-child { width: 42%; }

.legal-meta {
    color: var(--muted);
    font-size: .9375rem;
    margin-bottom: 1.75rem;
}
.legal-lead {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 2rem;
}

.legal-toc { position: sticky; top: 90px; }
.legal-toc ol { padding-left: 1.1rem; margin: 0; font-size: .9375rem; }
.legal-toc li { margin-bottom: .4rem; }
.legal-toc a { color: var(--muted); }
.legal-toc a:hover { color: var(--accent-dark); }

@media (max-width: 991.98px) {
    .legal-toc { position: static; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
}

/* =========================== KONTAKT =============================== */
.contact-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.15rem 1.25rem;
}
.contact-card > i {
    color: var(--accent);
    font-size: 1.35rem;
    line-height: 1.4;
}
.contact-card .label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.contact-card .value {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink);
}
a.value:hover { color: var(--accent-dark); }
.contact-card .note { color: var(--muted); font-size: .9375rem; }

/* ============================ KOSZYK =============================== */
.cart-row { border-bottom: 1px solid var(--line); }
.cart-row:first-of-type { border-top: 1px solid var(--line); }

.cart-thumb {
    flex: 0 0 140px;
    width: 140px;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface-2);
    display: block;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Stała ilość w koszyku - naczepa to egzemplarz jednostkowy, nie ma czego zmieniać */
.cart-qty-fixed {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: .3rem .8rem;
    font-size: .8125rem;
    color: var(--muted);
}
.cart-qty-fixed strong { color: var(--ink); }
.cart-qty-fixed > i { color: var(--accent); }

/* Konfigurator dodatków przy pozycji koszyka */
.cart-options {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 0 0 1rem;
    background: var(--surface-2);
}
/* Konfigurator jest zawsze rozwinięty - to nie jest element do chowania,
   tylko główny sposób wyboru wyposażenia naczepy. */
.cart-options-head {
    margin: 0;
    padding: .7rem .9rem;
    font-weight: 600;
    font-size: .9375rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    border-bottom: 1px solid var(--line);
}
.cart-options-head .count {
    font-weight: 400;
    font-size: .8125rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: .1rem .6rem;
    margin-left: .35rem;
}
.cart-options-head .count { margin-left: auto; }
.cart-options-body { padding: .9rem; }

.option-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .6rem .75rem;
    margin-bottom: .45rem;
    cursor: pointer;
}
.option-row:hover { border-color: var(--ink-2); }
.option-row.active { border-color: var(--accent); background: rgba(134, 188, 37, .06); }
.option-row .body { flex: 1 1 auto; min-width: 0; }
.option-row .t { display: block; font-weight: 500; font-size: .9375rem; }
.option-row .d { display: block; font-size: .8125rem; color: var(--muted); }
.option-row .p { font-weight: 600; white-space: nowrap; }

/* Wyróżniona informacja w kolumnie podsumowania (np. naliczony rabat) */
.rep-badge {
    display: flex;
    gap: .7rem;
    align-items: center;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    padding: .7rem .9rem;
    border-radius: 0 4px 4px 0;
}
.rep-badge > i { color: var(--accent); font-size: 1.35rem; }

/* Lista naczep w edytorze dodatku (panel admina) */
.produkty-lista {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: .4rem;
}
.produkt-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem .5rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: .9375rem;
}
.produkt-row:hover { background: var(--surface); }

@media (max-width: 575.98px) {
    .cart-thumb { flex-basis: auto; width: 100%; }
}

/* ===================== KARTA PRODUKTU (produkt.php) ================= */
.breadcrumb-bar { border-bottom: 1px solid var(--line); font-size: .9375rem; }
.breadcrumb-bar a { color: var(--muted); }
.breadcrumb-bar a:hover { color: var(--ink); }

.gallery-main {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .5rem;
    margin-top: .5rem;
}
.gallery-thumb {
    aspect-ratio: 4 / 3;
    border: 2px solid transparent;
    border-radius: 3px;
    overflow: hidden;
    background: var(--surface-2);
    padding: 0;
    cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--accent); }

.gallery-counter {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    background: rgba(25, 27, 34, .8);
    color: #fff;
    font-size: .8125rem;
    padding: .25rem .7rem;
    border-radius: var(--radius-pill);
}

.buybox { border: 1px solid var(--line); border-radius: 4px; padding: 1.75rem; }
.buybox .price { font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.buybox .price-note { color: var(--muted); font-size: .875rem; }
.buybox .availability {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    padding: .8rem 1rem;
    font-size: .9375rem;
    color: var(--ink-2);
}

/* Termin gotowości w bloku zakupowym - mocniejszy niż zwykła informacja,
   bo to konkretna data, a nie ogólnik */
.buybox .readiness-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: .5rem;
    padding: .85rem 1rem;
}
.readiness-label {
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    color: var(--muted);
}
.readiness-label i { color: var(--accent); }
.readiness-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin: .15rem 0 .3rem;
    color: var(--ink);
}
.readiness-note { font-size: .8125rem; color: var(--muted); }

.buybox .readiness-box.is-stock {
    border-left-color: #1a7f37;
    background: rgba(26, 127, 55, .07);
}
.readiness-box.is-stock .readiness-label i,
.readiness-box.is-stock .readiness-value { color: #1a7f37; }

.spec-table { width: 100%; }
.spec-table td {
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.spec-table td:first-child { color: var(--muted); width: 45%; }
.spec-table td:last-child  { font-weight: 500; }

.prose p { margin-bottom: 1rem; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }

.accordion-button:not(.collapsed) { background: var(--surface); color: var(--ink); box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: var(--line); }

/* ------------------------------ STOPKA ----------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    color: var(--ink-2);
    font-size: .9375rem;
}
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent-dark); }
.footer-title {
    font-weight: 600;
    font-size: .9375rem;
    margin-bottom: 1rem;
    color: var(--ink);
}
.footer-bottom {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .875rem;
}

/* --------------------------- PRZYCISK "DO GÓRY" -------------------- */
.btn-back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1030;
}
.btn-back-to-top.show { display: flex; }

/* ---------------------------- PANEL ADMINA ------------------------- */
.admin-body { background: var(--surface); }
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    background: var(--ink);
    width: 240px;
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-brand {
    display: block;
    padding: 1.25rem 1.25rem 1rem;
}
.admin-brand img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    border-radius: 6px;
    padding: .5rem .6rem;
}
.admin-brand:hover { color: #fff; }
.admin-sidebar .nav-link { color: rgba(255, 255, 255, .75); border-radius: 6px; padding: .6rem .9rem; font-weight: 500; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { background: rgba(255, 255, 255, .08); color: var(--accent); }
.admin-sidebar-footer {
    margin-top: auto;
    padding: 1rem .5rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.admin-main { flex: 1 1 auto; min-width: 0; }
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}
.admin-content { padding: 1.5rem; }

.admin-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}
.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.stat-tile {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.1rem 1.25rem;
    height: 100%;
    transition: border-color .15s ease;
}
.stat-tile:hover { border-color: var(--ink); }
.stat-tile .value { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stat-tile .label { font-weight: 600; color: var(--ink-2); }
.stat-tile .hint  { font-size: .8125rem; color: var(--muted); }

.admin-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }

/* Siatka zdjęć galerii w edytorze produktu */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
}
.upload-item {
    position: relative;
    display: block;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface-2);
    cursor: pointer;
}
.upload-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.upload-item-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .5rem;
    font-size: .8125rem;
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.upload-item:has(input:checked) { border-color: #dc3545; }
.upload-item:has(input:checked) img { opacity: .4; }
.upload-item:has(input:checked) .upload-item-bar { color: #dc3545; font-weight: 600; }

/* Krzyżyk do usunięcia zdjęcia - pokazuje go dopiero JavaScript.
   Bez niego zostaje pasek z polem wyboru i edytor działa jak dawniej. */
.upload-item-del {
    position: absolute;
    top: .35rem;
    right: .35rem;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(220, 53, 69, .92);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    /* Na dotyku nie ma najechania kursorem, więc krzyżyk jest widoczny zawsze */
    opacity: .85;
    transition: opacity .12s, transform .12s;
}
.upload-item-del:hover,
.upload-item-del:focus-visible { opacity: 1; transform: scale(1.1); }
.upload-item-del[hidden] { display: none; }
.admin-preview { max-width: 320px; width: 100%; border: 1px solid var(--line); border-radius: 4px; }

.admin-content .table thead th {
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    font-weight: 600;
}

.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(120deg, var(--ink), var(--ink-2));
    display: flex;
    align-items: center;
}

@media (max-width: 991.98px) {
    .admin-sidebar { position: fixed; left: -240px; z-index: 1040; transition: left .2s ease; }
    .admin-sidebar.open { left: 0; }
    .admin-content { padding: 1rem; }
}

/* ---------------------------- RESPONSYWNOŚĆ ------------------------ */

/*
 * Poprawka przesuwania strony w bok.
 * Bootstrap: .row z klasą g-5 ustawia --bs-gutter-x na 3rem, czyli daje
 * wierszowi marginesy -24 px z każdej strony, a .container ma tylko 12 px
 * paddingu. Nadmiar 12 px na stronę wypychał treść poza ekran - strona
 * dawała się przewijać poziomo na telefonach, a także tuż przy progu
 * 992 px, gdzie pionowy pasek przewijania zabiera część szerokości.
 *
 * Te wystające 12 px to pusty odstęp gutterów: treść kolumn zaczyna się
 * dopiero 24 px od krawędzi wiersza, więc przycięcie niczego nie ucina,
 * a odstępy między kolumnami zostają takie jak były.
 * Używamy `clip`, a nie `hidden` - clip nie tworzy kontekstu przewijania,
 * więc nie psuje position: sticky i nie chowa niczego w pionie.
 */
.container:has(> .row[class*="g-5"]),
.container:has(> .row[class*="gx-5"]) { overflow-x: clip; }

@media (max-width: 767.98px) {
    .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
    .buybox { padding: 1.25rem; }
    .buybox .price { font-size: 2rem; }
}

/* ------------------------------ DRUK ------------------------------- */
@media print {
    .topbar, .site-nav, .site-footer, .btn-back-to-top, .buybox .btn { display: none !important; }
}
