/* ============================================
   ooopony.pl - Główny arkusz stylów
   ============================================ */

/* Inter — self-hosted, latin + latin-ext (polskie znaki) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fallback dla polskich znaków (ą ę ó ś ź ż ć ń) jeśli latin-ext nie załadowany */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --primary: #2356A0;
    --primary-dark: #1a4080;
    --primary-light: #3a6fc0;
    --secondary: #1a1a1a;
    --accent: #f0a030;
    --success: #28a745;
    --warning: #f0a030;
    --danger: #dc3545;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #6c757d;
    --gray-700: #495057;
    --gray-900: #212529;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow: 0 2px 8px rgba(0,0,0,.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.12);
    --transition: all 0.2s ease;
}

/* ============================================
   Base
   ============================================ */

* { box-sizing: border-box; }

html {
    font-size: 18px;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-900);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.main-content {
    flex: 1;
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

.container-xxl { max-width: 1600px; }

/* ============================================
   Top Bar
   ============================================ */

.top-bar {
    background: var(--secondary);
    color: #fff;
    font-size: 0.78rem;
    padding: 6px 0;
}

.top-bar a {
    color: #ccc;
    text-decoration: none;
}
.top-bar a:hover { color: #fff; }

.top-bar-info span {
    margin-right: 18px;
}
.top-bar-info i, .top-bar-links i {
    margin-right: 4px;
}
.top-bar-links a {
    margin-left: 16px;
}

/* ============================================
   Main Header
   ============================================ */

.main-header {
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 1030;
}

.logo-link { display: inline-block; }
.logo-img { height: 42px; width: auto; }

/* Search */
.header-search { position: relative; }

.search-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    position: relative;
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    color: var(--gray-900);
    background: #fff;
    min-width: 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}
.search-input::placeholder { color: var(--gray-500); }
.search-input:focus { box-shadow: none; }
.search-btn {
    flex-shrink: 0;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.search-btn:hover { background: #1a4a8a; }

.search-suggestions,
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-top: 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
}
.search-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}
.search-dropdown-item:hover { background: var(--gray-100); color: var(--gray-900); }
.search-dropdown-info strong { color: var(--primary); }
.search-dropdown-info small { display: block; color: var(--gray-500); font-size: 0.78rem; }
.search-dropdown-price { font-weight: 700; color: var(--primary); white-space: nowrap; margin-left: 12px; }
.search-dropdown-empty { padding: 12px 16px; color: var(--gray-500); font-size: 0.9rem; }

/* Header Actions */
.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}
.header-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    color: var(--gray-700);
    text-decoration: none;
    position: relative;
    border: none;
    background: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.72rem;
}
.header-action-btn i { font-size: 1.4rem; }
.header-action-btn:hover {
    color: var(--primary);
    background: var(--gray-100);
}
.action-label {
    display: none;
}
@media (min-width: 992px) {
    .action-label { display: block; }
}

.badge-count {
    position: absolute;
    top: 0;
    right: 2px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Category Navigation */
.category-nav {
    background: var(--primary);
}
.category-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.category-nav-right {
    margin-left: auto;
}
.category-nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 18px 9px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.category-nav-link i {
    font-size: 1.15rem;
}
.category-nav-link:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-bottom-color: rgba(255,255,255,.4);
}
.category-nav-link.active {
    background: rgba(255,255,255,.18);
    color: #fff;
    border-bottom-color: rgba(255,255,255,.55);
}

/* ============================================
   Mobile Nav
   ============================================ */

