/* ==========================================================================
   NIK GRAVÍR — MOBILBARÁT KIEGÉSZÍTŐ CSS
   Fájl helye:  css/mobil.css
   Beillesztés: a includes/header.php-ben a <link rel="stylesheet" ... style.css">
                sor ALÁ tedd be:
       <link rel="stylesheet" href="<?= SITE_URL ?>/css/mobil.css">

   Az eredeti style.css-t NEM kell módosítani — ez "ráragad" rá és felülírja
   a problémás részeket mobilon.

   A meglévő osztályneveket (.fejlec-*, .termek-grid, .kosar-tetel, stb.)
   használja, így drop-in.
   ========================================================================== */


/* Hero cím Google Font – ugyanaz mindenhol (mobil + desktop), nem rendszerfüggő */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&display=swap');

.hero h1 {
    font-family: 'Dancing Script', 'Monotype Corsiva', cursive !important;
    font-weight: 600 !important;
}


/* -------------------------------------------------------------------------- */
/*  0. GLOBAL — minden méretre érvényes mobil-barát alapok                    */
/* -------------------------------------------------------------------------- */

html {
    -webkit-text-size-adjust: 100%;   /* iOS Safari: ne nagyítson auto */
    text-size-adjust: 100%;
}
body {
    overflow-x: hidden;               /* horizontal scroll bug védelem */
}
img, video {
    max-width: 100%;
    height: auto;
}

/* iOS Safari kritikus: az inputok 16px-nél kisebb font-méretnél bezoomolnak */
input, select, textarea {
    font-size: 16px !important;
}

/* Mindenhol érintőbarát minimum (44x44 px – Apple HIG / WCAG ajánlás) */
button, .gomb, .gomb-link, .muvelet-gomb,
.fejlec-menu-link, .fejlec-akcio-ikon,
input[type="submit"], input[type="button"] {
    min-height: 44px;
}


/* ========================================================================== */
/*  1. FEJLÉC — MOBIL OPTIMALIZÁCIÓ                                           */
/* ========================================================================== */

/* A header már sticky alapból maradjon — biztosítjuk hogy az legyen */
.fejlec {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- Felső sáv (kapcsolat) --- */
.fejlec-felso-sav .fejlec-felso-tartalom {
    flex-wrap: wrap;
    gap: 6px 14px;
}
.fejlec-info-elem {
    font-size: 13px;
}
@media (max-width: 600px) {
    .fejlec-info-rejtett-mobil { display: none !important; }
    .fejlec-felso-jobbra .fejlec-elvalaszto { margin: 0 2px; }
    .fejlec-felso-jobbra { font-size: 13px; }
    .fejlec-uzdvozles {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        vertical-align: middle;
    }
}

/* --- Logó + akciók sor --- */
.fejlec-fo-tartalom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}
.fejlec-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 1;
    min-width: 0;
    text-decoration: none;
}
.fejlec-logo-kep {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}
.fejlec-logo-szoveg { min-width: 0; }
.fejlec-logo-cim {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}
.fejlec-logo-tagline { font-size: 11px; color: #777; }

@media (max-width: 480px) {
    .fejlec-logo-kep { height: 36px; }
    .fejlec-logo-cim { font-size: 18px; }
    .fejlec-logo-tagline { display: none; }
}

/* --- Akció ikonok (kereső, fiók, kosár, hamburger) --- */
.fejlec-akciok {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.fejlec-akcio-ikon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    font-size: 22px;
    color: #1f1f1f;
    text-decoration: none;
    position: relative;
}
.fejlec-akcio-ikon:hover { background: rgba(0,0,0,0.05); }

.fejlec-kosar-szam {
    position: absolute;
    top: 4px; right: 2px;
    background: #c8a25b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --- Hamburger gomb (alap: rejtve, mobilon látszik) --- */
.fejlec-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
}
.fejlec-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1f1f1f;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.fejlec-hamburger.aktiv span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fejlec-hamburger.aktiv span:nth-child(2) { opacity: 0; }
.fejlec-hamburger.aktiv span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .fejlec-hamburger { display: inline-flex; }
}

