/* =========================================================
   NAPIKOSAR.HU – Shop UI (cleaned)
   - Alap betűméret: 11px (kérés alapján)
   - Levegősebb terek (több padding/gap)
   - iOS input-zoom védelem (touch eszközön 16px input font)
   - Dupla font letöltés elkerülése (NINCS @import; a font link a head.php-ban van)
   ========================================================= */

/* ---------- Design tokenek / változók ---------- */

:root {
    /* Layout */
    --header-height: 64px;
    --container: 1120px;

    /* Typo */
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* A kért „12-es betűméret” bázis */
    --fs-0: 11px;
    /* base */
    --fs-1: 12px;
    /* small */
    --fs-2: 13px;
    /* medium */
    --fs-3: 14px;
    /* large */
    --fs-4: 16px;
    /* section title */
    --fs-5: 20px;
    /* hero */
    --fs-6: 24px;
    /* hero xl */

    --lh: 1.6;

    /* Spacing (levegősebb, de kontrollált) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 18px;
    --sp-5: 24px;
    --sp-6: 30px;
    --sp-7: 40px;

    /* Background */
    --bg-page: #fffaf1;
    --bg-page-soft: #f9fafb;

    /* Globális oldal háttér (alapértelmezett) */
    --bg-gradient: #f7f7f7;

    /* Surfaces */
    --surface: #ffffff;
    --surface-soft: #fff7e8;
    --surface-elevated: #ffffff;

    /* Borders, shadows */
    --border: #e5e7eb;
    --border-soft: #f3f4f6;
    --border-strong: #d1d5db;

    --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.14);

    /* Colors */
    --text: #111827;
    --text-soft: #374151;
    --muted: #6b7280;

    --primary: #f59e0b;
    /* nap-sárga */
    --primary-strong: #d97706;
    --primary-soft: #fef3c7;

    --accent-orange: #e35727;
    /* KOSÁR.HU szalag */
    --accent-orange-soft: #ffe4d5;

    --danger: #dc2626;
    --danger-soft: #fee2e2;

    /* Shapes, motion */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-pill: 999px;

    --transition-fast: 180ms ease;
    --transition-med: 240ms ease;
}

/* ---------- Reset + alapok ---------- */

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html {
    /* A bázis betűméretet itt állítjuk, minden „rem” erre épülhet később is */
    font-size: var(--fs-0);
}

/* Javasolt: smooth scroll helyett a perf_fix.css úgyis auto-ra állít, de itt sem erőltetjük */
body {
    font-family: var(--font);
    font-size: var(--fs-0);
    line-height: var(--lh);
    font-weight: 400;
    color: var(--text);
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-content-wrap {
    flex: 1 0 auto;
    width: 100%;
    padding-bottom: 34px;
}

/* Oldalszintű felülírás (ha kell): pl. <body class="bg-white"> */
body.bg-white {
    background: #ffffff;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    margin: 0;
}

p {
    margin: 0;
}

/* Linkek */
a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
    color: var(--primary-strong);
}

/* Accessible focus */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid rgba(245, 158, 11, .55);
    outline-offset: 2px;
}

/* Oldal konténer */
.page {
    max-width: var(--container);
    margin: 0 auto;
    padding: calc(var(--header-height) + var(--sp-7)) 20px 44px;
}

/* =========================================================
     HERO SZEKCIÓ
     ========================================================= */

.hero {
    margin-bottom: var(--sp-6);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--sp-5);
    align-items: stretch;
}

