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

/* Variabile CSS */
:root {
    --primary-color: #8B4513; /* Maro - culoare primară */
    --secondary-color: #D2B48C; /* Tan - culoare secundară */
    --accent-color: #CD853F; /* Peru - culoare accent */
    --text-color: #333333; /* Gri închis - culoare text */
    --light-color: #F5F5DC; /* Beige - culoare deschisă */
    --white-color: #FFFFFF; /* Alb */
    --error-color: #D32F2F; /* Roșu - culoare eroare */
    --success-color: #388E3C; /* Verde - culoare succes */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Umbră standard */
    --border-radius: 8px; /* Rază de bordură standard */
    --transition: all 0.3s ease; /* Tranziție standard */
}

/* Stiluri generale */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

a:hover {
    color: var(--accent-color);
}

button {
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: var(--transition);
}

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

/* Header */
header {
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

#logo {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

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

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Stiluri pentru pagina Despre noi */
.about-hero {
    background-image: url('../img/brutărie.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    position: relative;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.about-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

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

.about-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.about-section {
    padding: 4rem 2rem;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-story, .about-values, .about-process, .about-team {
    margin-bottom: 4rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.values-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    margin-bottom: 1rem;
}

.team-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.team-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.team-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.team-gallery img:hover {
    transform: scale(1.02);
}

/* Responsive pentru pagina Despre noi */
@media screen and (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-process .about-content {
        display: flex;
        flex-direction: column-reverse;
    }
}

@media screen and (max-width: 768px) {
    .about-hero {
        height: 300px;
    }
    
    .about-hero h2 {
        font-size: 2rem;
    }
    
    .values-container {
        grid-template-columns: 1fr;
    }
    
    .team-gallery {
        grid-template-columns: 1fr;
    }
}

/* Products Section */
.products-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.product-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.product-description {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.product-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    width: 100%;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-to-cart-btn:hover {
    background-color: var(--accent-color);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background-color: var(--white-color);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    margin-bottom: 0;
}

#close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

#close-cart:hover {
    color: var(--primary-color);
}

.cart-items {
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-right: 1rem;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    background-color: #f0f0f0;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.cart-item-quantity span {
    margin: 0 0.5rem;
}

.remove-from-cart {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    margin-left: auto;
    align-self: flex-start;
}

.remove-from-cart:hover {
    color: var(--error-color);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.checkout-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    width: 100%;
    font-weight: 500;
    text-align: center;
    display: block;
}

.checkout-btn:hover {
    background-color: var(--accent-color);
    color: var(--white-color);
}

.empty-cart-message {
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* Checkout Page */
.checkout-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.order-summary {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.checkout-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.checkout-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-right: 1rem;
}

.checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-details {
    flex-grow: 1;
}

.checkout-item-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.checkout-item-price {
    font-size: 0.9rem;
    color: #666;
}

.checkout-item-quantity {
    margin-left: auto;
    font-weight: 500;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    font-size: 1.2rem;
}

.checkout-form-container {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-container input {
    margin-right: 0.5rem;
}

.submit-order-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    width: 100%;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.submit-order-btn:hover {
    background-color: var(--accent-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    padding: 2rem;
}

.modal-content {
    background-color: var(--white-color);
    margin: 0 auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: var(--primary-color);
}

.back-to-shop {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Error and Success Messages */
.error-message {
    color: var(--error-color);
    background-color: rgba(211, 47, 47, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: none;
}

.success-message {
    color: var(--success-color);
    background-color: rgba(56, 142, 60, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Slideshow */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Animație pentru fade */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}