/* Alap beállítások */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* Fejléc */
header {
    background-color: #c1ae8e;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-container img {
    height: 56px;
    width: auto;
    display: block;
}

.header-container h1 {
    margin: 0;
    font-size: 1.5rem;
    color: inherit;
    line-height: 1;
}

/* Mobilon visszaállítható sorba rendezéshez (opcionális) */
@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 8px;
    }
}

/* Fő elrendezés (Container) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start; /* Fontos a sticky aside miatt */
}

/* Bal oldal: Terméklista */
.product-list {
    flex: 3; /* A hely 75%-át foglalja el */
}

.product-list h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Utalvány Kártya Stílus */
.voucher-card {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    border: 1px solid #eee;
}

.voucher-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.voucher-image img {
    width: 250px;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background-color: #f4f7f6; /* opcionális: "letterbox" háttérszín */
    flex-shrink: 0; /* ha flex-item, hogy ne zsugorodjon */
}

.voucher-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.voucher-details h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: black;
    margin-bottom: 15px;
}

/* Gombok és Inputok */
.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qty-input {
    padding: 8px;
    width: 60px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

.add-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.add-btn:hover {
    background-color: #2980b9;
}

/* Jobb oldal: Kosár (Aside) */
.cart-sidebar {
    flex: 1; /* A hely 25%-át foglalja el */
    position: sticky;
    top: 20px; /* Gördítésnél itt tapad meg */
}

.cart-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.cart-content h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.cart-items {
    min-height: 50px;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.item-price {
    font-weight: bold;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 15px 0;
}

.checkout-btn {
    width: 100%;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background-color: #219150;
}

/* tranzakciós megjegyzés (a kiválasztott placeholder-hez) */
.transaction-note {
    margin: 8px 0 12px 0;
    color: #6b7280;
    font-size: 0.85rem;
}
.transaction-note small {
    display: block;
    color: inherit;
    text-align: right;
}

:root {
    --footer-height: 64px;
}

/* Footer + centered language selector styles (fixed to bottom while scrolling) */
footer.lang-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--footer-height);
        background: #fafafa;
        border-top: 1px solid rgba(0,0,0,0.06);
        padding: 0 12px; /* vertical padding handled by height/align-items */
        font-family: inherit;
        color: #333;
        z-index: 9999;
        display: flex;
        align-items: center;
        box-shadow: 0 -1px 6px rgba(0,0,0,0.04);
}

/* ensure page content isn't hidden behind the fixed footer */
body {
        padding-bottom: var(--footer-height);
}

/* center content horizontally */
footer.lang-footer .lang-container {
        max-width: 980px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
}

/* pill-style language switch */
.lang-selector {
        display: inline-flex;
        align-items: center;
        background: rgba(0,0,0,0.03);
        border-radius: 999px;
        padding: 4px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        overflow: hidden;
}

/* each language button */
.lang-option {
        appearance: none;
        -webkit-appearance: none;
        border: 0;
        background: transparent;
        padding: 8px 14px;
        margin: 0;
        cursor: pointer;
        font-weight: 600;
        color: #444;
        font-size: 14px;
        line-height: 1;
        transition: background 150ms ease, color 150ms ease;
        border-radius: 999px;
}

/* active / selected state */
.lang-option[aria-pressed="true"],
.lang-option.active {
        background: #ffffff;
        color: #111;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* subtle hover/focus affordance */
.lang-option:hover {
        background: rgba(0,0,0,0.04);
}
.lang-option:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* small divider between options for clarity on wide backgrounds */
.lang-option + .lang-option {
        margin-left: 2px;
}

/* optional small language label to the left (if present) */
footer.lang-footer .lang-label {
        margin-right: 10px;
        font-size: 13px;
        color: #666;
}

/* remove button a kosár tételeknél */
.cart-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.remove-btn {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    font-size: 8px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.06s ease;
}

/* állapotok */
.remove-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}
.remove-btn:active {
    transform: translateY(0);
}
.remove-btn:focus,
.remove-btn:focus-visible {
    outline: 3px solid rgba(231,76,60,0.25);
    outline-offset: 2px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    margin: 12px 0;
    border: 1px dashed #e6e6e6;
    background: #fbfbfb;
    border-radius: 8px;
    color: #444;
    text-align: center;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.empty-cart .empty-title {
    font-weight: 600;
    font-size: 16px;
}
.empty-cart .empty-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
}

/* helper to hide when there are items */
.empty-cart.hidden { display: none; }

/* Modern UI for the form */
.payment-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
}

.payment-form fieldset {
    border: none;
    margin-bottom: 20px;
}

.payment-form legend {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.payment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.payment-form input[type="text"],
.payment-form input[type="email"],
.payment-form input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.payment-form input[type="text"]:focus,
.payment-form input[type="email"]:focus,
.payment-form input[type="number"]:focus {
    border-color: #007BFF;
    outline: none;
}

.payment-form .row {
    display: flex;
    gap: 10px;
}

.payment-form .col {
    flex: 1;
}

.payment-form .form-actions {
    text-align: center;
}

.payment-form .proceed-btn {
    background-color: #007BFF;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.payment-form .proceed-btn:hover {
    background-color: #0056b3;
}

/* responsive: stack on very small screens */
@media (max-width: 420px) {
        :root { --footer-height: 88px; }
        body { padding-bottom: var(--footer-height); }

        footer.lang-footer .lang-container {
                padding: 6px;
                flex-direction: column;
                gap: 6px;
        }
        .lang-selector {
                width: 100%;
                justify-content: center;
        }
        .lang-option {
                flex: 1 1 0;
                text-align: center;
                padding: 10px 6px;
                font-size: 15px;
        }
        .lang-option + .lang-option {
                margin-left: 0;
                border-left: 1px solid rgba(0,0,0,0.04);
        }

.remove-btn { width: 28px; height: 28px; font-size: 14px; top: 6px; right: 6px; }
}


/* Mobil nézet (Reszponzivitás) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .voucher-card {
        flex-direction: column;
    }

    .voucher-image img {
        width: 100%;
        height: 200px;
    }

    .cart-sidebar {
        width: 100%;
        position: static; /* Mobilon ne legyen sticky */
    }
}

.back-btn{
    display:flex;
    align-items:center;
    gap:0.5rem;
    background:#fff;
    border:1px solid #dcdcdc;
    padding:0.5rem 0.75rem;
    border-radius:6px;
    cursor:pointer;
    font-size:0.95rem;
    color:#222;
}
.back-btn:hover{ background:#f6f6f6; }
.back-btn:active{ transform:translateY(1px); }
.back-btn:focus{ outline:3px solid rgba(33,150,243,0.25); outline-offset:2px; }