/* ==========================================================================
   Ajándékház.ro — alap stíluslap
   Kézzel írt, build-lépés nélkül. Mobil-first, népi-hímzés hangulat.
   ========================================================================== */

:root {
    /* Alapszínek */
    --bg:          #fbf7f1;  /* meleg elefántcsont */
    --surface:     #ffffff;
    --surface-2:   #f4ece1;  /* halvány pergamen */
    --ink:         #2a211c;  /* meleg sötét */
    --ink-soft:    #6b5d54;
    --line:        #ece3d8;

    /* Márka (a logó piros hímzéséből) */
    --brand:       #b3312a;
    --brand-dark:  #8f241f;
    --brand-tint:  #f7e7e2;

    /* Népi akcentusok (a hímzésmintákból) */
    --folk-green:  #2f7d4f;
    --folk-yellow: #efb92e;
    --folk-blue:   #2f4a8a;

    /* Forma */
    --radius:      14px;
    --radius-sm:   9px;
    --shadow:      0 1px 2px rgba(42,33,28,.05), 0 8px 24px rgba(42,33,28,.07);
    --shadow-lg:   0 12px 40px rgba(42,33,28,.14);
    --container:   1120px;

    /* Tipográfia */
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, svg { display: block; max-width: 100%; height: auto; }
/* A hidden attribútum mindig győzzön — különben egy display-t adó osztály (pl. .palette) felülírja. */
[hidden] { display: none !important; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; font-weight: 700; color: var(--ink); }

/* --- Layout --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
main { flex: 1 0 auto; }

/* --- Fejléc --- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(251,247,241,.9);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand img { height: 58px; width: auto; }
.brand__fallback { font-family: var(--serif); font-size: 1.35rem; color: var(--brand); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    color: var(--ink); font-weight: 600; font-size: .96rem;
    padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-dark); }

.nav-toggle { display: none; }

/* Nyelvválasztó (HU / RO / EN / DE) */
.lang-switch {
    display: flex; align-items: center; gap: 2px;
    margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line);
}
.lang-switch__item {
    font-size: .8rem; font-weight: 700; letter-spacing: .04em;
    padding: 6px 8px; border-radius: 8px; color: var(--muted);
}
.lang-switch__item:hover { background: var(--brand-tint); color: var(--brand-dark); }
.lang-switch__item.is-active { color: var(--brand-dark); background: var(--brand-tint); }

/* --- Gombok --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: 1rem; line-height: 1; text-align: center;
    transition: transform .08s ease, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-tint); }
.btn--lg { padding: 15px 30px; font-size: 1.08rem; }

/* --- Hero --- */
.hero { position: relative; overflow: hidden; background:
        radial-gradient(1200px 400px at 80% -10%, var(--brand-tint), transparent 60%),
        var(--bg); }
.hero__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--brand-dark); font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; font-size: .8rem; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); letter-spacing: -.01em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero__lead { font-size: clamp(1.05rem, 2.5vw, 1.25rem); color: var(--ink-soft); margin-top: 16px; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__media { position: relative; }
.hero__media img {
    width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 5; object-fit: cover;
}

/* --- Szekció fejléc --- */
.section-head { text-align: center; max-width: 60ch; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.section-head p { color: var(--ink-soft); margin-top: 10px; }

/* --- Termékrács --- */
.product-grid {
    display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.product-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card__media { aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__title { font-family: var(--serif); font-size: 1.12rem; }
.product-card__price { color: var(--brand-dark); font-weight: 700; margin-top: auto; }
.product-card__flag {
    align-self: flex-start; font-size: .76rem; font-weight: 700; letter-spacing: .02em;
    padding: 3px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark);
}
.btn--block { width: 100%; justify-content: center; }

/* --- Címkék --- */
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
    font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: 999px;
    background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.tag--active { background: var(--brand); color: #fff; border-color: var(--brand); }

.tag__dot {
    display: inline-block; width: 11px; height: 11px; border-radius: 50%;
    margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15);
}

/* --- Szűrők (terméklista) --- */
.filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-group__label {
    font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-soft); margin-right: 2px;
}
.filters a.tag { cursor: pointer; }
.filters a.tag:hover { border-color: var(--brand); color: var(--brand-dark); }
.filter-clear { font-size: .85rem; font-weight: 600; margin-left: auto; color: var(--ink-soft); }

/* --- Breadcrumb --- */
.breadcrumb { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: var(--ink); font-weight: 600; }

/* --- Termék részletező --- */
.product-detail { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.gallery__main {
    width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    background: var(--surface-2); aspect-ratio: 4 / 5; object-fit: cover;
}
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.swatch {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
    border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
    font-weight: 600; font-size: .92rem; color: var(--ink);
}
.swatch--active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.swatch__dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }

.product-detail__info h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.product-detail__price { font-family: var(--serif); font-size: 1.9rem; color: var(--brand-dark); font-weight: 700; margin-top: 1rem; }
.product-detail__actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 12px; }
.product-detail__desc { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); }

@media (min-width: 800px) {
    .product-detail { grid-template-columns: 1fr 1fr; }
}

/* --- Lábléc --- */
.site-footer { background: var(--ink); color: #e9dfd5; margin-top: clamp(3rem, 8vw, 6rem); }
.site-footer .container { padding-block: 2.5rem; }
.site-footer a { color: #f0c9c2; }
.site-footer__grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 10px; font-family: var(--sans); letter-spacing: .02em; }
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 18px;
    font-size: .85rem; color: #b7a99d; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}

/* --- Segéd --- */
.stack > * + * { margin-top: var(--gap, 1rem); }
.text-muted { color: var(--ink-soft); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Űrlapok --- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-weight: 600; font-size: .9rem; }
.form-field input, .form-field textarea {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); font: inherit; color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
.form-error { color: var(--brand-dark); font-size: .84rem; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
}
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 600; }
.alert--error { background: #fdecea; color: #a12016; border: 1px solid #f3c6c0; }
.alert--success { background: #eaf6ee; color: #1c6b3a; border: 1px solid #bfe3cd; }
.alert--warn { background: #fef4e2; color: #8a5d0b; border: 1px solid #f0dcb2; }

/* --- Rendelés visszaigazolás --- */
.confirm-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 2.5rem 2rem; text-align: center;
}
.confirm-card__icon {
    width: 64px; height: 64px; border-radius: 50%; background: var(--folk-green); color: #fff;
    font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.confirm-card__order {
    background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 16px;
    margin: 1.25rem 0; display: flex; justify-content: space-between; align-items: center;
}
.confirm-line { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); text-align: left; }
.confirm-line--total { font-size: 1.05rem; }

/* ==========================================================================
   Reszponzív — asztali kiegészítések (mobil az alap)
   ========================================================================== */
@media (min-width: 720px) {
    .hero__grid { grid-template-columns: 1.05fr .95fr; }
    .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* Mobil navigáció (hamburger) */
@media (max-width: 719px) {
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
        background: var(--surface); color: var(--ink);
    }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--surface); border-bottom: 1px solid var(--line);
        padding: 10px 16px 16px; box-shadow: var(--shadow);
        display: none;
    }
    .nav[data-open="true"] { display: flex; }
    .nav a { padding: 12px 14px; }

    .lang-switch {
        margin: 8px 0 0; padding: 10px 6px 0;
        border-left: 0; border-top: 1px solid var(--line);
    }
    .lang-switch__item { padding: 10px 12px; }
}
