*,
*::before,
*::after {
    box-sizing: border-box;
}

body { font-family: 'Cormorant Garamond', serif; margin: 0; background-color: #eceaea; }
.top-banner { background-color: #615e63; color: #fff; text-align: center; padding: 2px 5px; font-size: 1em; font-family: sans-serif; }
.top-banner p { margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 10px; }

/* ===== FEJLÉC KONTÉNER ===== */
.header-container { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }

/* ===== CÍMSOR PANEL ===== */
.title-panel {
    background-color: #cac8c8;;
    padding: 10px 20px;
    border-radius: 15px; flex-grow: 1; 
    display: flex; 
    justify-content: flex-start; 
    align-items: center; 
    border: 1px solid #95979a; 
    min-width: 0;
}
.site-title-link {
    text-decoration: none; /* Eltávolítja a link alapértelmezett aláhúzását */
    color: inherit;        /* A szülő elemtől örökli a szövegszínt, nem lesz kék */
    
    /* Ezek a szabályok biztosítják, hogy a link kitöltse a panelt
       és a belső elrendezés (cím és logó) megmaradjon. */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}
.site-title { font-family: 'Montserrat', sans-serif; font-size: 1.8em; font-weight: 700;
    color: rgba(66, 30, 30, 0.5);
    margin: 0;
    text-transform: uppercase;
    text-align: left; }
.title-suffix { font-size: 0.7em; font-weight: 400; vertical-align: middle; 
    color: #766d6d;}
.header-logo { max-height: 70px; width: auto; }

/* ===== KERESŐ PANEL (ÁTALAKÍTVA) ===== */
.search-panel {
    display: flex;
    flex-direction: column; /* A belső elemeket egymás alá rendezi */
    background-color: #eaf1f1;
    border-radius: 10px;
    min-width: 300px;
    padding: 0; /* A belső padding-et a sorok kapják meg */
    overflow: hidden; /* A belső elemek ne lógjanak ki a border-radius miatt */
}

/* Új stílusok a panelen belüli sorokhoz */
.top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 10px 15px;
    border-bottom: 1px solid #d5d9dd; /* Elválasztó vonal */
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
}
.search-bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
}
.secondary-nav-item { color: #645f5f; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.secondary-nav-item i { font-size: 1.1em; }
.contact-info { display: flex; gap: 20px; }

.hamburger-btn { display: none; font-size: 1.5em; color: #625d5d; background: transparent; border: none; cursor: pointer; }
.search-container { display: flex; flex-grow: 1; }
#search-input { width: 100%; padding: 8px 12px; font-size: 1em; font-family: 'Cormorant Garamond', serif; border: 1px solid #ccc; border-radius: 5px 0 0 5px; border-right: none; }
.search-btn { padding: 0 15px; border: 1px solid #ccc; background-color: #fff; border-radius: 0 5px 5px 0; cursor: pointer; color: #625d5d; font-size: 1.1em; }

/* ===== FŐMENÜ ===== */
.main-nav { display: flex;
    justify-content: center;
    align-items: center;
    background-color: #a3a3a3;
    border: 1px solid #8ea6ac;
    border-radius: 5px; flex-wrap: wrap;
    transition: all 0.5s ease-in; }
.nav-item { font-family: 'Montserrat', sans-serif;
    color: #e0e4e7;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9em; padding: 15px 20px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}
.main-nav:hover {transform: translateY(-2px);}
.nav-item:hover { color: #212529; background-color: #ced4da; }
.nav-item.active { color: #ffffff; font-weight: 700; border-bottom-color: #575a5d; }

/* ===== TERMÉK RÁCS ===== */
.product-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.product-card { 
    background-color: #e8dfdf; 
    border: 1px solid #9b9a9a; 
    border-radius: 10px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    text-align: center; 
    transition: all 0.2s ease-in-out; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    width: 100%; /* <-- Ezt a sort adja hozzá */
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: 250px; object-fit: cover; }
.product-card-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.product-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #444;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.product-card .price { margin-top: auto; font-size: 1.3em; font-weight: bold; color: #c03b2b; text-align: center; }
.product-card-link {
    text-decoration: none; /* Eltávolítja a link aláhúzását */
    color: inherit; /* Örökli a szövegszínt, nem lesz kék */
    display: flex; /* A kártya kitölti a link teljes területét */
}
.no-products-message { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: #555; font-size: 1.2em; }

/* ===== RESZPONZÍV BEÁLLÍTÁSOK ===== */
@media (max-width: 992px) {
    .header-container { flex-direction: column; align-items: stretch; }
    .title-panel { justify-content: center; }
    .site-title { text-align: center; font-size: 1.5em; }
    .title-suffix { display: none; }
    .header-logo { display: none; }
    
    /* ===== ITT TÖRTÉNT A MÓDOSÍTÁS ===== */
    .top-bar-content { justify-content: space-between; flex-wrap: wrap; }
    .hamburger-btn { display: block; }
    
    .main-nav { display: none; flex-direction: column; width: 100%; margin-top: 20px; padding: 0; background-color: #f8f9fa; border-radius: 5px; border: 1px solid #ddd; }
    .main-nav.nav-active { display: flex; }
    .nav-item { width: 100%; text-align: center; border-bottom: 1px solid #ddd; box-sizing: border-box; border-bottom-color: #ddd; color: #344049; }
    .nav-item:last-child { border-bottom: none; }
    .nav-item:hover { background-color: #e9ecef; color: #212529; }
    .nav-item.active { background-color: #e9ecef; color: #212529; font-weight: 700; }
}

/* ===== LAPOZÓ (PAGINATION) STÍLUSOK (REPRODUKÁLVA) ===== */
.pagination-container {
    margin-top: 40px;
    margin-bottom: 20px;
    /* Beállítjuk a referenciához illő sans-serif betűtípust */
    font-family: 'Montserrat', sans-serif;
}

.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none; /* Eltávolítja a listajelölőket */
}

.page-item {
    margin: 0 4px; /* Finomhangolt térköz a gombok között */
}

/* Az alap gomb stílusa (a .page-link) */
.page-link {
    /* Flexbox a szám tökéletes középre igazításához */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Négyzetesebb forma elérése fix méretekkel */
    width: 42px;
    height: 42px;
    
    padding: 0; /* A fix méretek miatt nincs szükség paddingre */
    font-size: 1em;
    font-weight: 700; /* Félkövér betűk, mint a mintán */
    
    color: #343a40; /* Sötét szövegszín */
    background-color: #ffffff; /* Fehér háttér */
    border: 1px solid #dee2e6; /* Világosszürke keret */
    border-radius: 4px; /* Enyhén lekerekített sarkok */

    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* Gomb stílusa, ha fölé visszük az egeret */
.page-link:hover {
    background-color: #f8f9fa; /* Nagyon halvány szürke háttér hover-re */
    color: #212529;
}

/* Az aktív oldal gombja (sötét háttér, fehér szám) */
.page-item.active .page-link {
    z-index: 1;
    color: #fff;
    background-color: #343a40; /* Sötétszürke háttér, mint a mintán */
    border-color: #343a40;
}

/* Az aktív gomb ne változzon, ha fölé visszük az egeret */
.page-item.active .page-link:hover {
    background-color: #343a40;
}

/* A letiltott gombok (pl. << az első oldalon) */
.page-item.disabled .page-link {
    color: #adb5bd; /* Halványabb szürke szöveg */
    pointer-events: none; /* Ne legyen kattintható */
    background-color: #fff;
    border-color: #dee2e6;
}

/* ===== LÁBLÉC (FOOTER) STÍLUSOK ===== */
footer {
    background-color: #343a40; /* Sötétszürke, mint az aktív lapozó gomb */
    color: #e9ecef;             /* Világos, majdnem fehér szöveg */
    text-align: center;        /* Szöveg középre igazítása */
    padding: 25px 15px;        /* Térköz a szöveg körül (felül/alul, oldalt) */
    margin-top: 50px;          /* Térköz a felette lévő tartalomtól (lapozótól) */
    font-family: 'Montserrat', sans-serif;
}

footer p {
    margin: 0;                 /* Alapértelmezett paragrafus margó eltávolítása */
    font-size: 0.9em;          /* Kicsit kisebb betűméret */
    letter-spacing: 0.5px;     /* Enyhe betűköz a jobb olvashatóságért */
}

/* ======================================= */
/* ===== TERMÉKADATLAP STÍLUSOK ===== */
/* ======================================= */

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr; /* Mobilon 1 oszlop */
    gap: 30px;
    margin-top: 25px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

/* Képgaléria */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    min-width: 0;
}
.main-image-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;

    /* ÚJ TULAJDONSÁG: Beállítunk egy 4:3-as képarányt.
       Ez azt jelenti, hogy a magassága mindig a szélesség 3/4-e lesz.
       Választhatsz mást is, pl. 1 / 1 (négyzetes) vagy 16 / 9 (szélesvásznú). */
   
}

/* A KÉP most már 100% magasságú, hogy kitöltse a konténerét */
.main-image-container img {
    width: 100%;
    height: 100%; /* A magasság mostantól a konténerhez igazodik */
    object-fit: cover; /* Ez továbbra is hasznos, ha egy kép aránya picit eltér */
    display: block;
    transition: transform 0.3s ease;
}
.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}
.thumb-item {
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.thumb-item:hover, .thumb-item.active {
    border-color: #615e63;
}
.thumb-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}

/* Termék infók */
.product-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.product-info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2em;
    color: #343a40;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.product-info .price {
    font-size: 2em;
    font-weight: bold;
    color: #c03b2b;
    margin-bottom: 20px;
}

.inquiry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    margin-top: 25px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    background-color: #615e63;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}
.inquiry-btn:hover {
    background-color: #4a484c;
}

/* Hasonló termékek szekció */
.similar-products {
    grid-column: 1 / -1; /* Átfogja az összes oszlopot */
    margin-top: 40px;
    border-top: 1px solid #dee2e6;
    padding-top: 30px;
}
.similar-products h2 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    color: #343a40;
    margin-bottom: 25px;
    text-transform: uppercase;
}
/* A .product-grid és .product-card stílusokat újrahasznosítjuk a főoldalról */

/* Reszponzivitás a termékadatlapon */
@media (min-width: 768px) {
    .product-detail-container {
        /* 2 oszlopos elrendezés tablettől felfelé */
        grid-template-columns: 1fr 1fr;
    }
}

/* ======================================= */
/* ===== TERMÉKLAP FINOMÍTÁSOK      ===== */
/* ======================================= */

/* Új panel a termék nevének és árának */
.product-header-panel {
    background-color: #ecedee; /* Tiszta fehér háttér */
    padding: 20px 25px;       /* Belső térköz (felül/alul, oldalt) */
    border-radius: 8px;       /* Lekerekített sarkok */
    border: 1px solid #dee2e6;/* Halvány szürke keret */
    margin-bottom: 20px;      /* Térköz a panel és a leírás között */
}

/* A termék nevének alsó margóját csökkentjük a panelen belül */
.product-header-panel h1 {
    font-family: 'Cormorant Garamond', serif; /* <-- MÓDOSÍTVA */
    font-size: 2.2em;
    color: #343a40;
    margin: 0 0 5px 0; /* Finomított margó */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Az ár margóját is finomítjuk */
.product-header-panel .price {
    margin-bottom: 0;
}

/* A meglévő .product-description stílus módosítása és kiegészítése */
.product-description {
    font-family: 'Cormorant Garamond', serif; /* <-- HOZZÁADVA */
    font-size: 1.2em;
    line-height: 1.7;
    color: #495057;
    background-color: #fdfdfe;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.product-description p {
    margin-top: 0;
    margin-bottom: 1em;
    padding-left: 0;
    text-indent: 0;
}

.product-description p:last-child {
    margin-bottom: 0;
}

/* ======================================= */
/* ===== KERESÉSI EREDMÉNYEK STÍLUSA ===== */
/* ======================================= */

.search-results-title {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 1.5em;
    color: #495057;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 15px;
}

/* ======================================= */
/* ===== FŐCÍM PANEL EGYEDI EFFEKTEK ===== */
/* ======================================= */

/* --- 1. A HÁTTÉR ANIMÁCIÓ BEÁLLÍTÁSA --- */

/* A .title-panel módosítása, hogy befogadja az animált hátteret */
.title-panel {
    position: relative; /* Szükséges a belső ::before elem pozicionálásához */
    overflow: hidden;   /* Elrejti a kép kilógó részeit */
    z-index: 1;         /* Biztosítja a helyes rétegsorrendet */
    
    /* FONTOS: Távolítsd el vagy kommentezd ki a meglévő 'background-color' tulajdonságot! */
    /* background-color: #c9cdd2; <-- EZT TÖRÖLD KI! */
}

/* Létrehozunk egy pszeudo-elemet a háttérképnek, hogy a szöveg felette maradjon */
.title-panel:not(.admin-mode)::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;

    background-image: url('../images/slider/hatterkep.webp');
    background-size: 150% auto;
    --start-x: 50%;
    --start-y: 50%;
    /* A háttérpozíció mostantól ezeket a változókat használja. */
    background-position: var(--start-x) var(--start-y);
 
    animation: pan-background 120s linear infinite alternate; /* A sebességet már beállítottad */
}

/* A háttérkép "pásztázó" mozgásának animációja */
@keyframes pan-background {
    /* --- MÓDOSÍTÁS KEZDETE --- */
    /* A kezdő és végpont is a dinamikus változókból indul ki,
       így az animáció mindig visszatér a kezdőpozícióba. */
    0%   { background-position: var(--start-x) var(--start-y); }
    /* --- MÓDOSÍTÁS VÉGE --- */
    
    25%  { background-position: 100% 0%; }
    50%  { background-position: 0% 100%; }
    75%  { background-position: 100% 100%; }

    /* --- MÓDOSÍTÁS KEZDETE --- */
    100% { background-position: var(--start-x) var(--start-y); }
    /* --- MÓDOSÍTÁS VÉGE --- */
}


/* --- 2. A FŐCÍM PULZÁLÓ EFFEKTJE --- */

/* A .site-title kiegészítése az animációval */
.site-title {
    animation: pulse-title 4s ease-in-out infinite alternate;
}


/* ======================================= */
/* ===== KONTAKT MODÁLIS ABLAK STÍLUSOK ===== */
/* ======================================= */

.modal-overlay {
    display: none; /* Alapból rejtett */
    position: fixed; /* A viewport-hoz igazodik */
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fekete háttér áttetszőséggel */
    z-index: 1000; /* Legyen minden felett */

    /* Flexbox a tartalom középre igazításához */
    justify-content: center;
    align-items: center;
}

/* Amikor a modal aktív, a display: flex felülírja a display: none-t */
.modal-overlay.modal-active {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 2em;
    font-weight: bold;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.modal-close-btn:hover {
    color: #333;
}

.modal-content h2 {
    font-family: 'Montserrat', sans-serif;
    margin-top: 0;
    margin-bottom: 10px;
    color: #343a40;
}

.modal-content p {
    margin-bottom: 25px;
    color: #6c757d;
}

.form-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1em;
    box-sizing: border-box; /* Fontos! */
}

.submit-btn {
    width: 100%;
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    background-color: #615e63;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #4a484c;
}

.submit-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}


/* Üzenetek formázása */
.form-messages {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    display: none; /* Alapból rejtett */
}

.form-messages.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block; /* Láthatóvá tesszük, ha van üzenet */
}

.form-messages.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block; /* Láthatóvá tesszük, ha van üzenet */
}

/* ======================================= */
/* ===== SZÖVEGES ALOLDALAK STÍLUSAI ===== */
/* ======================================= */

.text-page-container {
    max-width: 850px; /* Beállít egy maximális szélességet az olvashatóságért */
    margin: 25px auto; /* Felül-alul térköz, oldalt automatikusan középre igazít */
    padding: 20px 30px 40px 30px; /* Belső térköz (fent, oldalt, lent, oldalt) */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.text-page-container h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8em;
    text-align: center;
    color: #6a5a4b;
    margin-bottom: 25px;
}

.text-page-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    color: #a19990;
    margin-top: 0px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-header-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    object-fit: cover;
    max-height: 400px; /* Megakadályozza, hogy a kép túl magas legyen */
    opacity: 0.2;
}

.text-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25em;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5em;
    text-align: justify; /* Sorkizárt igazítás a letisztultabb megjelenésért */
}

.text-content ul {
    list-style: none; /* Nincsenek listajelölők */
    padding-left: 0;
}

.text-content ul li {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2em;
    line-height: 1.7;
    padding-left: 25px;
    margin-bottom: 15px;
    position: relative; /* Szükséges a saját listajelölő pozicionálásához */
}

/* Egyedi listajelölő létrehozása */
.text-content ul li::before {
    content: '›'; /* Egy elegáns nyíl vagy más szimbólum */
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #615e63;
}

.page-cta {
    text-align: center;
    margin-top: 50px;
}

/* Reszponzivitás mobilon */
@media (max-width: 768px) {
    .text-page-container {
        padding: 15px 20px 25px 20px;
    }

    .text-page-container h1 {
        font-size: 2.2em;
    }

    .text-content p {
        text-align: left; /* Mobilon a sorkizárt igazítás néha csúnya, jobb a sima balra igazítás */
    }
}

.secondary-nav-item.active {
    color: #252d33;  /* Egy kicsit sötétebb szín, hogy jobban kiemelkedjen */
}

/* ======================================= */
/* ===== ADMIN KERESŐ MODÁL FINOMÍTÁSOK ===== */
/* ======================================= */

.admin-form-label {
    display: block; /* A címke kerüljön külön sorba */
    margin-bottom: 5px; /* Kis térköz a címke és a beviteli mező között */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    color: #202326;
    font-weight: 700;
}

/* ===== ÚJ SZABÁLY A SZÖVEGMEZŐKHÖZ ===== */
div#admin-search-modal-overlay input.form-input {
    font-family: 'Montserrat', sans-serif; /* Igazítsuk a betűtípust a címkéhez */
    font-size: 1.3em !important;           /* Méret növelése, !important-tal megerősítve */
    font-weight: 700 !important;           /* Félkövér, !important-tal megerősítve */
}

/* ======================================= */
/* ===== SÜTI HOZZÁJÁRULÁS BANNER STÍLUSAI ===== */
/* ======================================= */

.cc-window {
    /* Használjuk az oldalad betűtípusait a konzisztens megjelenésért */
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
}

.cc-message {
    line-height: 1.6 !important;
}

.cc-btn {
    /* A gomb stílusát a többi gombhoz igazítjuk */
    border-radius: 5px !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
}

.cc-revoke {
    display: none !important;
}