:root {
    --primary: #6366f1;
    --accent: #06b6d4;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }
body { background-color: var(--bg); color: var(--text); min-height: 100vh; }

header { background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 1rem 5%; position: sticky; top: 0; z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; }
.nav-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; align-items: center;}
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--accent); }

.container { width: 90%; max-width: 1400px; margin: 2rem auto; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.product-card { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; }
.product-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }
.product-card img { width: 100%; height: 200px; object-fit: contain; border-radius: 8px; margin-bottom: 1rem; background: white;}
.stars { color: #f59e0b; }

.search-bar { margin-bottom: 2rem; display: flex; gap: 10px; }
.search-bar input, .search-bar select, .search-bar textarea { flex: 1; padding: 12px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); color: white; }

.btn { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block; transition: 0.3s;}
.btn:hover { opacity: 0.9; }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }

table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 15px; overflow: hidden; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { background: rgba(255,255,255,0.05); }

/* Státusz jelzők */
.badge { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; color: white; }
.badge.fizetetlen { background: var(--danger); }
.badge.fizetve { background: var(--info); }
.badge.csomag_feladva { background: var(--warning); }
.badge.lezarva { background: var(--success); }

/* Új szállítási mezők stílusai */
.text-danger-notice { color: #ef4444; font-weight: 600; margin-bottom: 15px; font-size: 0.95rem; line-height: 1.4; }
.text-warning-notice { color: #f59e0b; font-weight: bold; margin-bottom: 15px; font-size: 1.05rem; }
.shipping-options { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); }
.radio-group { display: flex; gap: 20px; margin-top: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 1.1rem; }
.radio-group input[type="radio"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }

/* Tájékoztató doboz a kosárnál */
.info-box { background: rgba(59, 130, 246, 0.1); border-left: 4px solid var(--info); padding: 20px; margin-bottom: 20px; border-radius: 0 8px 8px 0; font-size: 0.95rem; line-height: 1.6; }
.checkbox-container { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; cursor: pointer; }
.checkbox-container input { margin-top: 5px; cursor: pointer; width: 18px; height: 18px; }

/* Elfelejtett jelszó link */
.link-forgot {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}
.link-forgot:hover {
    color: var(--accent);
}

/* Revolut tájékoztató doboz */
.revolut-notice {
    background: rgba(251, 113, 133, 0.1);
    border: 1px solid #fb7185;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}
.revolut-notice h3 {
    color: #fb7185;
    margin-bottom: 10px;
}
.revolut-notice p {
    margin: 5px 0;
    line-height: 1.5;
}

/* Kosár termék törlés gomb */
.btn-delete-item {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(251, 113, 133, 0.2);
    color: #fb7185;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.btn-delete-item:hover {
    background: #fb7185;
    color: white;
}

/* Egyéb üzenetek */
.error-msg { color: #fb7185; text-align: center; margin-bottom: 15px; }
.success-msg { color: var(--success); text-align: center; margin-bottom: 15px; }

.reset-flow h2 { text-align: center; margin-bottom: 10px; }
.reset-flow p { text-align: center; color: var(--text-muted); margin-bottom: 20px; }

/* Értesítő dobozok stílusa (profile.php) */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-danger {
    background-color: rgba(251, 113, 133, 0.1);
    color: #fb7185;
    border: 1px solid rgba(251, 113, 133, 0.3);
}

.alert-success {
    background-color: rgba(52, 211, 153, 0.1);
    color: #34d399; /* Szép smaragdzöld a sötét témához */
    border: 1px solid rgba(52, 211, 153, 0.3);
    text-align: center;
    font-weight: bold;
}

/* --- Adataim szerkesztése űrlap --- */

/* Fő konténer */
.profile-form {
    max-width: 600px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
}

/* Címsor */
.profile-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

/* Figyelmeztető doboz */
.profile-alert {
    margin-bottom: 25px;
    text-align: justify;
}

/* Beviteli mezők alapértelmezett viselkedése az űrlapon */
.profile-form .search-bar {
    width: 100%;
    margin-bottom: 15px;
}

/* Kicsivel nagyobb hely a jelszó mező alatt */
.profile-form .password-input {
    margin-bottom: 25px;
}

/* Egymás melletti mezők (flexbox) */
.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

/* Segítő szöveg a jelszónál */
.password-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Teljes szélességű gomb */
.btn-full {
    width: 100%;
}

/* --- Autentikációs / Regisztrációs űrlap --- */

/* Fő konténer (hasonló az adatmódosítóhoz) */
.auth-form {
    max-width: 600px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
}

/* Címsor */
.auth-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

/* Beviteli mezők alap távolsága */
.auth-form .search-bar {
    width: 100%;
    margin-bottom: 15px;
}

/* Az egymás melletti mezőknél a belső margin eltüntetése, 
   helyette a sor aljára teszünk margót */
.auth-form .form-row {
    margin-bottom: 15px;
}
.auth-form .form-row .search-bar {
    margin-bottom: 0;
}

/* Jelszó alatti nagyobb térköz */
.auth-form .password-input {
    margin-bottom: 25px;
}

/* Lábléc szöveg és link */
.auth-footer-text {
    margin-top: 20px;
    text-align: center;
}

.auth-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Rendszerüzenetek (Siker / Hiba) */
.msg-error {
    color: var(--danger);
    text-align: center;
    font-weight: bold;
}

.msg-success {
    color: var(--success);
    text-align: center;
    font-weight: bold;
}

/* Újrahasznosítható osztályok */
.form-row { display: flex; gap: 15px; }
.form-col { flex: 1; }
.btn-full { width: 100%; }

/* --- Termékoldal stílusok --- */

/* Fő termék kártya */
.product-detail-card {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
}

.product-image {
    max-width: 400px;
    width: 100%;
    border-radius: 10px;
    background: white;
    object-fit: contain;
}

.product-info {
    flex: 1;
}

.product-price {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-description {
    color: var(--text-muted);
    margin: 20px 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Vélemények szekció */
.reviews-section {
    margin-top: 3rem;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
}

.review-form {
    margin: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.review-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0;
}

.review-meta {
    margin-top: 10px;
}

.stars {
    color: #f39c12; /* Sárga szín a csillagoknak */
}

/* Űrlap elemek igazítása */
.cart-form {
    display: flex;
    gap: 10px;
}

.qty-input {
    width: 80px;
    margin-bottom: 0;
}

.review-textarea {
    width: 100%;
    height: 80px;
}

/* --- Belépés és Jelszó visszaállítás form stílusai --- */

.auth-form-wrapper {
    max-width: 400px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
}

.auth-form-wrapper h2 {
    margin-bottom: 20px;
    text-align: center;
}

/* Üzenetek (Siker / Hiba) */
.msg-error {
    color: var(--danger);
    text-align: center;
}

.msg-success {
    color: var(--success);
    text-align: center;
}

/* Input mezők igazításai */
.auth-form-wrapper input.search-bar {
    width: 100%;
    margin-bottom: 15px; /* Alapértelmezett távolság */
}

.auth-form-wrapper input.search-bar.mb-25 {
    margin-bottom: 25px;
}

.auth-form-wrapper input.search-bar.my-15 {
    margin: 15px 0;
}

.auth-form-wrapper input.search-bar.text-center {
    text-align: center;
}

/* Gombok */
.auth-form-wrapper .btn {
    width: 100%;
}

/* Kiegészítő szövegek és linkek */
.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
}

.auth-footer-text {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-footer-text a {
    color: var(--accent);
}

.auth-forgot-link-wrapper {
    text-align: center;
    margin-top: 15px;
}

.auth-forgot-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}


/* =========================================
   --- MOBIL OPTIMALIZÁCIÓ (Media Queries) --- 
   ========================================= */

@media (max-width: 768px) {
    /* Fejléc és navigáció */
    header { padding: 1rem; }
    nav { flex-direction: column; gap: 15px; }
    .nav-links { width: 100%; justify-content: center; gap: 15px; }

    /* Rácsok és kártyák */
    .product-grid { grid-template-columns: 1fr; gap: 15px; }
    .container { width: 95%; margin: 1rem auto; }
    
    /* Űrlapok és kártyák belső margójának (padding) csökkentése */
    .profile-form, 
    .auth-form, 
    .auth-form-wrapper, 
    .product-detail-card,
    .reviews-section {
        padding: 20px;
        margin: 20px auto;
    }

    /* Keresőmező és űrlap sorok oszlopos elrendezése */
    .search-bar { flex-direction: column; gap: 10px; }
    .form-row { flex-direction: column; gap: 15px; }
    
    /* Termékoldal igazítása */
    .product-detail-card { gap: 20px; }
    .product-image { max-width: 100%; height: auto; }
    .cart-form { flex-direction: column; align-items: stretch; }
    .cart-form .btn { width: 100%; }
    .qty-input { width: 100%; }

    /* Táblázat görgethetővé tétele */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Kosár törlés gomb pozíciójának igazítása */
    .btn-delete-item {
        position: relative;
        right: 0;
        top: auto;
        transform: none;
        margin-top: 10px;
        display: inline-flex;
    }

    /* Szállítási opciók */
    .radio-group { flex-direction: column; gap: 15px; }
}