/* ============================================
   KATALOG & PROIZVOD STRANICE
   Štefančić Klima Uređaji
   ============================================ */

/* --- Page Hero --- */
.page-hero {
    padding: 140px 0 40px;
    background: linear-gradient(135deg, #0a1628 0%, #1a3a6b 50%, #1e5aab 100%);
    color: #fff;
    position: relative;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #f8fafc);
}
.page-hero-content { max-width: 800px; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    opacity: 0.8;
}
.breadcrumb a { color: #93c5fd; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb i { font-size: 0.7rem; }
.page-hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.page-hero p { font-size: 1.1rem; opacity: 0.9; line-height: 1.6; }

/* --- Catalog Layout --- */
.catalog-section { padding: 40px 0 80px; background: #f8fafc; }
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* --- Sidebar Filters --- */
.catalog-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}
.catalog-sidebar::-webkit-scrollbar { width: 4px; }
.catalog-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.filter-header-mobile { display: none; }
.filter-group { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #f1f5f9; }
.filter-group:last-of-type { border-bottom: none; margin-bottom: 16px; }
.filter-group h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group h4 i { color: var(--primary, #1a5ab8); font-size: 0.8rem; }

.filter-search {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}
.filter-search:focus { border-color: #1a5ab8; outline: none; }

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
    transition: color 0.2s;
}
.filter-option:hover { color: #1e293b; }
.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a5ab8;
    cursor: pointer;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-range input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}
.price-range input:focus { border-color: #1a5ab8; outline: none; }
.price-range span { color: #94a3b8; font-weight: 600; }

/* --- Toolbar --- */
.catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}
.filter-toggle-btn {
    display: none;
    padding: 8px 16px;
    background: #1a5ab8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.catalog-count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}
.catalog-count span { font-weight: 700; color: #1a5ab8; }
.catalog-sort { margin-left: auto; }
.catalog-sort select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    background: #fff;
}
.catalog-view { display: flex; gap: 4px; }
.view-btn {
    padding: 8px 10px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}
.view-btn.active, .view-btn:hover { background: #1a5ab8; color: #fff; }

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* --- Product Card --- */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.product-card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edf5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card-image img {
    max-width: 85%;
    max-height: 170px;
    object-fit: contain;
    transition: transform 0.4s;
}
.product-card:hover .product-card-image img { transform: scale(1.08); }

.product-card-image .placeholder-icon {
    font-size: 4rem;
    color: #cbd5e1;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #1a5ab8;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product-badge.energy {
    left: auto;
    right: 12px;
    background: #10b981;
}

.product-card-body { padding: 16px 20px 20px; }
.product-card-brand {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a5ab8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.product-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}
.product-card-model {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 12px;
    font-family: monospace;
}
.product-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 16px;
}
.product-spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
}
.product-spec i { color: #1a5ab8; font-size: 0.7rem; width: 14px; text-align: center; }

.product-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.product-price {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
}
.product-price small {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    display: block;
}
.product-card-actions { display: flex; gap: 6px; }
.product-card-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}
.product-card-actions .btn-icon:hover {
    background: #1a5ab8;
    color: #fff;
    border-color: #1a5ab8;
}
.product-card-actions .btn-icon.btn-pdf:hover { background: #dc2626; border-color: #dc2626; }

/* --- List View --- */
.product-grid.list-view {
    grid-template-columns: 1fr;
}
.product-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
}
.product-grid.list-view .product-card-image { height: 100%; min-height: 180px; }
.product-grid.list-view .product-card-specs { grid-template-columns: repeat(3, 1fr); }

/* --- Product Detail Page --- */
.product-detail-section { padding: 40px 0 80px; background: #f8fafc; }
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.product-gallery {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.product-gallery img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}
.product-gallery .placeholder-icon { font-size: 8rem; color: #cbd5e1; }

.product-info { padding: 10px 0; }
.product-info .brand-tag {
    display: inline-block;
    background: linear-gradient(135deg, #1a5ab8, #2563eb);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.product-info h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.2;
}
.product-info .model-code {
    font-size: 0.95rem;
    color: #94a3b8;
    font-family: monospace;
    margin-bottom: 20px;
}

.product-price-box {
    background: linear-gradient(135deg, #f0f7ff, #e0ebff);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.product-price-box .price-main {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a5ab8;
}
.product-price-box .price-main small {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}
.product-price-box .price-vpc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
}

.product-specs-table {
    width: 100%;
    margin-bottom: 24px;
}
.product-specs-table h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-specs-table h3 i { color: #1a5ab8; }
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.spec-row:nth-child(odd) { background: #f8fafc; }
.spec-label { color: #64748b; font-weight: 500; }
.spec-value { color: #1e293b; font-weight: 600; text-align: right; }

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.product-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}
.product-actions .btn-primary {
    background: linear-gradient(135deg, #1a5ab8, #2563eb);
    color: #fff;
}
.product-actions .btn-primary:hover {
    background: linear-gradient(135deg, #164a9e, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,90,184,0.3);
}
.product-actions .btn-pdf {
    background: #dc2626;
    color: #fff;
}
.product-actions .btn-pdf:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220,38,38,0.3);
}
.product-actions .btn-outline-dark {
    border-color: #e2e8f0;
    background: #fff;
    color: #475569;
}
.product-actions .btn-outline-dark:hover {
    border-color: #1a5ab8;
    color: #1a5ab8;
}

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, #1a5ab8 0%, #0a1628 100%);
    padding: 60px 0;
}
.cta-content {
    text-align: center;
    color: #fff;
}
.cta-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.cta-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: #1a5ab8;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* --- Loading --- */
.catalog-loading {
    text-align: center;
    padding: 60px 0;
    color: #94a3b8;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #1a5ab8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.catalog-empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}
.catalog-empty i { font-size: 3rem; margin-bottom: 16px; }
.catalog-empty h3 { color: #475569; margin-bottom: 8px; }

/* --- Related Products --- */
.related-section { padding: 60px 0; background: #fff; }
.related-section .section-header { text-align: center; margin-bottom: 30px; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar {
        position: fixed;
        top: 0; left: -320px;
        width: 300px;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        z-index: 1000;
        transition: left 0.3s;
        padding-top: 0;
    }
    .catalog-sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,0.3); }
    .filter-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 16px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 1;
    }
    .filter-close {
        width: 36px; height: 36px;
        border: none; background: #f1f5f9;
        border-radius: 8px; cursor: pointer;
        font-size: 1rem; color: #64748b;
    }
    .filter-toggle-btn { display: flex; align-items: center; gap: 6px; }
    .product-detail-layout { grid-template-columns: 1fr; }
    .product-grid.list-view .product-card { grid-template-columns: 160px 1fr; }
}

@media (max-width: 768px) {
    .page-hero { padding: 120px 0 30px; }
    .page-hero h1 { font-size: 1.8rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .product-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }
    .product-grid.list-view .product-card-image { min-height: 200px; }
    .product-grid.list-view .product-card-specs { grid-template-columns: 1fr 1fr; }
    .catalog-toolbar { gap: 10px; }
    .catalog-sort select { font-size: 0.8rem; }
    .specs-grid { grid-template-columns: 1fr; }
    .product-info h1 { font-size: 1.5rem; }
    .product-price-box .price-main { font-size: 1.8rem; }
    .product-actions { flex-direction: column; }
    .product-actions .btn { justify-content: center; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-card-specs { grid-template-columns: 1fr; }
    .page-hero h1 { font-size: 1.5rem; }
}

/* --- Filter Overlay for Mobile --- */
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.filter-overlay.active { opacity: 1; pointer-events: all; }

/* --- Active filter tags --- */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #eff6ff;
    color: #1a5ab8;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.filter-tag button {
    background: none;
    border: none;
    color: #1a5ab8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    line-height: 1;
}
.filter-tag button:hover { color: #dc2626; }
