/* style.css */

/* --- CONFIG PREMENNÉ PRE DARK MODE --- */
:root {
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --border-color: #eeeeee;
    --brand-green: #33cc99; 
    --brand-blue-smart: #1e3c72;
    --brand-dark-blue: #003366; /* Tvoja tmavomodrá */
    --hero-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --shadow: rgba(0,0,0,0.05);
}

body.dark-mode {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-header: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #bbbbbb;
    --border-color: #333333;
    --brand-green: #33cc99;
    --hero-gradient: linear-gradient(135deg, #162a45 0%, #1e3c72 100%);
    --shadow: rgba(0,0,0,0.3);
}

/* --- ÚPRAVA HLAVNÉHO SCROLLBARU --- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--brand-dark-blue); border-radius: 6px; border: 3px solid var(--bg-body); }
::-webkit-scrollbar-thumb:hover { background: #002244; }
* { scrollbar-width: thin; scrollbar-color: var(--brand-dark-blue) var(--bg-body); }

/* --- ZÁKLADNÉ ŠTÝLY --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-body); color: var(--text-main); transition: background 0.3s ease, color 0.3s ease; }

/* --- HEADER (STICKY) --- */
header {
    background: var(--bg-header);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky; 
    top: 0;
    z-index: 2000;
    transition: background 0.3s ease;
}

.logo-container { display: flex; align-items: center; text-decoration: none; gap: 10px; }
.logo-text-wrapper { display: flex; flex-direction: column; line-height: 1; }
.logo-main-text { font-size: 28px; font-weight: 800; color: var(--brand-blue-smart) !important; letter-spacing: -1.2px; transition: color 0.3s ease; }
body.dark-mode .logo-main-text { color: var(--brand-green) !important; } 
.logo-main-text span { color: var(--brand-green) !important; }
.logo-sub-text { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-top: -2px; }

#theme-toggle {
    background: none; 
    border: 1px solid var(--brand-green); 
    color: var(--brand-green); 
    padding: 6px 15px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 13px; 
    transition: 0.3s;
}
#theme-toggle:hover { background: var(--brand-green); color: #fff; }

/* --- HERO SEKICA (UPRAVENÁ PRE MRIEŽKU) --- */
.hero { 
    background: var(--hero-gradient) !important; 
    padding: 40px 5%; 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 40px; 
    min-height: 400px;
}

.hero-text { 
    flex: 1; 
    text-align: left; 
    max-width: 600px;
}
.hero h1 { font-size: 42px; margin-bottom: 15px; color: #fff !important; line-height: 1.2; }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 30px; color: #fff !important; }

.search-container { display: flex; width: 100%; max-width: 100%; margin: 0; }
.search-container input { padding: 18px 25px; flex: 1; border: none; border-radius: 50px 0 0 50px; outline: none; font-size: 16px; background: #fff; color: #333; }
.search-container button { padding: 18px 40px; border: none; background: #2ecc71; color: white; border-radius: 0 50px 50px 0; font-weight: bold; cursor: pointer; font-size: 16px; transition: 0.3s; }

/* --- HERO SHOWCASE (PRAVÁ STRANA) --- */
.hero-right-wrapper {
    flex: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-showcase-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding-left: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 12px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s;
    cursor: pointer;
    overflow: hidden;
}

.hero-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
    border-color: #33cc99;
}

.hero-img-wrapper {
    width: 100%;
    height: 60px; /* ZMENENÉ: 60px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.hero-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.hero-card:hover img { transform: scale(1.05); }

.hero-card-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 8px;
}

.hero-brand { font-size: 12px; color: rgba(255,255,255,0.9); font-weight: 700; text-transform: uppercase; }
.hero-price { font-size: 14px; color: #33cc99; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }

/* --- CONTAINER --- */
.app-container { 
    display: block; 
    max-width: 1400px; 
    margin: 30px auto; 
    padding: 0 20px; 
}

/* --- FILTRE --- */
#filter-form {
    display: flex;
    flex-wrap: wrap; 
    gap: 0;
    background: var(--bg-card);
    padding: 15px 0;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    margin-bottom: 30px;
    align-items: flex-start;
    border: 1px solid var(--border-color);
}

.filter-section { 
    border-bottom: none; 
    border-right: 1px solid var(--border-color);
    padding: 0 25px;
    min-width: 200px;
    flex: 1;
}
.filter-section:last-of-type { border-right: none; }

.filter-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 13px; color: var(--text-muted); text-transform: uppercase; font-weight: bold; user-select: none; margin-bottom: 10px; }
.filter-header h4 { font-size: 13px; color: var(--text-muted); margin: 0; }
.filter-header .arrow { font-size: 11px; transition: transform 0.3s ease; }
.filter-header.collapsed .arrow { transform: rotate(-90deg); }

.filter-content { transition: all 0.3s ease; overflow: hidden; display: block; }
.filter-content.hidden { display: none; }

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
    justify-content: center;
    padding: 0 25px;
    border-left: 1px solid var(--border-color);
}

