:root {
    --anthropic-paper: #FBF9F7;
    --anthropic-dark-gray: #333333;
    --light-cream: #EAE3D9;
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* Novazione della variabile tipografica: Adobe Providence Sans Web Pro */
    --font-menu: 'ff-providence-sans-web-pro', sans-serif; 
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--anthropic-paper);
    color: var(--anthropic-dark-gray);
    font-family: var(--font-primary);
    font-weight: 600; /* Semibold */
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Header Principale */
header {
    position: sticky; /* Novazione: fissa l'elemento durante lo scroll */
    top: 0; /* Ancoraggio assoluto al margine superiore della finestra */
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--light-cream);
    background-color: var(--anthropic-paper);
    z-index: 1000;
}

.logo {
    max-height: 50px;
    width: auto;
}

/* Pulsante Hamburger (Mobile) */
.hamburger {
    position: absolute;
    left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animazione allontanamento linee */
.hamburger.active span:nth-child(1) {
    transform: translateY(-4px);
}
.hamburger.active span:nth-child(2) {
    transform: translateY(4px);
}

/* Side Drawer (Mobile) */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100%;
    background-color: var(--anthropic-paper);
    border-right: 1px solid var(--light-cream);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    padding-top: 100px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.mobile-drawer.open {
    left: 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.mobile-drawer .nav-list {
    flex-direction: column;
}

.nav-list li {
    padding: 15px 30px;
    position: relative;
}

/* Desktop Navigation (Sotto-Header) */
.desktop-nav {
    display: none;
    position: sticky; /* Novazione: estensione del vincolo alla barra menu */
    top: 80px; /* Offset calcolato sull'ingombro dell'header soprastante */
    width: 100%;
    height: 60px;
    border-bottom: 1px solid var(--light-cream);
    background-color: var(--anthropic-paper);
    justify-content: center;
    align-items: center;
    z-index: 998;
}

.desktop-nav .nav-list {
    flex-direction: row;
    gap: 60px;
}

/* Responsive Logic */
@media (min-width: 769px) {
    .hamburger, .mobile-drawer {
        display: none;
    }
    .desktop-nav {
        display: flex;
    }
    /* Ablazione del bordo inferiore dell'header in ambiente desktop */
    header {
        border-bottom: none;
    }
}

/* Area Contenuto Principale */
main {
    flex-grow: 1;
}

/* Toast Lingua */
.lang-toast {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    background-color: var(--anthropic-paper);
    border: 1px solid var(--light-cream);
    border-radius: 1.5rem;
    padding: 10px 0;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    flex-direction: column;
}

.desktop-nav .lang-toast {
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
}

.lang-toast.show {
    display: flex;
}

.lang-toast a {
    padding: 12px 20px;
    display: block;
    text-align: center;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.lang-toast a:hover {
    background-color: rgba(0,0,0,0.03);
}

/* Footer Snello - Deroga all'ereditarietà del peso tipografico */
footer {
    width: 100%;
    border-top: 1px solid var(--light-cream);
    background-color: var(--anthropic-paper);
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    font-weight: 400; /* Declassamento al peso Regular */
}

footer a {
    margin: 0 8px;
    transition: opacity 0.2s ease;
    font-weight: 400; /* Estensione della deroga ai nodi ipertestuali */
}

footer a:hover {
    opacity: 0.7;
}

/* Applicazione tassativa del font Providence Sans ai nodi di navigazione */
.nav-list li a,
.lang-toggle,
.lang-toast a {
    font-family: var(--font-menu);
    font-weight: 400; 
    font-style: normal;
    color: var(--anthropic-dark-gray);
    letter-spacing: 0.02em; 
}

/* Applicazione tassativa del font Providence Sans ai nodi di navigazione */
.nav-list li a,
.lang-toggle,
.lang-toast a {
    font-family: var(--font-menu);
    font-weight: 400; 
    font-style: normal;
    color: var(--anthropic-dark-gray);
    letter-spacing: 0.02em; 
}

/* Novazione: Evidenza tipografica per la voce di menu corrente (solo peso) */
.nav-list li a.active {
    font-weight: 700; 
}

/* ==========================================================================
   SEZIONE SHOP - VETRINA PRODOTTI
   ========================================================================== */

.shop-main {
    padding: 40px 20px;
    background-color: var(--anthropic-paper);
}

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

/* Titoli della pagina Shop */
.shop-title {
    font-family: var(--font-menu); /* Eredita il Providence Sans */
    font-size: 2.5rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 10px;
    color: var(--anthropic-dark-gray);
}

.shop-subtitle {
    text-align: center;
    font-weight: 400;
    color: #666;
    margin-bottom: 50px;
}

/* Griglia Responsiva */
.shop-grid {
    display: grid;
    /* La griglia crea colonne da minimo 280px e si espande fluidamente */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* Card del Prodotto */
.product-card {
    background-color: #FFFFFF;
    border: 1px solid var(--light-cream);
    border-radius: 4px; /* Angoli lievemente smussati, molto enterprise */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px); /* Sollevamento al passaggio del mouse */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

/* Carosello Immagini Prodotto - Scroll Orizzontale */
.product-carousel {
    display: flex;
    width: 100%;
    aspect-ratio: 1 / 1; /* Mantiene il quadrato perfetto */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Fluidità su iOS */
    scrollbar-width: none; /* Nasconde scrollbar su Firefox */
    -ms-overflow-style: none; /* Nasconde scrollbar su IE/Edge */
    background-color: var(--light-cream);
}

/* Nasconde scrollbar su Chrome, Safari e Opera */
.product-carousel::-webkit-scrollbar {
    display: none;
}

.product-image {
    flex: 0 0 100%; /* Ogni immagine occupa il 100% della larghezza */
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: center; /* Aggancio perfetto */
}

.product-card:hover .product-image {
    transform: scale(1.03); /* Lieve zoom della foto al passaggio del mouse */
}

/* Informazioni Prodotto */
.product-info {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    text-align: center;
}

.product-name {
    font-family: var(--font-menu);
    font-size: 2rem; /* Novazione: declassamento dimensionale per maggior garbo estetico */
    font-weight: 400;
    margin: 0 0 10px 0;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--anthropic-dark-gray);
}

/* Pulsante d'Acquisto */
.btn-buy {
    font-family: 'acumin-pro', sans-serif; /* Transizione ad Acumin Pro */
    font-weight: 400; /* Peso Regular come richiesto */
    background-color: #8b8e76; 
    color: var(--anthropic-paper);
    border: none;
    padding: 12px 24px;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 2px;
    width: 100%;
    transition: background-color 0.2s ease;
    margin-top: auto; 
}

.btn-buy:hover {
    background-color: #7a7d67; /* Variazione per interazione hover */
}

/* Adattamento della classe btn-buy per i tag di tipo anchor (Link Download) */
a.btn-buy {
    display: block;
    text-align: center;
    box-sizing: border-box;
    text-decoration: none;
    line-height: normal;
}

/* ==========================================================================
   SEZIONE CHI SIAMO (ABOUT)
   ========================================================================== */

.about-main {
    padding: 60px 20px;
    background-color: var(--anthropic-paper);
}

.about-container {
    max-width: 900px; /* Contenitore più stretto per facilitare la lettura */
    margin: 0 auto;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
}

.about-image-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    background-color: var(--light-cream);
    border-radius: 4px;
    overflow: hidden;
}

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

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--anthropic-dark-gray);
    font-weight: 400;
}