.mobile-nav .nav-link {
    padding: 12px 16px;
    color: var(--gray-700);
    font-size: 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.mobile-nav .nav-link i { margin-right: 10px; width: 24px; text-align: center; }
.mobile-nav .nav-link:hover { background: var(--gray-100); color: var(--primary); }
.mobile-nav-divider {
    padding: 10px 16px;
    background: var(--gray-100);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

/* ============================================
   Hero / Banner
   ============================================ */

.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 50px 0;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="100" cy="100" r="80" fill="none" stroke="rgba(255,255,255,.05)" stroke-width="40"/></svg>') repeat;
    background-size: 200px;
    opacity: 0.3;
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

/* ============================================
   Tire Search Box (homepage)
   ============================================ */

.tire-search-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-top: -60px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #dee2e6;
}
.tire-search-box .nav-tabs {
    border: none;
    margin-bottom: 24px;
}
.tire-search-box .nav-tabs .nav-link {
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 10px 24px;
    font-weight: 600;
    color: var(--gray-700);
    margin-right: 8px;
}
.tire-search-box .nav-tabs .nav-link.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(35,86,160,.05);
}
.tire-search-box .form-select {
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
}
.tire-search-box .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35,86,160,.15);
}
.tire-search-box .btn-search-tires {
    padding: 12px 40px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Category cards (homepage) */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--gray-700);
}
.category-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.category-card i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--primary);
}
.category-card-title {
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   Product Cards
   ============================================ */

.product-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-bestseller {
    background: var(--accent);
    color: #000;
}
.badge-season-letnie { background: #fff3cd; color: #856404; }
.badge-season-zimowe { background: #d1ecf1; color: #0c5460; }
.badge-season-wielosezonowe { background: #d4edda; color: #155724; }

.product-card-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--gray-100);
}
.product-card-img img {
    max-height: 100%;
    object-fit: contain;
}
.product-card-img .placeholder-tire {
    font-size: 4rem;
    color: var(--gray-300);
}

.product-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-brand {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.product-card-brand-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.product-card-brand-logo img {
    max-height: 20px;
    max-width: 64px;
    width: auto;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: .85;
    transition: opacity .2s, filter .2s;
}
.product-card-brand-logo:hover img {
    opacity: 1;
    filter: none;
}
.product-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-title a {
    color: inherit;
    text-decoration: none;
}
.product-card-title a:hover { color: var(--primary); }

.product-card-size {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.product-card-meta {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-bottom: 10px;
}
.product-card-meta span { margin-right: 10px; white-space: nowrap; }

.product-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.product-card-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
}
.product-card-price-netto {
    font-size: 0.72rem;
    color: var(--gray-500);
    font-weight: 400;
}
.product-card-actions {
    display: flex;
    gap: 6px;
}
.product-card-actions .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* ============================================
   Stock Indicator
   ============================================ */

.stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.stock-bar {
    width: 18px;
    height: 8px;
    border-radius: 2px;
    background: var(--gray-200);
}
.stock-bar.active.stock-high { background: var(--success); }
.stock-bar.active.stock-medium { background: var(--warning); }
.stock-bar.active.stock-low { background: var(--danger); }
.stock-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* ============================================
   EU Label
   ============================================ */

.eu-label {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}
.eu-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-700);
}
.eu-eprel-link {
    font-size: 0.72rem;
    color: var(--primary);
}

/* ============================================
   Product Detail Page
   ============================================ */

.product-detail-section { padding: 30px 0; }

.product-gallery {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}
.product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}
.product-gallery .placeholder-tire { font-size: 8rem; color: var(--gray-300); }

/* Lightbox */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.85);
    display: flex; align-items: center; justify-content: center;
    cursor: zoom-out;
    opacity: 0; transition: opacity .25s;
    pointer-events: none;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-overlay img {
    max-width: calc(100vw - 100px); max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 50px;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
}
.lightbox-close {
    position: absolute; top: 18px; right: 24px;
    background: none; border: none; color: #fff;
    font-size: 2.2rem; cursor: pointer; line-height: 1;
}

/* Product Thumbnails */
.product-thumbnail {
    width: 70px;
    height: 70px;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}
.product-thumbnail img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-thumbnail:hover,
.product-thumbnail.active { border-color: var(--primary); }

.product-info-box {
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 30px;
}
.product-detail-brand {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.product-detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 8px 0 16px;
    line-height: 1.3;
}
.product-detail-size {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}
.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
}
.product-detail-price-netto {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.product-detail-dot {
    display: inline-block;
    padding: 4px 12px;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 12px;
}
.product-detail-weight {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.product-specs-table { margin-top: 30px; }
.product-specs-table th {
    width: 180px;
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.9rem;
}
.product-specs-table td { font-size: 0.9rem; }

.product-actions-box {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.product-actions-box .btn { padding: 12px 24px; font-weight: 600; }

.quantity-input {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
}
.quantity-input .btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-300);
    background: var(--gray-100);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0;
}
.quantity-input input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: 2px solid var(--gray-300);
    border-left: 0;
    border-right: 0;
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   Category / Listing Page
   ============================================ */

.category-hero {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}
.category-hero.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 1;
}
.category-hero-content { position: relative; z-index: 2; }
.category-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.category-hero p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 700px;
}

