/* VreauProaspat.ro - Main Stylesheet */

/* ==================== */
/* CSS VARIABLES */
/* ==================== */
:root {
    /* Colors */
    --color-primary: #2d7a3e;
    --color-primary-dark: #1f5a2d;
    --color-primary-light: #4a9d5c;
    --color-secondary: #f39c12;
    --color-accent: #e74c3c;

    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-lighter: #999999;

    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #e9ecef;

    --color-border: #dee2e6;
    --color-border-light: #e9ecef;

    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Georgia', serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-round: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);

    /* Transitions */
    --transition: all 0.3s ease;

    /* Container */
    --container-width: 1200px;
}

/* ==================== */
/* RESET & BASE */
/* ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==================== */
/* LAYOUT */
/* ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ==================== */
/* TYPOGRAPHY */
/* ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

/* ==================== */
/* BUTTONS */
/* ==================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #e67e22;
    color: white;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-primary);
    padding: 0;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--color-primary-dark);
}

/* ==================== */
/* HEADER */
/* ==================== */
.header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    gap: var(--spacing-lg);
}

.logo {
    order: 1;
}

.search-bar {
    order: 2;
}

.header-actions {
    order: 3;
}

.header-icons {
    order: 4;
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--color-primary);
}

.search-bar {
    flex: 1;
    max-width: 600px;
}

.search-bar form {
    display: flex;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    outline: none;
}

.search-bar button {
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

.search-bar button:hover {
    background-color: var(--color-primary-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Hide mobile-only elements on desktop */
.header-icons {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.mobile-menu-toggle {
    display: none !important;
}

/* Show mobile menu toggle only on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.btn-producer {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-secondary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.btn-producer:hover {
    background-color: #e67e22;
    color: white;
}

.cart-icon {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-md);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--color-accent);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.login-link {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--color-text);
    font-weight: 600;
}

/* Main Navigation */
.main-nav {
    border-top: 1px solid var(--color-border-light);
    padding: var(--spacing-sm) 0;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    z-index: auto;
    transition: none;
    overflow-y: visible;
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    flex-direction: row;
    padding-top: 0;
}

.main-nav li {
    border-bottom: none;
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    padding: var(--spacing-sm) 0;
}

.main-nav a:hover {
    color: var(--color-primary);
    background: transparent;
}

/* Hide mobile menu elements on desktop */
.main-nav .mobile-menu-actions {
    display: none;
}

.main-nav::before {
    display: none;
}

.mobile-menu-overlay {
    display: none !important;
}

/* ==================== */
/* HERO SECTION */
/* ==================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.hero h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== */
/* SECTIONS */
/* ==================== */
section {
    padding: var(--spacing-xxl) 0;
}

section h2 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* ==================== */
/* CATEGORIES */
/* ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card h3 {
    padding: var(--spacing-md);
    margin: 0;
    font-size: 1.2rem;
}

.category-card p {
    padding: 0 var(--spacing-md) var(--spacing-md);
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ==================== */
/* PRODUCTS GRID */
/* ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

/* Homepage: 4 products per row */
.featured-products .products-grid {
    grid-template-columns: repeat(4, 1fr);
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card > a,
.product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--color-bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--color-success);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: var(--radius-sm);
}

.product-badge.imported {
    background-color: var(--color-info);
}

.product-info {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-producer {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.product-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: var(--spacing-sm);
    border-top: 1px solid var(--color-border-light);
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-shrink: 0;
}

.product-price {
    font-size: 0.875rem;  /* 30% mai mic: 1.25rem * 0.7 = 0.875rem */
    font-weight: bold;
    color: var(--color-primary);
}

.product-unit {
    font-size: 0.7rem;
    color: var(--color-text-light);
}

/* Product Actions (Favorite + Add to Cart) */
.product-actions {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: flex-end;
}

.btn-add-cart {
    padding: 6px 10px;
    background-color: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 40px;
}

.btn-add-cart svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-add-cart .btn-text {
    display: none;
}

.btn-add-cart:hover {
    background-color: var(--color-primary-dark);
}

.btn-favorite {
    flex: 0 0 auto;
    padding: 6px 8px;
    background-color: white;
    border: 1px solid var(--color-border-light);
    color: var(--color-text);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-favorite:hover {
    background-color: #fee;
    border-color: #e91e63;
    transform: scale(1.05);
}

.btn-favorite.active {
    background-color: #fee;
    border-color: #e91e63;
}

.btn-favorite .heart-icon {
    transition: transform 0.3s ease;
    line-height: 1;
}

.btn-favorite:hover .heart-icon,
.btn-favorite.active .heart-icon {
    transform: scale(1.15);
}

/* ==================== */
/* BENEFITS */
/* ==================== */
.benefits {
    background-color: var(--color-bg-light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.benefit-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.benefit-card h3 {
    margin-bottom: var(--spacing-sm);
}

.benefit-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* ==================== */
/* PRODUCERS */
/* ==================== */
.producers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.producer-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.producer-card:hover {
    box-shadow: var(--shadow-md);
}

.producer-logo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-round);
    margin: 0 auto var(--spacing-md);
    object-fit: cover;
    border: 3px solid var(--color-border-light);
}

.producer-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.producer-location {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.producer-verified {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--color-success);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

/* ==================== */
/* CTA SECTION */
/* ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #e67e22 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

/* ==================== */
/* FOOTER */
/* ==================== */
.footer {
    background-color: var(--color-text);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer h3, .footer h4 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.footer p {
    color: #cccccc;
    margin-bottom: var(--spacing-md);
}

.footer ul li {
    margin-bottom: var(--spacing-sm);
}

.footer a {
    color: #cccccc;
}

.footer a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: #999999;
}

.footer-bottom p {
    margin-bottom: var(--spacing-sm);
}

/* ==================== */
/* UTILITIES */
/* ==================== */
.section-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.loading {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--color-text-light);
}

.breadcrumb {
    background-color: var(--color-bg-light);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.breadcrumb ol {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb ol li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb ol li::after {
    content: "›";
    margin: 0 var(--spacing-sm);
    color: var(--color-text-lighter);
    font-size: 1.2rem;
    font-weight: 300;
}

.breadcrumb ol li:last-child::after {
    content: "";
    margin: 0;
}

.breadcrumb ol li:last-child {
    color: var(--color-text);
    font-weight: 500;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ============================================
   User Menu - Header Profile Dropdown
   ============================================ */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: var(--color-text);
    font-size: 0.9rem;
}

.user-menu-toggle:hover {
    background: var(--color-bg-light);
}

.user-menu-toggle svg {
    flex-shrink: 0;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    margin-top: var(--spacing-sm);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown a,
.user-dropdown button {
    display: block;
    padding: var(--spacing-md);
    text-align: left;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: var(--color-bg-light);
}

.user-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--color-border-light);
}

.user-dropdown button#logout-btn {
    color: var(--color-error);
    font-weight: 500;
}