.about-text p {
    margin-bottom: 24px;
}

.about-signature {
    font-family: var(--font-menu);
    font-size: 1.3rem;
    margin-top: 40px;
    text-align: center;
}

/* Layout Desktop per Chi Siamo */
@media (min-width: 769px) {
    .about-content {
        flex-direction: row;
        align-items: flex-start; /* Novazione: ancora l'immagine e il testo al margine superiore */
        gap: 60px;
    }

    .about-image-wrapper {
        flex: 1;
        margin: 0;
        margin-top: 7px; /* Offset chirurgico per allineamento ottico perfetto con il primo rigo */
    }

    .about-text {
        flex: 1;
    }
    
    .about-signature {
        text-align: left;
    }
}

/* ==========================================================================
   SEZIONE CONTATTI
   ========================================================================== */

.contact-main {
    padding: 60px 20px;
    background-color: var(--anthropic-paper);
    flex-grow: 1;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-card {
    background-color: #FFFFFF;
    border: 1px solid var(--light-cream);
    border-radius: 4px;
    padding: 40px 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.contact-card h3 {
    font-family: var(--font-menu);
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 400;
    color: var(--anthropic-dark-gray);
}

.contact-card a {
    color: var(--anthropic-dark-gray);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--light-cream);
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.contact-card a:hover {
    color: #000;
    text-decoration-color: #000;
}

.small-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 15px;
    font-weight: 400;
    line-height: 1.5;
}

/* Annulla il margine superiore del primo rigo per un allineamento millimetrico con la foto */
.about-text p:first-child {
    margin-top: 0;
}

/* ==========================================================================
   SEZIONE BLOG
   ========================================================================== */
.blog-main {
    padding: 60px 20px;
    background-color: var(--anthropic-paper);
    flex-grow: 1;
}

.blog-container {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.blog-card {
    background-color: #FFFFFF;
    border: 1px solid var(--light-cream);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; /* Formato panoramico ideale per i blog */
    overflow: hidden;
    border-bottom: 1px solid var(--light-cream);
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image-wrapper img {
    transform: scale(1.03); /* Lieve effetto zoom al passaggio del mouse */
}

.blog-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-title {
    font-family: var(--font-menu);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--anthropic-dark-gray);
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.blog-excerpt {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 400;
    flex-grow: 1;
}

.blog-read-more {
    font-family: 'acumin-pro', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b8e76;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
    transition: color 0.2s ease;
}

.blog-read-more:hover {
    color: #7a7d67;
}

/* ==========================================================================
   SEZIONE HERO (HOME PAGE)
   ========================================================================== */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    background-color: var(--anthropic-paper);
    min-height: 60vh;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-menu);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--anthropic-dark-gray);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'acumin-pro', sans-serif;
    font-weight: 400; /* Aggiunto per forzare il peso regular */
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Varianti Bottoni Home Page */
.btn-primary, .btn-secondary {
    font-family: 'acumin-pro', sans-serif;
    font-weight: 400;
    padding: 14px 32px;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #8b8e76;
    color: var(--anthropic-paper);
    border: 1px solid #8b8e76;
}

.btn-primary:hover {
    background-color: #7a7d67;
    border-color: #7a7d67;
}

.btn-secondary {
    background-color: transparent;
    color: var(--anthropic-dark-gray);
    border: 1px solid var(--anthropic-dark-gray);
}

.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}


