:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --secondary: #451a03;
    --bg: #fffcf2;
    --white: #ffffff;
    --text: #1f2937;
    --shadow: 0 4px 15px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    padding-top: 80px; /* Разстояние за десктоп */
}

/* NAV BAR */
.nav-bar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: white; box-shadow: var(--shadow); padding: 10px 0;
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.nav-brand { text-decoration: none; color: var(--secondary); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }

.mobile-row { display: flex; align-items: center; gap: 25px; }

.nav-menu { display: flex; list-style: none; gap: 15px; }
.nav-link { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem; }
.nav-link.active { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 15px; }
.action-btn-login, .action-btn-cart { text-decoration: none; color: var(--secondary); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.cart-count { background: #ef4444; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 50%; }

/* МОБИЛНИ КОРЕКЦИИ */
@media (max-width: 768px) {
    body { padding-top: 135px; } /* Повече място за двуредов хедър */

    .nav-container {
        flex-direction: column; /* Логото отива най-отгоре */
        gap: 12px;
    }

    .nav-brand {
        width: 100%; justify-content: center;
        border-bottom: 1px solid #eee; padding-bottom: 8px;
    }

    .mobile-row {
        width: 100%; justify-content: space-between; /* Менюто и иконите се разпределят под логото */
    }

    .login-text { display: none; } /* Скриваме текста "Вход/Изход" за място */
}

/* HERO SECTION */
header {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('hero-image.jpg') center/cover;
    height: 250px; display: flex; align-items: center; justify-content: center;
    color: white; text-align: center;
}

/* PRODUCTS GRID */
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; padding: 40px 20px; max-width: 1200px; margin: 0 auto;
}

.product-card {
    background: white; border-radius: 15px; overflow: hidden; box-shadow: var(--shadow);
    transition: 0.3s; display: flex; flex-direction: column;
}

.product-image { width: 100%; height: 200px; object-fit: contain; padding: 10px; cursor: pointer; }

.product-info { padding: 15px; text-align: center; flex-grow: 1; }
.product-name { font-size: 1.1rem; margin-bottom: 10px; color: var(--secondary); }
.product-price { font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 15px; }

.add-btn {
    background: var(--primary); color: white; border: none; padding: 10px;
    border-radius: 8px; font-weight: 700; width: 100%; cursor: pointer;
}

/* MODAL STYLES */
.product-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 2000; justify-content: center; align-items: center; padding: 20px;
}

.modal-content { background: white; padding: 30px; border-radius: 20px; width: 100%; max-width: 500px; position: relative; }
.close-modal { position: absolute; right: 20px; top: 10px; font-size: 2rem; cursor: pointer; }
.modal-img { width: 100%; max-height: 250px; object-fit: contain; margin-bottom: 15px; }
.modal-textarea { width: 100%; height: 80px; margin-bottom: 10px; padding: 10px; border-radius: 8px; border: 1px solid #ddd; }