.hero-card {
    position: relative;
    background:
        radial-gradient(circle at 0 0, rgba(254, 243, 199, 0.8) 0, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(254, 215, 170, 0.9) 0, transparent 55%),
        var(--surface-elevated);
    border-radius: 26px;
    border: 1px solid rgba(250, 204, 21, 0.38);
    box-shadow: var(--shadow-md);
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% -10%, rgba(244, 244, 245, 0.6) 0, transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(var(--fs-5), 2.1vw, var(--fs-6));
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.hero-text {
    margin: 0;
    color: var(--text-soft);
    font-size: var(--fs-1);
    position: relative;
    z-index: 1;
}

.hero-actions {
    margin-top: var(--sp-2);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    position: relative;
    z-index: 1;
}

.hero-feature-list {
    margin: 0 0 var(--sp-2);
    padding-left: 18px;
    font-size: var(--fs-1);
    color: var(--muted);
    position: relative;
    z-index: 1;
}

/* =========================================================
     GOMBOK
     ========================================================= */

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: var(--surface-soft);
    color: var(--text);

    font-size: var(--fs-1);
    text-decoration: none;
    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast),
        opacity var(--transition-fast);
    font-weight: 500;
}

@media (hover:hover) {
    .btn:hover {
        background: #f3f4f6;
        border-color: var(--border-strong);
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd84d, #f59e0b);
    border-color: transparent;
    color: #111827;
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.55);
}

@media (hover:hover) {
    .btn-primary:hover {
        box-shadow: 0 18px 38px rgba(245, 158, 11, 0.7);
        transform: translateY(-1px);
    }
}

.btn-danger {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* =========================================================
     SZEKCIÓK, KÁRTYÁK
     ========================================================= */

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 6px 0 var(--sp-4);
    gap: var(--sp-3);
}

.section-header h2 {
    margin: 0;
    font-size: var(--fs-4);
    letter-spacing: -0.01em;
}

.section-header p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.section-header--no-top {
    margin-top: 0;
}

.section-subheading {
    font-size: var(--fs-3);
    margin-top: 0;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-soft);
    margin: var(--sp-3) 0 var(--sp-4);
}

/* Alap kártya */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    padding: 20px 22px 18px;
    margin-bottom: 20px;
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

/* Kompakt kártya */
.card-compact {
    padding: 14px 16px;
    border-radius: 18px;
}

.card-title-sm {
    margin: 0 0 var(--sp-2);
    font-size: var(--fs-3);
    font-weight: 600;
}

/* =========================================================
     TERMÉK GRID & KÁRTYÁK
     ========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.product-card {
    background:
        radial-gradient(circle at 0 0, rgba(255, 237, 213, 0.9) 0, transparent 55%),
        var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

@media (hover:hover) {
    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: rgba(245, 158, 11, 0.55);
    }
}

/* termék cím + meta */
.product-title {
    font-size: var(--fs-2);
    font-weight: 600;
    margin: 0 0 2px;
}

.product-meta {
    font-size: 12px;
    color: var(--muted);
}