.filters-sidebar {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
}
.filter-group { margin-bottom: 20px; }
.filter-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--gray-700);
}
.filter-group .form-select,
.filter-group .form-control {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
}

.listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}
.listing-count { font-size: 0.9rem; color: var(--gray-500); }
.listing-sort .form-select {
    font-size: 0.85rem;
    padding: 6px 32px 6px 12px;
    width: auto;
    min-width: 150px;
}

/* ============================================
   Cart
   ============================================ */

.cart-table { font-size: 0.9rem; }
.cart-table th { font-weight: 600; white-space: nowrap; }
.cart-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-product-img {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-product-img i { font-size: 1.5rem; color: var(--gray-300); }

/* Cart items list */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; }
.placeholder-tire-small { font-size: 1.8rem; color: var(--gray-300); }
.cart-item-info {
    flex: 1 1 0;
    min-width: 0;
}
.cart-item-brand {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 2px;
}
.cart-item-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item-name:hover { color: var(--primary); }
.cart-item-size {
    font-size: 0.8rem;
    color: var(--gray-700);
    margin-top: 2px;
}
.cart-item-dot {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 1px;
}
.cart-item-price {
    flex: 0 0 90px;
    text-align: right;
}
.cart-item-price-brutto {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}
.cart-item-price-netto {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    margin-top: 2px;
}
.cart-item-qty {
    flex: 0 0 auto;
}
.cart-item-subtotal {
    flex: 0 0 90px;
    text-align: right;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.cart-item-remove {
    flex: 0 0 auto;
    padding: 6px 8px;
    border-radius: 6px;
    opacity: 0.55;
    transition: opacity 0.15s;
}
.cart-item-remove:hover { opacity: 1; }

/* Compact quantity controls for cart */
.quantity-input-sm {
    display: flex;
    align-items: center;
    gap: 0;
}
.quantity-input-sm .btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--gray-300);
    background: var(--gray-100);
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    line-height: 1;
}
.quantity-input-sm .btn:first-child { border-radius: 6px 0 0 6px; }
.quantity-input-sm .btn:last-child  { border-radius: 0 6px 6px 0; }
.quantity-input-sm input {
    width: 44px;
    height: 32px;
    text-align: center;
    border: 1.5px solid var(--gray-300);
    border-left: 0;
    border-right: 0;
    font-weight: 600;
    font-size: 0.88rem;
    background: #fff;
}

.cart-summary {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 80px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}
.cart-summary-total {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    border-bottom: none;
}

@media (max-width: 575px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 10px;
    }
    .cart-item-image { flex: 0 0 52px; width: 52px; height: 52px; }
    .cart-item-info { flex: 1 1 calc(100% - 68px); }
    .cart-item-price { flex: 1 1 auto; text-align: left; }
    .cart-item-subtotal { flex: 0 0 auto; }
    .cart-item-remove { margin-left: auto; }
}

/* ============================================
   Compare
   ============================================ */

.compare-table { font-size: 0.85rem; }
.compare-table th { background: var(--gray-100); font-weight: 600; width: 140px; }
.compare-header { text-align: center; padding: 16px; }
.compare-header .product-name { font-weight: 700; font-size: 0.9rem; }

/* ============================================
   Account
   ============================================ */

.account-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    transition: var(--transition);
}
.account-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.account-card h5 {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary);
}
.account-card h5 i { margin-right: 8px; color: var(--primary); }

.account-sidebar .list-group-item {
    border: none;
    padding: 12px 16px;
    font-size: 0.95rem;
}
.account-sidebar .list-group-item.active {
    background: var(--primary);
    border-color: var(--primary);
}