/* --- PRVKY VO VNÚTRI FILTRA --- */
.brand-search { width: 100%; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; font-size: 13px; outline: none; background: var(--bg-body); color: var(--text-main); }
.brand-list { max-height: 150px; overflow-y: auto; padding-right: 5px; }
.brand-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; color: var(--text-main); }
.brand-item input { accent-color: #2ecc71; width: 15px; height: 15px; }
.brand-item:hover { color: #2ecc71; }

.price-input { width: 100%; padding: 8px; border: 2px solid var(--border-color); border-radius: 10px; font-weight: bold; outline: none; color: var(--text-main); font-size: 14px; background: var(--bg-body); transition: color 0.3s ease; }

/* --- KATEGÓRIE A PODKATEGÓRIE (SCROLL) --- */
.category-nav {
    display: flex; 
    gap: 10px; 
    padding: 10px 5px; 
    margin-bottom: 20px;
    overflow-x: auto !important; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
}
.category-nav a { 
    flex: 0 0 auto !important;
    text-decoration: none; 
    color: var(--text-main); 
    font-weight: 600; 
    font-size: 13px; 
    padding: 10px 22px; 
    border-radius: 50px; 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    transition: 0.3s; 
    box-shadow: 0 2px 5px var(--shadow);
}
.category-nav a:hover, .category-nav a.active { background: #2ecc71; color: white; border-color: #2ecc71; }

.sub-category-wrapper { display: flex; align-items: center; gap: 10px; margin: -10px 0 25px 0; padding: 5px; width: 100%; overflow: hidden; }
.sub-category-nav { 
    display: flex; 
    gap: 8px; 
    overflow-x: auto !important; 
    white-space: nowrap; 
    padding-bottom: 12px !important; 
    flex: 1; 
    min-width: 0; 
    -webkit-overflow-scrolling: touch;
}
.sub-btn { 
    flex: 0 0 auto !important;
    text-decoration: none; 
    color: var(--text-main); 
    background: var(--bg-card); 
    padding: 8px 16px; 
    border-radius: 50px; 
    font-size: 13px; 
    border: 1px solid var(--border-color); 
    transition: 0.3s; 
    font-weight: 500; 
}
.sub-btn:hover, .sub-btn.active { border-color: #2ecc71; color: #fff; background: #2ecc71; }
.sep { color: #888; font-size: 14px; margin: 0 5px; opacity: 0.5; align-self: center; flex-shrink: 0; }

/* SCROLLBAR - TMAVOMODRÁ */
.category-nav::-webkit-scrollbar, .sub-category-nav::-webkit-scrollbar { height: 8px; display: block !important; }
.category-nav::-webkit-scrollbar-thumb, .sub-category-nav::-webkit-scrollbar-thumb { 
    background: var(--brand-dark-blue); 
    border-radius: 10px; 
}
.category-nav::-webkit-scrollbar-track, .sub-category-nav::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); border-radius: 10px; }
body.dark-mode .sub-category-nav::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); }

/* --- PRODUKTOVÁ ČASŤ (OPRAVENÉ ZAROVNANIE) --- */
.product-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px;
    padding: 18px 20px; 
    background: var(--bg-card); 
    border-radius: 12px;
    box-shadow: 0 2px 5px var(--shadow); 
    position: relative; 
    z-index: 5;
}
.product-header h2 { color: var(--text-main); font-size: 18px; margin: 0; }
.sort-select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-card); font-weight: 600; color: var(--text-main); outline: none; cursor: pointer; font-size: 13px; }