/* termék link */
.product-link {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.product-link:hover {
    color: var(--accent-orange);
}

/* ár rész */
.product-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.product-price-row--bottom {
    align-items: flex-end;
}

.product-price {
    font-size: var(--fs-3);
    font-weight: 700;
    color: #92400e;
}

.product-price-lg {
    font-size: 20px;
}

.product-price-unit {
    font-size: 12px;
    color: var(--muted);
}

.product-old-price {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
}

/* akció gombok (Kosárba + Kedvenc) */
.product-actions {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.product-actions form {
    flex: 1;
}

.product-add-btn {
    width: 100%;
}

.product-fav-btn {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* Részletes leírás + paraméterek */
.product-description-text {
    font-size: var(--fs-1);
    white-space: pre-line;
    color: var(--text-soft);
}

.product-params-table th.name-col {
    width: 40%;
}

/* =========================================================
     TÁBLÁZATOK
     ========================================================= */

.table-wrapper {
    width: 100%;
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-1);
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table th {
    font-weight: 600;
    font-size: 12px;
    color: var(--muted);
    background: #f9fafb;
}

/* =========================================================
     ŰRLAPOK
     ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-sm {
    margin-bottom: 10px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-no-margin {
    margin: 0;
}

label {
    font-size: var(--fs-1);
    color: var(--text-soft);
}

.field-label-muted {
    font-size: var(--fs-1);
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
    padding: 9px 11px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #f9fafb;
    color: var(--text);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22);
}

textarea {
    resize: vertical;
}

/* iOS Safari: 16px alatt a fókusz zoomol. Megtartjuk a kis tipót, de a kontrollok legyenek 16px touchon. */
@media (hover:none) and (pointer:coarse) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* =========================================================
     ALERT ÜZENETEK
     ========================================================= */

.alert {
    padding: 10px 12px;
    font-size: var(--fs-1);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.alert-error {
    background: var(--danger-soft);
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf3;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

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

.site-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.75);
    background: linear-gradient(180deg, #0f172a 0%, #0b1222 100%);
    color: #e5e7eb;
    margin-top: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 20px 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    font-size: 12.5px;
}

.footer-copy {
    color: #e2e8f0;
    font-weight: 700;
    line-height: 1.35;
}

.footer-subcopy {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.45;
}

.footer-block--brand {
    position: relative;
    padding-right: 86px;
    min-height: 80px;
}

.footer-mascot {
    position: absolute;
    right: 0;
    bottom: -4px;
    width: clamp(58px, 6.4vw, 92px);
    margin: 0;
    pointer-events: none;
}

.footer-mascot img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 20px rgba(15, 23, 42, 0.34));
}

.footer-title {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: .02em;
}

.footer-stack {
    display: grid;
    gap: 6px;
}

.footer-contact {
    color: #dbe7ff;
    font-size: 12px;
    text-decoration: none;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
    width: fit-content;
}

.footer-contact:hover {
    color: #fff;
    border-bottom-color: rgba(251, 191, 36, 0.75);
}

.footer-text {
    display: grid;
    gap: 4px;
    color: #dbe3ef;
    font-size: 12px;
}

.footer-text--muted {
    margin-top: 8px;
    color: #9fb0c8;
}

.footer-line {
    display: block;
    line-height: 1.4;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.footer-links a {
    color: #dbe7ff;
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(148, 163, 184, 0.10);
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.footer-links a:hover {
    color: #fff;
    border-color: rgba(251, 191, 36, 0.75);
    background: rgba(251, 191, 36, 0.16);
    transform: translateY(-1px);
}

.footer-social {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.footer-social a {
    color: #c9d7ee;
    text-decoration: none;
    font-size: 11.5px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.16);
}

.footer-social a:hover {
    color: #fff;
    border-color: rgba(251, 191, 36, 0.66);
    background: rgba(251, 191, 36, 0.14);
}

/* =========================================================
     UTILITY CLASSOK
     ========================================================= */

.text-muted {
    color: var(--muted);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-bold {
    font-weight: 600;
}

.text-xs {
    font-size: 11px;
}

.text-sm {
    font-size: var(--fs-1);
}

/* margók */
.mt-4 {
    margin-top: 4px;
}

.mt-6 {
    margin-top: 6px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-12 {
    margin-top: 12px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.ml-4 {
    margin-left: 4px;
}

/* flex helpers */
.d-flex {
    display: flex;
}

.inline-form-row {
    display: flex;
    gap: 10px;
}

.flex-1 {
    flex: 1;
}

.align-center {
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

/* =========================================================
     RESPONSIVE
     ========================================================= */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .page {
        padding-top: calc(var(--header-height) + 26px);
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .checkout-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-block--brand {
        padding-right: 72px;
    }
}

@media (max-width: 600px) {
    .page {
        padding: calc(var(--header-height) + 20px) 14px 28px;
    }

    .hero-card {
        padding: 18px 16px;
    }

    .product-card {
        padding: 12px;
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
        gap: 10px;
    }

    .footer-block--brand {
        padding-right: 62px;
    }

    .footer-mascot {
        width: 54px;
        bottom: 0;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

/* =========================================================
     KATEGÓRIA KÁRTYÁK – MINIMALISTA, KIS HELYIGÉNY
     ========================================================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.category-card {
    padding: 10px 12px 12px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.category-card .product-title {
    font-size: var(--fs-1);
    margin: 0 0 2px;
    font-weight: 600;
}

.category-card .product-meta {
    font-size: 11px;
    color: var(--muted);
    margin: 0;
    line-height: 1.35;
    max-height: 2.7em;
    /* 2 sor */
    overflow: hidden;
}

/* Reduced motion: minimal animáció */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
