:root {
    --ec-red: #e60012;
    --ec-dark: #111115;
    --ec-card-bg: #ffffff;
    --ec-border: #e2e8f0;
    --ec-text-muted: #64748b;
}

body {
    background-color: #f8f9fa;
}

/* --- FEJLÉC STÍLUSOK (Ismétlődő háttérkép) --- */
.main-header {
    background: url('../../pics/headerbg.jpg') top left repeat-x;
    height: 180px;
    display: flex;
    align-items: center;
}

.header-logo {
    max-height: 162px;
    width: auto;
    object-fit: contain;
}

.header-section-left, .header-section-right { padding: 0; }

/* --- KERET NÉLKÜLI KERESŐKAPSZULA --- */
.search-capsule {
    border-radius: 30px;
    overflow: hidden;
    border: none !important;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.category-dropdown {
    max-width: 130px;
    cursor: pointer;
    border: none !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    box-shadow: none !important;
}

.search-input {
    box-shadow: none !important;
    font-size: 0.95rem;
    border: none !important;
}

.search-submit-btn {
    background-color: #fff;
    border: none !important;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

/* --- ALAPÁLLAPOTBAN FEHÉR, HOVERRE PIROS GOMBOK --- */
.btn-login, .btn-cart {
    background-color: #ffffff !important;
    color: var(--ec-dark) !important;
    font-weight: bold;
    border: none !important;
    border-radius: 50px;
    padding: 8px 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: background-color 0.2s, color 0.2s;
}

.btn-login:hover, .btn-cart:hover {
    background-color: var(--ec-red) !important;
    color: #ffffff !important;
}

/* --- BEJELENTKEZŐ ABLAK --- */
.login-container {
    position: relative;
    display: inline-block;
}

.custom-login-window {
    position: absolute;
    top: 50px;
    right: 0;
    width: 290px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1050;
    border: 1px solid var(--ec-border);
}

.btn-submit-login {
    background-color: var(--ec-dark);
    color: white;
    font-weight: bold;
}
.btn-submit-login:hover { background-color: #22222b; color: white; }
.login-divider { height: 1px; background-color: #e2e8f0; margin: 12px 0; }

.login-links-zone {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

/* Egységes tiszta szürke linkek a bejelentkező ablak alján */
.login-link-item {
    color: var(--ec-text-muted) !important;
    text-decoration: none;
    font-weight: 500;
}
.login-link-item:hover {
    color: var(--ec-dark) !important;
    text-decoration: underline;
}

/* --- OLDALSÁV BLOKKOK ÉS KATEGÓRIA FA --- */
.sidebar-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-card .card-header:hover {
    background-color: #f8f9fa !important;
}

.category-tree { user-select: none; }
.main-cat-item { font-size: 0.95rem; }
.sub-cat-group { margin-top: 5px; margin-bottom: 5px; }

.sub-cat-item {
    font-size: 0.85rem;
    padding: 6px 10px;
    color: #475569;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.sub-cat-item:hover {
    background-color: #f1f5f9;
    color: #000;
}

/* Aktív alkategória vörös kiemelése */
.sub-cat-item.active {
    background-color: rgba(230, 0, 18, 0.08) !important;
    color: var(--ec-red) !important;
    font-weight: 700;
}

.filter-label { font-weight: 700; }

/* --- TERMÉKKÁRTYÁK --- */
.btn-ec-red { background-color: var(--ec-red); color: white; font-weight: bold; }
.btn-ec-red:hover { background-color: #b3000d; color: white; }

.product-card { background-color: var(--ec-card-bg); border: 1px solid var(--ec-border); border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s; height: 100%; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.product-card .img-container { height: 180px; display: flex; align-items: center; justify-content: center; padding: 15px; background-color: #fff; }
.product-card img { max-height: 100%; max-width: 100%; object-fit: contain; }
.product-card .card-body { display: flex; flex-direction: column; justify-content: space-between; flex-grow: 1; }

.product-title { font-size: 0.95rem; font-weight: 700; color: var(--ec-dark); line-height: 1.3; height: 2.6rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-desc { font-size: 0.8rem; color: var(--ec-text-muted); height: 2.4rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { font-size: 1.25rem; font-weight: 800; color: var(--ec-red); }
.stock-badge-instock { background-color: #d1fae5; color: #065f46; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }

/* --- SVG IKONOK SZÍNEZÉSE ÉS EFFEKTUSAI --- */
.local-svg-icon-red {
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
}

.local-svg-icon-dark {
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
    transition: filter 0.2s ease-in-out;
}

/* Hover állapotban a fehér gombok vörös hátteret kapnak, az ikonok pedig kifehérednek */
.btn-login:hover .btn-icon-target,
.btn-cart:hover .btn-icon-target {
    filter: invert(1) brightness(100); /* Teljesen kifehéríti a fekete SVG ikont */
}

/* --- VEZÉRLŐSÁVOK ELKÜLÖNÍTETT PIXEL-SZINTŰ MARGÓI --- */

/* FELSŐ VEZÉRLŐSÁV: Kizárólag az alsó margóját állítjuk be esztétikus 24 pixelre, hogy eltolja a termékeket */
.control-bar-top-spacing {
    margin-bottom: 12px !important;
    margin-top: 0px !important;
}

/* ALSÓ VEZÉRLŐSÁV: Kizárólag a felső margóját állítjuk be 40 pixelre, hogy szép hely legyen a termékek aljától */
.control-bar-bottom-spacing {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

/* Kiegyenlítjük a hasábok belső eltolódásait, a kártyák gyári távolságait nem bántjuk */
main.col-lg-9 {
    padding-top: 0px !important;
    margin-top: 0px !important;
}

.product-grid-hardware {
    margin-top: 0px !important;
    padding-top: 0px !important;
}

.product-grid-hardware > .col {
    margin-top: 0px !important;
    padding-bottom: 12px !important;
}

/* Tűpontos rácsvezérlés 1920px feletti monitorokra */
@media (min-width: 1921px) {
    .product-grid-hardware > .col {
        flex: 0 0 auto;
        width: 16.66666667% !important;
    }
}