/* PRODUKTOVÝ GRID - NASTAVENÝ NA 3 STĹPCE */
.grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 25px; 
}
article.card { background: var(--bg-card); padding: 20px; border-radius: 18px; border: 1px solid var(--border-color); display: flex; flex-direction: column; text-align: center; transition: 0.3s; height: 100%; cursor: pointer; user-select: none; position: relative; overflow: hidden; }
article.card:hover { transform: translateY(-5px); border-color: #2ecc71; box-shadow: 0 10px 25px var(--shadow); }
article.card img { max-height: 160px; max-width: 100%; object-fit: contain; margin-bottom: 12px; pointer-events: none; }
article.card h3 { font-size: 15px; margin-bottom: 10px; color: var(--text-main); min-height: 38px; display: flex; align-items: center; justify-content: center; pointer-events: none; line-height: 1.3; }
article.card .price { font-size: 20px; font-weight: 800; color: #2ecc71; margin-bottom: 12px; display: block; pointer-events: none; }

.btn { text-decoration: none; background: #34495e; color: white; padding: 10px; border-radius: 8px; font-weight: 600; transition: 0.3s; margin-top: auto; font-size: 14px; text-align: center; display: inline-block; }
.btn:hover { background: #2ecc71; transform: scale(1.05); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 40px 0; flex-wrap: wrap; }
.pagination a { min-width: 40px; text-align: center; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; text-decoration: none; color: var(--text-main); font-weight: bold; transition: 0.2s; font-size: 13px; }
.pagination a.active { background: #2ecc71; color: white; border-color: #2ecc71; }
.pagination a:hover:not(.active) { background: var(--bg-body); border-color: #999; }

/* --- ŠTÝLY PRE KONTAKT A DETAIL --- */
.breadcrumb { width: 100%; max-width: 1000px; margin: 15px 0; font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.breadcrumb a:hover { color: #2ecc71; }
.breadcrumb span.sep { opacity: 0.5; font-size: 12px; }
.breadcrumb span.current { color: #2ecc71; font-weight: 600; }

.product-detail-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 5px 25px var(--shadow);
    border: 1px solid var(--border-color);
    padding: 40px;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 40px;
    margin-top: 10px;
}
.product-detail-flex { display: flex; gap: 50px; align-items: flex-start; }
.product-image-box { 
    flex: 1; 
    background: #fff; 
    padding: 30px; 
    border-radius: 15px; 
    border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center; min-height: 300px;
}
.product-image-box img { max-width: 100%; max-height: 250px; object-fit: contain; }
.product-info-box { flex: 1.2; display: flex; flex-direction: column; }
.contact-title { font-size: 32px; line-height: 1.3; color: var(--text-main); margin-bottom: 20px; font-weight: 800; }

.info-table { width: 100%; margin-bottom: 20px; background: var(--bg-body); border-radius: 12px; padding: 25px; }
.info-row { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 15px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px;}
.info-value { color: var(--text-main); font-weight: 600; font-size: 16px; }
.info-value a { color: var(--text-main); text-decoration: none; transition: 0.3s; }
.info-value a:hover { color: #2ecc71; }

.shop-badge { background: #2ecc71; color: #fff; padding: 5px 12px; border-radius: 6px; font-size: 11px; text-transform: uppercase; font-weight: 700; align-self: flex-start; margin-bottom: 15px; }

footer { background: var(--bg-card) !important; border-top: 1px solid var(--border-color) !important; transition: background 0.3s ease; padding: 30px; text-align: center; margin-top: 50px; }

/* --- ŠTÝLY PRE KONTAKTNÝ FORMULÁR --- */
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-input {
    width: 100%; padding: 12px 15px; border: 1px solid var(--border-color);
    border-radius: 10px; background: var(--bg-body); color: var(--text-main);
    font-size: 14px; outline: none; transition: 0.3s;
}
.contact-input:focus { border-color: var(--brand-green); box-shadow: 0 0 5px rgba(51, 204, 153, 0.2); }

@media (max-width: 900px) {
    .app-container { padding: 0 10px; margin-top: 15px; }
    .hero { 
        flex-direction: column; /* Na tablete pod seba */
        text-align: center; 
        padding: 30px 15px;
    }
    .hero-text { 
        text-align: center; 
        margin-bottom: 20px; 
        max-width: 100%;
    }
    .hero-right-wrapper {
        width: 100%; 
        max-width: 600px;
    }
    .hero-showcase { 
        grid-template-columns: repeat(4, 1fr); /* 4 vedľa seba na šírku */
    }
    .hero-img-wrapper { height: 60px; }
    
    .search-container { flex-direction: row; flex-wrap: wrap; width: 100%; margin: 0 auto; }
    .search-container input { width: 100%; border-radius: 50px !important; margin: 0 0 10px 0; flex: 100%; }
    .search-container button { width: 100%; border-radius: 50px !important; }
    
    #filter-form { flex-direction: column; gap: 0; padding: 10px; }
    .filter-section { border-right: none; border-bottom: 1px solid var(--border-color); padding: 15px 10px; width: 100%; }
    .filter-actions { width: 100%; flex-direction: row; border-left: none; padding: 15px 10px 5px; gap: 15px; }
    .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    
    article.card { padding: 10px; border-radius: 12px; }
    article.card img { max-height: 110px; margin-bottom: 8px; }
    article.card h3 { font-size: 13px; min-height: 32px; line-height: 1.3; margin-bottom: 5px; }
    
    .product-header { flex-direction: column; align-items: flex-start; gap: 10px; padding: 15px; }
    .product-header h2 { font-size: 16px; }
    
    .product-detail-flex { flex-direction: column; gap: 30px; }
    .product-detail-wrapper { padding: 20px; }
}