/* --- Navigációs menü --- */
/* Desktopon: vízszintes csík */
.fejlec-menu {
    background: #fff;
    border-top: 1px solid #efebe2;
}
.fejlec-menu-tartalom {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}
.fejlec-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    border-radius: 6px;
}
.fejlec-menu-link:hover { background: #f7f1e6; text-decoration: none; }
.fejlec-menu-link.aktiv { color: #9a7838; border-bottom: 2px solid #c8a25b; border-radius: 0; }

/* Mobilon: lecsukva, hamburgerre nyílik (a meglévő .aktiv class-t használja a header.php) */
@media (max-width: 900px) {
    .fejlec-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top: 0;
    }
    .fejlec-menu.aktiv {
        max-height: 500px;       /* elég bármilyen menühossznak */
        border-top: 1px solid #efebe2;
    }
    .fejlec-menu-tartalom {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }
    .fejlec-menu-link {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 0;
        border-bottom: 1px solid #efebe2;
    }
    .fejlec-menu-link.aktiv {
        background: #f7f1e6;
        border-bottom: 1px solid #efebe2;
        border-left: 3px solid #c8a25b;
    }
}


/* ========================================================================== */
/*  2. HERO                                                                   */
/* ========================================================================== */

/* Hero-ban lévő dekoratív arany csík elrejtése mobilon */
@media (max-width: 768px) {
    .hero-vonal { display: none !important; }
}

/* HERO háttér javítás:
   Az eredeti style.css-ben `background-size: 80%` van + `no-repeat`, ezért
   mobilon a kép kicsi volt és körülötte csak az áttetsző gradient + a body
   krém színe látszott. Most mobilon kitöltjük az egész területet. */
.hero {
    background-size: cover !important;
    background-position: center center !important;
}

@media (max-width: 768px) {
    .hero {
        /* Mobilon: kép kitölti, a gradient picit erősebb, hogy a cím olvasható maradjon */
        background-image:
            linear-gradient(135deg, rgba(250, 247, 242, 0.82) 0%, rgba(245, 239, 228, 0.82) 100%),
            url('/uploads/hero-bg.jpg') !important;
        background-size: cover !important;
        background-position: center center !important;
        padding: 60px 16px !important;
    }
    .hero h1 { font-size: clamp(28px, 9vw, 44px) !important; line-height: 1.15; }
    .hero-szubcim { font-size: 16px !important; }
}

@media (max-width: 480px) {
    .hero { padding: 50px 16px !important; }
    .hero h1 { font-size: clamp(26px, 10vw, 38px) !important; }
}


/* ========================================================================== */
/*  3. KONTÉNER + SZEKCIÓ PADDING                                             */
/* ========================================================================== */

@media (max-width: 600px) {
    .container { padding-left: 16px !important; padding-right: 16px !important; }
    .szekcio-cim { margin-bottom: 24px; }
    .szekcio-cim h2 { font-size: 26px; }
}


/* ========================================================================== */
/*  4. TERMÉK GRID                                                            */
/* ========================================================================== */

.termek-grid {
    display: grid;
    gap: 16px;
}

/* MOBIL ELSŐ: 2 oszlop kis kijelzőn is */
@media (max-width: 599px) {
    .termek-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
}
/* nagyon keskeny telefon (<360px) – egy oszlop */
@media (max-width: 359px) {
    .termek-grid { grid-template-columns: 1fr !important; }
}
@media (min-width: 600px) and (max-width: 899px) {
    .termek-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 900px) {
    .termek-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Termék kártya – ne mobilon óriási legyen az aspect ratio */
.termek-kartya {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.termek-kartya .termek-kep {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.termek-info { padding: 12px !important; }
@media (max-width: 480px) {
    .termek-nev { font-size: 15px !important; line-height: 1.3; }
    .termek-ar { font-size: 16px !important; }
    .termek-kategoria { font-size: 10px !important; }
    .gravirozhato-cimke { font-size: 10px !important; padding: 2px 6px !important; }
}

/* Kategória szűrő gombsor (termekek.php-ben inline) – mobil scroll */
.termekek-szuro {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 32px;
}
@media (max-width: 600px) {
    /* mobilon vízszintesen görgethető legyen a hosszú kategória-lista */
    .termekek-szuro {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .termekek-szuro .gomb-link { flex-shrink: 0; font-size: 13px; padding: 10px 16px; }
}


/* ========================================================================== */
/*  5. TERMÉK RÉSZLETES OLDAL                                                 */
/* ========================================================================== */

.termek-reszlet {
    display: grid;
    grid-template-columns: 1fr;        /* MOBIL: egymás alatt */
    gap: 24px;
}
@media (min-width: 800px) {
    .termek-reszlet { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.galeria-fokep {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f1e6;
    border-radius: 8px;
    overflow: hidden;
}
.galeria-fokep img { width: 100%; height: 100%; object-fit: cover; }

.galeria-belyegkepek {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.galeria-belyegkep {
    flex: 0 0 auto;
    width: 64px; height: 64px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #f7f1e6;
    padding: 0;
    cursor: pointer;
}
.galeria-belyegkep img { width: 100%; height: 100%; object-fit: cover; }
.galeria-belyegkep.aktiv { border-color: #c8a25b; }

.termek-reszlet-ar {
    font-size: clamp(26px, 7vw, 38px) !important;
}

/* Variáns gombok – becsomagolható, érintőbarát */
.variant-gombok {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.variant-gomb {
    min-height: 44px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e6e2da;
    border-radius: 6px;
    background: #fff;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 14px;
}
.variant-gomb.aktiv { background: #1f1f1f; color: #fff; border-color: #1f1f1f; }
.variant-gomb.elfogyott { opacity: 0.5; text-decoration: line-through; pointer-events: none; }

/* Termék részlet-oldalon a "Kosárba teszem" gomb mobilon teljes szélesség */
@media (max-width: 600px) {
    .termek-reszlet form .gomb,
    .termek-reszlet form .gomb-arany {
        width: 100% !important;
        padding: 16px !important;
    }
    .termek-reszlet .form-csoport input[name="mennyiseg"] {
        width: 100% !important;
        max-width: 160px;
    }
}


/* ========================================================================== */
/*  6. FORMOK (belépés, regisztráció, kapcsolat, rendelés)                    */
/* ========================================================================== */

.form-doboz {
    max-width: 440px;
    margin: 24px auto;
    padding: 20px;
}
@media (min-width: 480px) {
    .form-doboz { padding: 36px 32px; }
}

.form-csoport { margin-bottom: 16px; }
.form-csoport label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}
.form-csoport input,
.form-csoport select,
.form-csoport textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid #e6e2da;
    border-radius: 6px;
    font-family: inherit;
    background: #fff;
    color: #1f1f1f;
    -webkit-appearance: none;
    appearance: none;
}
.form-csoport input:focus,
.form-csoport select:focus,
.form-csoport textarea:focus {
    outline: 2px solid #c8a25b;
    outline-offset: 1px;
    border-color: #c8a25b;
}
.form-csoport textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Belépés/regisztráció dobozban a Bejelentkezés gomb teljes szélesség */
.form-doboz button[type="submit"],
.form-doboz .gomb {
    width: 100%;
    margin-top: 4px;
}


/* ========================================================================== */
/*  7. KOSÁR – tételek mobilon olvashatóan                                    */
/* ========================================================================== */

.kosar-tartalom { max-width: 920px; }

.kosar-tetel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 14px;
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-areas:
        "kep info"
        "kep ar"
        "muv muv";
    gap: 10px 14px;
    align-items: start;
}
.kosar-tetel-kep {
    grid-area: kep;
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border-radius: 6px;
    background: #f7f1e6;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #c8a25b;
}
.kosar-tetel > div:nth-of-type(1) { grid-area: info; }
.kosar-tetel > div:nth-of-type(2) {
    grid-area: ar;
    font-size: 18px !important;
}
.kosar-tetel > form { grid-area: muv; }
.kosar-tetel form .muvelet-gomb { width: 100%; }

@media (min-width: 640px) {
    .kosar-tetel {
        grid-template-columns: 96px 1fr auto auto;
        grid-template-areas: "kep info ar muv";
        align-items: center;
        padding: 18px;
        gap: 18px;
    }
    .kosar-tetel-kep { width: 96px !important; height: 96px !important; }
    .kosar-tetel form .muvelet-gomb { width: auto; }
}

.muvelet-gomb {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #e6e2da;
    background: #fff;
    color: #1f1f1f;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}
.muvelet-torles {
    color: #b00020;
    border-color: #f4c7cb;
    background: #fff;
}
.muvelet-torles:hover { background: #fff5f5; }

.kosar-osszesen {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px;
    text-align: right;
    margin-top: 8px;
}
.kosar-osszesen-ar {
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 700;
    color: #9a7838;
}
@media (max-width: 480px) {
    .kosar-osszesen { padding: 18px 16px; text-align: center; }
    .kosar-osszesen .gomb-link {
        width: 100%;
        margin-top: 14px;
        padding: 14px !important;
    }
}


/* ========================================================================== */
/*  8. RENDELÉS – grid mobilbarát                                             */
/* ========================================================================== */

/* Az új grid osztály (lásd módosított rendeles.php) */
.rendeles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 900px) {
    .rendeles-grid { grid-template-columns: 2fr 1fr; gap: 30px; }
}
.rendeles-form, .rendeles-osszesites {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
    .rendeles-form { padding: 36px; }
    .rendeles-osszesites { padding: 28px; height: fit-content; }
}
.rendeles-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 8px;
}


/* ========================================================================== */
/*  9. RENDELÉSEIM – kártyák                                                  */
/* ========================================================================== */

.rendeles-kartya {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 18px;
    margin-bottom: 14px;
}
@media (min-width: 640px) {
    .rendeles-kartya { padding: 28px; }
}
.rendeles-fej {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
@media (max-width: 480px) {
    .rendeles-fej > div:last-child { text-align: left !important; }
}
.rendeles-tetel-sor {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    flex-wrap: wrap;
}


/* ========================================================================== */
/*  10. LÁBLÉC                                                                */
/* ========================================================================== */

.lablec {
    background: #1f1f1f;
    color: #d9d3c5;
    padding: 32px 0 16px;
    margin-top: 48px;
}
.lablec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 600px) { .lablec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .lablec-grid { grid-template-columns: repeat(4, 1fr); } }

.lablec h3, .lablec h4 {
    color: #fff;
    margin: 0 0 12px;
    font-family: 'Cormorant Garamond', serif;
}
.lablec h4 { font-size: 16px; }
.lablec a {
    display: block;
    color: #d9d3c5;
    padding: 6px 0;
    text-decoration: none;
    min-height: 32px;
}
.lablec a:hover { color: #c8a25b; }
.lablec-also {
    border-top: 1px solid #333;
    margin-top: 24px;
    padding-top: 14px;
    text-align: center;
    font-size: 13px;
    opacity: 0.75;
}


/* ========================================================================== */
/*  11. ÜZENETEK (flash)                                                      */
/* ========================================================================== */

.uzenet {
    padding: 14px 18px;
    border-radius: 6px;
    margin: 16px;
    font-size: 15px;
    text-align: center;
}
.uzenet-siker {
    background: #e6f4ea;
    color: #1e6b3a;
    border: 1px solid #c4e7d0;
}
.uzenet-hiba {
    background: #fdecea;
    color: #b00020;
    border: 1px solid #f4c7cb;
}
@media (min-width: 768px) {
    .uzenet { margin: 24px auto; max-width: 1200px; }
}


/* ========================================================================== */
/*  12. ACCESSIBILITY – fókuszgyűrű                                           */
/* ========================================================================== */

a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #c8a25b;
    outline-offset: 2px;
}

/* Reduced-motion preferencia tisztelete */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}