/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    background-color: #FAF7F2;
    line-height: 1.6;
}

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

/* Header */
header {
    background: linear-gradient(to bottom, #8B0000, #A52A2A);
    color: white;
    padding: 1.5rem 0;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrato il contenuto */
    text-align: center;  /* Centrato il testo */
}

.header-text h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    width: 100%; /* Assicura larghezza piena */
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    letter-spacing: 1px;
    text-align: center; /* Centrato il testo */
    width: 100%; /* Assicura larghezza piena */
    margin-top: 0.5rem; /* Spazio tra titolo e sottotitolo */
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    .header-main {
        flex-direction: column;
        gap: 1.5rem;
    }

    .logo {
        width: 180px;
    }

    .header-text h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }
}

/* Navigation */
nav {
    background-color: #8B0000;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.nav-container {
    position: relative;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: rgba(255,255,255,0.8);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-container {
        justify-content: center;
    }

    .hamburger {
        display: flex;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: -20px; /* Compensare il padding del container */
        right: -20px; /* Compensare il padding del container */
        background-color: #8B0000;
        padding: 1rem 0;
        gap: 1rem;
        text-align: center;
        width: calc(100% + 40px); /* Larghezza totale + padding del container */
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    /* Animazione hamburger quando attivo */
    .hamburger.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Main Content */
main {
    padding-top: 50px; /* Aggiunto padding sopra il main */
}




.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-buttons button {
    padding: 0.5rem 1rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-buttons button:hover {
    background-color: #A52A2A;
}

/* Grid per gli oggetti */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card degli oggetti */
.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #8B0000;
}

.card-price {
    font-weight: bold;
    color: #8B0000;
}

.card-details {
    margin-top: auto;
}

.card button {
    width: 100%;
    padding: 0.75rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.card button:hover {
    background-color: #A52A2A;
}

/* Footer */
footer {
    background-color: #8B0000;
    color: white;
    padding: 1.5rem 0; /* Ridotto da 3rem a 1.5rem */
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem; /* Ridotto da 1.5rem a 1rem */
}

.footer-item h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem; /* Ridotto da 1rem a 0.5rem */
}

.footer-item p {
    line-height: 1.6;
}

/* Modal e Form Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-family: 'Cormorant Garamond', serif;
    color: #8B0000;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 0.75rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #A52A2A;
}

/* Media Queries */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .card img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        flex-wrap: wrap;
    }

    .logo {
        max-width: 200px;
    }

    header h1 {
        font-size: 2rem;
    }
}

/* Stili per la griglia di prodotti */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Card Prodotto */
.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px; /* Altezza fissa per tutte le card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Immagine del prodotto */
.card-image {
    height: 250px; /* Altezza fissa per il contenitore dell'immagine */
    overflow: hidden;
}

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

/* Corpo della card */
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

/* Header della card */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #8B0000;
    margin: 0;
    flex: 1;
    padding-right: 10px;
}

.price {
    font-weight: bold;
    color: #8B0000;
    white-space: nowrap;
}

/* Descrizione */
.description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}
/* Specifiche */
.specifications {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.specifications p {
    margin-bottom: 5px;
}

.specifications .label {
    font-weight: bold;
    color: #333;
}

/* Bottone */
.cta-button {
    width: 100%;
    padding: 12px;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Spinge il bottone in fondo */
}

.cta-button:hover {
    background-color: #A52A2A;
}

/* Media Queries */
@media (max-width: 768px) {
    .product-card {
        height: 550px; /* Altezza leggermente ridotta su tablet */
    }
    
    .card-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .product-card {
        height: 500px; /* Altezza ancora più ridotta su mobile */
    }
    
    .card-image {
        height: 180px;
    }
    
    .card-header h3 {
        font-size: 1.3rem;
    }
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notifiche */
.notifica {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
    animation: slideIn 0.5s ease-out;
}

.notifica-content {
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 300px;
}

.notifica.success .notifica-content {
    border-left: 4px solid #4CAF50;
}

.notifica.error .notifica-content {
    border-left: 4px solid #f44336;
}

.notifica-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}