/* ==========================================================================
   CARRELLO — DRAWER LATERALE E ICONA HEADER
   ========================================================================== */

/* Icona carrello nell'header */
#cart-badge {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--anthropic-dark-gray);
    padding: 0;
}

#cart-badge svg {
    display: block;
}

#cart-count {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: #8b8e76;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    line-height: 1;
}

/* Overlay scuro dietro il pannello */
#cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1099;
}

/* Pannello carrello */
#cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--anthropic-paper);
    border-left: 1px solid var(--light-cream);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.06);
}

/* Stato aperto */
#cart-drawer.open #cart-overlay { display: block; }
#cart-drawer.open #cart-panel   { right: 0; }

/* Header pannello */
#cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--light-cream);
}

#cart-title {
    font-family: var(--font-menu);
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0;
}

#cart-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    transition: color 0.2s ease;
}
#cart-close:hover { color: var(--anthropic-dark-gray); }

/* Lista articoli */
#cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--light-cream);
    font-size: 0.95rem;
}

.cart-item-name  { flex: 1; font-weight: 600; }
.cart-item-qty   { color: #888; font-weight: 400; }
.cart-item-price { font-weight: 600; white-space: nowrap; }

.cart-item-remove {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    transition: color 0.2s ease;
}
.cart-item-remove:hover { color: #333; }

/* Footer con totale e bottone */
#cart-footer {
    padding: 20px 24px 28px;
    border-top: 1px solid var(--light-cream);
}

#cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1rem;
}

#cart-total-label { font-weight: 400; color: #555; }
#cart-total-value { font-weight: 700; font-size: 1.15rem; }

#cart-empty-msg {
    text-align: center;
    color: #aaa;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 20px 0;
    margin: 0;
}

/* Bottone PayPal dentro il drawer */
#paypal-checkout-btn {
    width: 100%;
}

/* Skeleton loader per le card prodotto */
.skeleton-card {
    min-height: 380px;
    background: linear-gradient(90deg, #f0ede8 25%, #e8e4de 50%, #f0ede8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Bottone placeholder (pre-PayPal) */
.btn-buy--placeholder {
    opacity: 0.45;
    cursor: not-allowed;
    width: 100%;
}

/* ==========================================================================
   CARRELLO — FIX LAYOUT: footer e bottone PayPal sempre visibili
   ========================================================================== */
#cart-items {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}
#cart-footer {
    flex-shrink: 0;
    padding: 20px 24px 28px;
    border-top: 1px solid var(--light-cream);
}