.order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}
.order-status-new { background: #cce5ff; color: #004085; }
.order-status-paid { background: #d4edda; color: #155724; }
.order-status-processing { background: #fff3cd; color: #856404; }
.order-status-shipped { background: #d1ecf1; color: #0c5460; }
.order-status-delivered { background: #d4edda; color: #155724; }
.order-status-cancelled { background: #f8d7da; color: #721c24; }
.order-status-returned { background: #e2e3e5; color: #383d41; }

/* ============================================
   Contact & Forms
   ============================================ */

.contact-form .form-control,
.contact-form .form-select {
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
}
.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35,86,160,.15);
}
.contact-info-card {
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    padding: 30px;
}
.contact-info-card h3 { font-weight: 700; }
.contact-info-card a { color: #fff; text-decoration: underline; }

/* Auth forms */
.auth-page .main-content {
    padding: 40px 0;
}
.auth-box {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}
.auth-box h1 {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    margin: 0;
    padding: 0;
}
.footer-main { padding: 50px 0 30px; }
.footer-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: var(--gray-400, #adb5bd);
    font-size: 0.9rem;
}
.footer-links a:hover { color: #fff; }

.footer-contact p {
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.footer-contact i { margin-right: 8px; color: var(--primary-light); }
.footer-contact a { color: var(--gray-300); }
.footer-contact a:hover { color: #fff; }

.footer-logo img { opacity: 0.9; }
.footer-logo img:hover { opacity: 1; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 16px 0;
    font-size: 0.78rem;
}

/* ============================================
   Breadcrumbs
   ============================================ */

.breadcrumb {
    padding: 12px 0;
    margin-bottom: 0;
    font-size: 0.85rem;
    background: none;
}
.breadcrumb-item + .breadcrumb-item::before { content: "›"; }
.breadcrumb-item a { color: var(--gray-500); }
.breadcrumb-item a:hover { color: var(--primary); }

/* ============================================
   Pagination override
   ============================================ */

.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #dee2e6;
}

/* ============================================
   Buttons override
   ============================================ */

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-lg { padding: 14px 28px; font-size: 1.05rem; border-radius: var(--border-radius); }

/* ============================================
   Info pages
   ============================================ */

.info-page .main-content { padding: 40px 0; }
.info-page h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--secondary);
}
.info-page h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 16px;
}
.info-content {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 900px;
}
.info-content p { margin-bottom: 16px; }

/* ============================================
   Admin Panel
   ============================================ */

.admin-header {
    background: var(--secondary);
    padding: 10px 0;
}
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: var(--gray-100);
    border-right: 1px solid var(--gray-200);
}
.admin-sidebar .nav-link {
    color: var(--gray-700);
    padding: 12px 20px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: #fff;
    color: var(--primary);
    border-left-color: var(--primary);
}
.admin-content { padding: 24px; }
.admin-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}
.admin-stat {
    text-align: center;
    padding: 20px;
}
.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}
.admin-stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================
   Category Themes
   ============================================ */

/* Rolnicze */
.theme-rolnicze .category-hero {
    background: linear-gradient(135deg, #2d5a27 0%, #4a8c3f 60%, #6db35f 100%);
    color: #fff;
}
.theme-rolnicze .category-nav-link.active { background: rgba(45,90,39,.8); border-bottom-color: #a5d6a7; }

/* Przemysłowe */
.theme-przemyslowe .category-hero {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 60%, #ff9800 100%);
    color: #fff;
}
.theme-przemyslowe .category-nav-link.active { background: rgba(230,81,0,.8); border-bottom-color: #ffcc80; }

/* Ciężarowe */
.theme-ciezarowe .category-hero {
    background: linear-gradient(135deg, #37474f 0%, #546e7a 60%, #78909c 100%);
    color: #fff;
}
.theme-ciezarowe .category-nav-link.active { background: rgba(55,71,79,.8); border-bottom-color: #b0bec5; }

/* Dostawcze */
.theme-dostawcze .category-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 60%, #555555 100%);
    color: #fff;
}
.theme-dostawcze .category-nav-link.active { background: rgba(92,64,51,.8); border-bottom-color: #bcaaa4; }

/* Leśne */
.theme-lesne .category-hero {
    background: linear-gradient(135deg, #1b3a1b 0%, #2e5d2e 60%, #3e7d3e 100%);
    color: #fff;
}
.theme-lesne .category-nav-link.active { background: rgba(27,58,27,.8); border-bottom-color: #a5d6a7; }

/* Motocyklowe */
.theme-motocyklowe .category-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #b71c1c 60%, #e53935 100%);
    color: #fff;
}
.theme-motocyklowe .category-nav-link.active { background: rgba(183,28,28,.8); border-bottom-color: #ef9a9a; }

/* Osobowe */
.theme-osobowe .category-hero {
    background: linear-gradient(135deg, #263238 0%, #37474f 60%, #455a64 100%);
    color: #fff;
}
.theme-osobowe .category-nav-link.active { background: rgba(255,255,255,.12); border-bottom-color: #ced4da; }

/* Kolor paska kategorii wg motywu */
.theme-rolnicze .category-nav { background: #2d5a27; }
.theme-przemyslowe .category-nav { background: #e65100; }
.theme-ciezarowe .category-nav { background: #37474f; }
.theme-dostawcze .category-nav { background: #5c4033; }
.theme-lesne .category-nav { background: #1b3a1b; }
.theme-motocyklowe .category-nav { background: #b71c1c; }
.theme-osobowe .category-nav { background: #111111; }

/* Gdy jest własne zdjęcie – przywróć cover po nadpisaniu przez motywy */
.category-hero.has-bg {
    background-size: cover;
    background-position: center;
}

/* ============================================
   Featured / Bestseller highlight
   ============================================ */

.product-card.is-featured {
    border-color: var(--accent);
    border-width: 2px;
}
.product-card.is-featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

/* ============================================
   404 Page
   ============================================ */

.error-page .main-content,
.page-404 .main-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-404 .main-content section {
    text-align: center;
    padding: 80px 20px;
}
.page-404 .main-content h1 {
    font-size: 6rem;
    font-weight: 900;
    color: var(--gray-300);
}
.page-404 .main-content p {
    font-size: 1.2rem;
    color: var(--gray-500);
    margin-bottom: 30px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 991.98px) {
    html { font-size: 16px; }
    .hero-title { font-size: 1.7rem; }
    .tire-search-box { margin-top: -30px; padding: 20px; }
    .product-detail-title { font-size: 1.2rem; }
    .product-detail-price { font-size: 1.5rem; }
    .category-hero h1 { font-size: 1.5rem; }
}

@media (max-width: 767.98px) {
    html { font-size: 15px; }
    .hero-section { padding: 30px 0; min-height: auto; }
    .hero-title { font-size: 1.4rem; }
    .tire-search-box { margin-top: -20px; padding: 16px; }
    .product-card-img { height: 140px; }
    .product-gallery { aspect-ratio: 1 / 1; padding: 15px; }
    .lightbox-overlay img { padding: 10px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
    .footer-main { padding: 30px 0 20px; }
    .cart-table { font-size: 0.8rem; }
}

@media (max-width: 575.98px) {
    .top-bar { display: none; }
    .header-action-btn { padding: 6px 8px; }
    .product-card-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================
   Utilities
   ============================================ */

.text-primary { color: var(--primary) !important; }
.bg-primary-soft { background: rgba(35,86,160,.05); }
.bg-success-soft { background: rgba(40,167,69,.1); }
.bg-warning-soft { background: rgba(240,160,48,.1); }
.bg-danger-soft { background: rgba(220,53,69,.1); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--secondary);
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin-top: 10px;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   Cart Hover Preview (Mini koszyk)
   ============================================ */
.cart-preview {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    z-index: 1060;
    font-size: 0.85rem;
}
.cart-preview.show { display: block; }
.cart-preview-items { max-height: 200px; overflow-y: auto; }
.cart-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-200);
    gap: 8px;
}
.cart-preview-name {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-preview-price {
    font-weight: 700;
    white-space: nowrap;
    color: var(--primary);
    font-size: 0.82rem;
}
.cart-preview-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    font-size: 0.92rem;
}
.cart-preview-empty,
.cart-preview-loading {
    padding: 12px 0;
    text-align: center;
    color: var(--gray-500);
}

/* ============================================
   EU Label Card (Strona produktu)
   ============================================ */
.eu-label-card {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

/* EU Label Popover (Lista produktów) */
.eu-label-popover {
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
}
.popover { max-width: 300px; }
.popover-body img { width: 100%; height: auto; }

/* ============================================
   Guest Checkout - Create Account
   ============================================ */
.checkout-account-box {
    background: linear-gradient(135deg, #eef3fc 0%, #f8f9fa 100%);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
}
.checkout-account-box .benefits-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}
.checkout-account-box .benefits-list li {
    padding: 4px 0;
    font-size: 0.88rem;
}
.checkout-account-box .benefits-list li i {
    color: var(--success);
    margin-right: 6px;
}
