﻿/** Shopify CDN: Minification failed

Line 2535:0 Unexpected "`"

**/
/* ==========================================================
   STYLE - TEXSTYLE ITALIA
   ========================================================== */

/* --- Variabili CSS --- */
:root {
    --color-base-white: #FFFFFF;
    --color-base-offwhite: #F7F6F4;
    --color-base-black: #111111;
    --color-accent-dark: #A78B6D;
    --color-accent-light: #C2B199;
    --color-manifesto-green: #7D8C7C;

    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
}

/* --- Reset e Stili Globali --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-base-offwhite);
    color: var(--color-base-black);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-base-black);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* This rule applies the white background and border on scroll */
header.header-scrolled {
    background-color: var(--color-base-white);
    border-bottom: 1px solid #eee;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* Restore baseline alignment */
}

.logo a {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 700;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-extra {
    display: flex;
    align-items: baseline; /* Restore baseline alignment */
    gap: 20px; /* Use gap for consistent spacing */
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 0; /* Remove gap between icon and count */
}

.cart-text {
    margin-right: -10px;
}

.cart-icon {
    display: none; /* Hide icon on desktop by default */
}

.user-icon-link {
    margin-left: 3px;
    display: flex;
    align-items: center;
    position: relative;
    top: 1px; /* Correzione allineamento verticale */
}

/* This rule might be obsolete now as the spans are gone */
.header-extra span {
    margin-left: 15px;
    cursor: pointer;
}


/* Offset main only for pages without hero */
main {
    padding-top: 70px;
}

/* Home page hero needs to start from 0 */
.template-index main {
    padding-top: 0;
}

/* --- Hero Section --- */
.hero {
    /* No margin-top needed as header is fixed */
    display: flex;
    align-items: flex-end; /* Align content to the bottom */
    justify-content: center;
    text-align: center;
    height: 100vh; /* Exact viewport height */
    width: 100%;
    padding-bottom: calc(100vh / 12); 
    background-color: var(--color-base-offwhite);
    background-image: url('./grafica/hero_16a9.png');
    background-size: cover;
    background-position: center center; /* Ensures even cropping if aspect ratio differs */
    color: var(--color-base-white);
}

.hero .container {
    /* No longer needs absolute positioning */
}

.hero h1 {
    font-family: var(--font-primary);
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-base-white); /* Ensure text is white */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-base-white); /* Ensure text is white */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* --- Utility & General Section Styles --- */
section {
    padding: 40px 0;
}

h2 {
    font-family: var(--font-primary);
    font-size: 42px;
    text-align: center;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--color-base-black);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--color-base-black);
    color: var(--color-base-white);
}

.btn-primary {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-base-white);
}

.btn-primary:hover {
    background-color: var(--color-base-black);
    border-color: var(--color-base-black);
}


/* --- Featured Products --- */
.featured-products {
    background-color: var(--color-base-white);
}

/* Nuovi stili per i prodotti in evidenza della Homepage */
.featured-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.featured-product-card {
    text-align: center;
}

.featured-product-card img {
    width: 100%;
    margin-bottom: 15px;
    /* No height o object-fit per mantenere l'AR originale */
}

.featured-product-card h3 {
    font-family: var(--font-primary);
    font-size: 22px;
    margin-bottom: 5px;
}

/* --- Product Detail Page --- */
/* --- Product Detail Page --- */
.product-detail .container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 colonne uguali */
    gap: 60px;
    align-items: flex-start;
}

.product-gallery .gallery-main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 15px;
}

.product-gallery .gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.product-gallery .gallery-thumbnails img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.product-gallery .gallery-thumbnails img:hover,
.product-gallery .gallery-thumbnails img.active {
    border-color: var(--color-accent-dark);
}

.product-detail .product-info h1 {
    font-family: var(--font-primary);
    font-size: 48px;
    margin-bottom: 10px;
}

.product-detail .product-info .subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 28px;
    color: var(--color-accent-dark);
    margin-bottom: 20px;
    display: block;
}

.product-detail .product-info .price {
    font-size: 32px;
    font-weight: 500;
    color: var(--color-base-black);
    margin-bottom: 30px;
}

.product-detail .product-info .btn-primary {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

@media screen and (max-width: 768px) {
    .product-detail .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}









/* Stili per i Tab di Descrizione/Materiali/Specifiche */
.product-tabs {
    width: 100%;
    margin-top: 20px;
    border-top: 1px solid #ddd;
}

.tabs-nav {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid #ddd;
}

.tabs-nav a {
    padding: 15px 0;
    font-size: 18px;
    font-family: var(--font-primary);
    color: #777;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.tabs-nav a.active,
.tabs-nav a:hover {
    color: var(--color-base-black);
    border-bottom-color: var(--color-accent-dark);
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.tab-content ul {
    list-style: disc;
    margin-left: 20px;
}

.tab-content ul li {
    margin-bottom: 10px;
}

/* Stili per il Selettore di Varianti a Tendina */
.variant-selector {
    margin-top: 20px;
}

.variant-selector h4 {
    font-family: var(--font-primary);
    font-size: 22px;
    margin-bottom: 10px;
}

.variant-select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: var(--font-secondary);
    border: 1px solid #ddd;
    background-color: var(--color-base-white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Stili per la Sezione Dettagli Tecnici */
.product-technical-details {
    padding: 60px 0;
    border-top: 1px solid #eee;
    background-color: var(--color-base-white);
}

.technical-details-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.technical-image img {
    width: 100%;
    max-width: 650px;
    display: block;
    margin: 0 auto;
}

.technical-downloads h3 {
    font-family: var(--font-primary);
    font-size: 28px;
    margin-bottom: 20px;
}

.technical-downloads a {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--color-accent-dark);
    text-decoration: underline;
}

/* Stili per la Sezione Info Aggiuntive */
.product-additional-info {
    padding: 60px 0;
    text-align: center;
    background-color: var(--color-base-offwhite);
    border-top: 1px solid #eee;
}

.product-additional-info h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.product-additional-info p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

/* Stili per la Galleria Showcase Aggiuntiva */
.product-showcase-gallery {
    padding: 60px 0;
}

.product-showcase-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 220px); /* 2 rows of 220px */
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.product-showcase-gallery .gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer; /* Add pointer cursor */
    transition: transform 0.3s ease;
}

.product-showcase-gallery .gallery-grid img:hover {
    transform: scale(1.02); /* Slight zoom effect on hover */
}

/* --- Lightbox Modal --- */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* High z-index to sit on top of everything */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 95%; /* Allow it to take up most of the width */
    max-height: 95vh; /* Allow it to take up most of the height */
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px){
    .lightbox-content {
        width: 100%;
    }
}

.product-showcase-gallery .gallery-grid img:nth-child(1) {
    grid-column: 1 / 3;  /* 2 columns wide (50%) */
    grid-row: 1 / 2;     /* 1 row high (shorter, as requested) */
}

    .product-showcase-gallery .gallery-grid img:nth-child(2) {
        grid-column: span 2;
    }

/* ==========================================================
   CUSTOMER ACCOUNT PAGES
   ========================================================== */
.account-page {
    padding: 20px 0 100px;
    min-height: 60vh;
}

.account-header {
    text-align: center;
    margin-bottom: 50px;
}

.account-header h1 {
    font-family: var(--font-primary);
    font-size: 42px;
    margin-bottom: 10px;
}

.account-form-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--color-base-white);
    padding: 40px;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-family: var(--font-secondary);
}

.forgot-password-container {
    text-align: right;
    margin-top: 8px;
}

.forgot-password {
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

.form-actions {
    margin-top: 30px;
}

.form-actions .btn {
    width: 100%;
    margin-bottom: 15px;
}

.secondary-actions {
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
}

.secondary-actions a {
    text-decoration: underline;
}

/* Dashboard & Grid */
.account-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 0;
}

.account-sidebar {
    width: 100%;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.sidebar-header-dropdown {
    position: relative;
    width: fit-content;
    margin-left: auto;
}

.sidebar-header-dropdown summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none; /* Remove default triangle */
}

.sidebar-header-dropdown summary::-webkit-details-marker {
    display: none; /* Remove default triangle Chrome */
}

.sidebar-header-dropdown h3 {
    margin-top: 0;
    margin-bottom: 0; /* Override default margin */
    border-bottom: none; /* Remove border from h3 as it's now in summary */
    padding-bottom: 0;
}

.sidebar-header-dropdown details[open] summary svg {
    transform: rotate(180deg);
}

.sidebar-header-dropdown .dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: max-content;
    min-width: 100%;
    background-color: var(--color-base-offwhite);
    z-index: 100;
    padding: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 0;
    border-radius: 4px 0 4px 4px;
    box-sizing: border-box;
}

.logout-link-dropdown {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
}

.logout-link-dropdown:last-child {
    margin-bottom: 0;
}

.logout-link-dropdown:hover {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.dropdown-profile-header {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.profile-avatar {
    width: 35px;
    height: 35px;
    background-color: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.profile-name {
    font-weight: 500;
    color: #333;
    font-size: 15px;
    line-height: 1.2;
}

.profile-email {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.account-sidebar p {
    margin-bottom: 10px;
    font-size: 15px;
    margin-top: 20px; /* Add space after header if dropdown closed */
}

.address-preview {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table th {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    color: #666;
    border-bottom: 2px solid #eee;
    padding: 15px;
}

.orders-table td {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.orders-table tr:last-child td {
    border-bottom: none;
}

.order-link {
    font-weight: 600;
    text-decoration: underline;
    color: var(--color-accent-dark);
}

.logout-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    text-decoration: underline;
}

.empty-state {
    padding: 40px;
    text-align: center;
    background: var(--color-base-offwhite);
    border-radius: 4px;
    color: #666;
}

/* Order Detail */
.order-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.order-block {
    background: var(--color-base-white);
    padding: 25px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
    .account-grid, .order-grid {
        grid-template-columns: 1fr;
    }
    
    .account-page {
        padding: 40px 0;
    }
    
    .account-form-container {
        padding: 20px;
    }
}





.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Fisso a 3 colonne su desktop come richiesto */
    gap: 30px;
    align-items: start;
}

@media screen and (max-width: 768px) {
    .category-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* Reduced gap for mobile */
    }

    .category-products .product-card--large {
        grid-column: span 1; /* One column instead of two on mobile */
    }

    .category-products .product-card img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
        height: auto;
    }

    .category-products .product-card h3 {
        font-size: 18px; /* Smaller title for 2-col layout */
        margin-top: 5px;
    }

    .category-products .product-card .subtitle {
        font-size: 16px; /* Smaller subtitle */
    }
}

.category-products .ambient-card {
    grid-column: 1 / -1; /* Occupa tutte e 4 le colonne */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    margin-bottom: 60px; /* Aggiunto spazio inferiore */
}

/* Applica opacità iniziale solo se animazioni abilitate (NON Firefox) */
body.animations-enabled .category-products .ambient-card {
    opacity: 0;
    transform: translateY(30px);
}

/* Gestione visibilità Ambient Card per Mobile/Desktop */
.ambient-card--mobile {
    display: block;
}
.ambient-card--desktop {
    display: none;
}

@media screen and (min-width: 769px) {
    .ambient-card--mobile {
        display: none;
    }
    .ambient-card--desktop {
        display: block;
    }
}

.category-products .ambient-card.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.ambient-card img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.product-card {
    text-align: center;
    /* Rimosse le proprietà di animazione da qui */
    transition: box-shadow 0.3s ease;
}

/* Stili di animazione applicati solo nella pagina categorie */
.category-products .product-card {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

/* Applica opacità iniziale solo se animazioni abilitate (NON Firefox) */
body.animations-enabled .category-products .product-card {
    opacity: 0;
    transform: translateY(30px);
}

/* Stile per le card grandi: su desktop occupano una sola colonna per permetterne 3 per riga */
@media screen and (min-width: 769px) {
    .product-card--large {
        grid-column: auto;
    }
}

.category-products .product-card.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-card a {
    display: block;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

/* Altezza immagine per le card grandi */
.product-card--large img {
    height: 350px;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-family: var(--font-primary);
    font-size: 26px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.product-card .subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 24px;
    color: var(--color-accent-dark);
    text-transform: none;
    letter-spacing: normal;
}

/* --- Collections Teaser --- */
.collections-teaser .collection-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.collections-teaser .collection-item:nth-child(even) {
    direction: rtl;
}

.collections-teaser .collection-item:nth-child(even) * {
    direction: ltr;
}

.collections-teaser img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.collections-teaser .collection-content h2 {
    text-align: left;
}

.collections-teaser .collection-item:nth-child(even) .collection-content {
    text-align: right;
}

.collections-teaser .collection-item:nth-child(even) .collection-content .btn {
    margin-left: auto;
}

.collections-teaser .collection-item:nth-child(even) .collection-content h2 {
    text-align: right;
}

/* --- Craftsmanship --- */
.craftsmanship {
    text-align: center;
    padding: 100px 0; /* More breathing room */
}

.craftsmanship h2 {
    font-size: 52px;
    margin-bottom: 30px;
}

.craftsmanship-text {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 18px;
    line-height: 1.8;
}

.craftsmanship-actions {
    margin-top: 30px;
}

/* Color Schemes */
.craftsmanship--green {
    background-color: var(--color-manifesto-green);
    color: var(--color-base-black);
    margin-top: 80px; /* Space above section on desktop */
}

@media screen and (max-width: 768px) {
    .craftsmanship--green {
        margin-top: 0; /* Reset for mobile if needed */
    }
}

.craftsmanship--green h2,
.craftsmanship--green .craftsmanship-text p {
    color: var(--color-base-black);
}

.craftsmanship--green .btn {
    background-color: var(--color-base-black);
    border-color: var(--color-base-black);
    color: var(--color-base-white);
}

.craftsmanship--green .btn:hover {
    background-color: transparent;
    color: var(--color-base-black);
}

/* --- Call to Action (CTA) --- */
.cta {
    padding: 80px 0;
    text-align: center;
}

.cta h2 {
    font-family: var(--font-primary);
    font-size: 52px; /* Match Manifesto h1 */
    margin-bottom: 25px;
}

.cta p {
    margin-bottom: 40px;
    font-size: 18px;
    max-width: 800px; /* Match Manifesto width */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8; /* Match Manifesto line-height */
}

/* Color Schemes */
.cta--black {
    background-color: var(--color-base-black);
    color: var(--color-base-white);
}
.cta--black h2, 
.cta--black p { 
    color: var(--color-base-white); 
}
.cta--black .btn-primary {
    background-color: var(--color-base-white);
    border-color: var(--color-base-white);
    color: var(--color-base-black);
}
.cta--black .btn-primary:hover {
    background-color: transparent;
    color: var(--color-base-white);
}

.cta--accent {
    background-color: var(--color-accent-dark); /* #A78B6D */
    color: var(--color-base-white);
}
.cta--accent h2, 
.cta--accent p { 
    color: var(--color-base-white); 
}
.cta--accent .btn-primary {
    background-color: var(--color-base-black);
    border-color: var(--color-base-black);
    color: var(--color-base-white);
}
.cta--accent .btn-primary:hover {
    background-color: var(--color-base-white);
    border-color: var(--color-base-white);
    color: var(--color-base-black);
}

.cta--light {
    background-color: var(--color-base-offwhite); /* Manifesto background */
    color: var(--color-base-black);
}
.cta--light h2 { 
    color: var(--color-base-black); 
}
.cta--light p { 
    color: #555; 
}

.cta--green {
    background-color: var(--color-manifesto-green);
    color: var(--color-base-white);
}
.cta--green h2, 
.cta--green p { 
    color: var(--color-base-white); 
}
.cta--green .btn-primary {
    background-color: var(--color-base-white);
    border-color: var(--color-base-white);
    color: var(--color-manifesto-green);
}
.cta--green .btn-primary:hover {
    background-color: transparent;
    color: var(--color-base-white);
}
/* Default button styles apply to light theme */

/* --- Footer --- */
footer {
    background-color: var(--color-base-white);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

/*
 * Cart Page Styles
 */
.cart-section h1 {
  text-align: center;
  margin-bottom: 40px;
}

.cart-empty {
  text-align: center;
  padding: 40px 0;
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid #EAEAEA;
  padding-bottom: 25px;
}

.cart-item__image {
  flex-shrink: 0;
  width: 213px;
  height: 120px;
  border: 1px solid #EAEAEA;
  border-radius: 4px;
  padding: 5px;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item__details {
  flex-grow: 1;
  min-width: 0;
}

.cart-item__title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 8px;
    /* FIX taglio testo */
    line-height: 1.8;
    padding-bottom: 5px;
}

.cart-item__variant {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.cart-item__price {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item__quantity label {
    font-size: 14px;
    color: #555;
}

.cart-item__quantity-input {
    width: 65px;
    padding: 8px;
    text-align: center;
    border: 1px solid #CCC;
    border-radius: 4px;
}

.cart-item__remove {
    font-size: 13px;
    color: var(--color-accent-dark);
    text-decoration: underline;
    margin-top: 10px;
    display: inline-block;
    font-weight: 500;
}

.cart-footer {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-direction: column;
  gap: 20px;
  border-top: 2px solid #EAEAEA; /* Changed to gray */
  padding-top: 30px;
  background-color: var(--color-base-white);
  padding: 30px;
  border-radius: 4px;
}

.cart-subtotal {
    text-align: right;
    width: 100%;
}

.cart-subtotal h2 {
  margin: 0 0 5px 0;
  text-align: right;
  font-size: 22px;
}

.cart-subtotal p {
    color: #555;
    margin: 0;
    font-size: 14px;
}

.cart-buttons {
  display: flex;
  gap: 15px;
}

/*
 * Global pointer cursor for clickable elements
 */
a, button, .btn, .header-extra span {
    cursor: pointer;
}
/* --- Pagina Chi Siamo --- */
.chi-siamo-section {
    padding-top: 10px;
    padding-bottom: 80px;
}

.chi-siamo-intro {
    text-align: center;
    margin-bottom: 80px;
}

.chi-siamo-intro h1 {
    font-family: var(--font-primary);
    font-size: 52px;
    margin-bottom: 25px;
}

.chi-siamo-intro .subtitle {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-accent-dark);
    font-family: var(--font-secondary);
}

.chi-siamo-content {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    padding-left: 30px; /* Space for timeline line (Left-aligned) */
}

/* The vertical timeline line (Global, left-aligned) */
.chi-siamo-content::before {
    content: '';
    position: absolute;
    left: 8px; /* Position of the line */
    top: 15px;
    bottom: 15px;
    width: 2px;
    background-color: #e5e5e5;
}

.content-block {
    position: relative;
    padding-bottom: 40px; /* Spacing between blocks */
}
.content-block h2 {
    font-family: var(--font-primary);
    font-size: 36px;
    text-align: left;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
}
.content-block p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.mobile-spacer {
    display: none; /* Hidden on desktop by default */
}

/* The timeline dots (Global, left-aligned) */
.content-block h2::before {
    content: '';
    position: absolute;
    left: -26px; /* Position it on the line */
    top: 15px;
    width: 16px;
    height: 16px;
    background-color: var(--color-accent-dark);
    border-radius: 50%;
    border: 3px solid var(--color-base-offwhite);
    z-index: 1;
}

/* --- Mobile Navigation Styles --- */
.hamburger-menu {
    display: none; /* Hidden by default */
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    margin-right: 20px;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-base-black);
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media screen and (max-width: 768px) {
    /* Hero image and text styles */
    header {
        /* The background, border, transition, and position are now global */
    }
    body.no-scroll header {
        background-color: var(--color-base-white);
    }
    .hero {
        background-image: url('./grafica/hero_9a16.png');
        
        padding-bottom: 40px; /* Lowered by 10px */
                    background-position: top; /* Ensure image starts from top */    }
    .hero h1 {
        font-size: 42px;
    }
    .hero p {
        font-size: 14px;
    }
    header .container {
        align-items: center; /* Override baseline for mobile */
    }
    .logo a {
        font-size: 19px; /* Reduced logo size for mobile */
    }

    /* Header specific styles for single row mobile */
    header nav {
        display: none; /* Hide main nav */
    }
    .hamburger-menu {
        display: flex;
        width: 24px; /* 20% smaller */
        height: 16px; /* 20% smaller */
        margin-right: 28px; /* Set space to cart back to 28px */
    }
    .hamburger-menu.is-active span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .hamburger-menu.is-active span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
    .hamburger-menu,
    .cart-icon {
        position: relative;
        top: 0px; /* Baseline for adjustment */
    }
    .cart-text {
        display: none; /* Hide text on mobile */
    }
    .cart-icon {
        display: block; /* Show icon on mobile */
        margin-right: -10px; /* Pull count closer */
        stroke-width: 1; /* Make cart icon thinner */
    }
    .hamburger-menu span {
        height: 1px; /* Make hamburger lines thinner */
    }
    .cart-count {
        font-size: 18px; /* Increase size for alignment */
        line-height: 1; /* Adjust line height for alignment */
        position: relative;
        top: 1px; /* Nudge down by 1px */
    }
    .language-selector .current-language {
        font-size: 18px; /* Match cart count size */
        position: relative;
        top: 1px; /* Nudge down by 1px */
    }
    .cart-count,
    .language-selector .current-language {
        font-weight: 300; /* Use newly available light weight */
    }
    .header-extra {
        display: flex; /* Keep header-extra as flex */
        align-items: center; /* Revert to center */
        gap: 0; /* Spacing between hamburger, cart, language */
        z-index: 101; /* Keep on top of open nav */
    }
    .logo {
        z-index: 101; /* Keep on top of open nav */
    }
    .language-selector {
        margin-left: -5px; /* Pull closer to cart */
    }
    .user-icon-link {
        margin-left: 5px; /* Spazio ridotto dal carrello a 5px */
        position: relative;
        top: 1px; /* Allineamento ottico */
    }
    /* Styles for the open mobile nav (keep these) */
    header nav.is-open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--color-base-white); /* Revert to white */
        flex-direction: column;
        justify-content: flex-start; /* Align content to the top */
        padding-top: 100px; /* Push content down below header */
        align-items: center;
        z-index: 100;
    }

    header nav.is-open ul {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    header nav.is-open ul a {
        font-size: 28px;
        font-family: var(--font-primary);
    }

    header nav.is-open ul a {
        font-size: 28px;
        font-family: var(--font-primary);
    }

    /* Chi Siamo Mobile Layout */
    .chi-siamo-section {
        padding-top: 0px; /* Reduced padding-top for mobile */
    }
    .mobile-spacer {
        display: block;
        height: 20px;
    }
    .chi-siamo-intro {
        margin-bottom: 60px;
    }
    .chi-siamo-intro h1 {
        font-size: 42px;
        margin-bottom: 40px; /* Increased space below title */
    }
    .chi-siamo-intro .subtitle {
        font-size: 18px;
        width: 90%; /* 90% width */
        margin: 0 auto; /* Center it */
    }
    .content-block h2 {
        font-size: 29px; /* Reduced by 20% for mobile */
    }
    .content-block p {
        text-align: left; /* Revert to left align on mobile */
        width: 80%; /* 80% width */
        margin: 0 auto; /* Center it */
        padding-right: 20px; /* Indent paragraphs on mobile */
    }

    /* Collections Teaser Mobile Layout */
    .collections-teaser .collection-item {
        display: flex;
        flex-direction: column;
        gap: 30px;
        margin-bottom: 60px;
    }

    .collections-teaser img {
        width: 100%;
        height: 250px; /* Same fixed height as desktop cards? No, wait, on desktop it was 450px. Let's make it consistent. */
        object-fit: cover;
        border-radius: 4px;
    }

    /* Reset desktop alternating layout - Collezione Notte (2Â° item) a destra su mobile */
    .collections-teaser .collection-item:nth-child(even) {
        direction: ltr;
    }
    
    .collections-teaser .collection-item:nth-child(even) .collection-content {
        text-align: right;
        padding: 0;
    }

    .collections-teaser .collection-item:nth-child(even) .collection-content h2 {
        text-align: right;
    }

    .collections-teaser .collection-item:nth-child(even) .collection-content .btn {
        margin-left: auto;
    }

    .collection-content h2 {
        font-size: 32px;
        margin-bottom: 15px;
    }
}

body.no-scroll {
    overflow: hidden;
}

/* --- Language Selector --- */
.language-selector {
    position: relative;
}

.language-selector-button {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--color-base-black); /* Ensure text and arrow are black */
}

.icon-chevron-down {
    transition: transform 0.2s ease-in-out;
}

.language-selector.is-active .icon-chevron-down {
    transform: rotate(180deg);
}

.language-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--color-base-white);
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 5px;
    min-width: 100px;
    z-index: 999; /* Higher than other header elements */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.language-selector.is-active .language-dropdown {
    display: block; /* Shown when active */
}

.language-dropdown a {
    display: block;
    padding: 8px 12px;
    text-align: center;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.language-dropdown a:hover {
    background-color: var(--color-base-offwhite);
}

.language-dropdown a[data-lang="IT"] {
    /* Style for current language, can be changed */
    font-weight: 500;
}

    /* --- Spacing adjustments --- */
    .collections-teaser {
        padding-bottom: 0px;
    }
.craftsmanship {
    padding-top: 40px; /* Reduced spacing */
}

/* --- Featured Products Slider (Mobile) --- */
.slider-wrapper {
    position: relative;
}

.slider-controls {
    display: none; /* Hide controls by default */
}

/* --- Featured Products Slider (Mobile) --- */
@media screen and (max-width: 768px) {
    .slider-wrapper {
        position: relative;
    }

    .slider-controls {
        display: block;
        position: absolute;
        top: 50%;
        width: 100%;
        display: flex;
        justify-content: space-between;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .slider-controls button {
        pointer-events: all;
        background-color: rgba(255, 255, 255, 0.7);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    .slider-controls .prev-slide {
        margin-left: -15px;
    }

    .slider-controls .next-slide {
        margin-right: -15px;
    }

    .featured-product-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }

    .featured-product-grid::-webkit-scrollbar {
        display: none;
    }
    
    .featured-product-grid::before,
    .featured-product-grid::after {
        content: '';
        flex: 0 0 10%;
    }

    .featured-product-grid .featured-product-card {
        flex: 0 0 80%;
        scroll-snap-align: center;
    }
}

.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* --- Pagina Manifesto --- */
.manifesto-section {
    padding-top: 10px;
    padding-bottom: 80px;
}

.manifesto-intro {
    text-align: center;
    margin-bottom: 60px;
}

.manifesto-intro h1 {
    font-family: var(--font-primary);
    font-size: 52px;
    margin-bottom: 25px;
}

.manifesto-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

.manifesto-content p {
    margin-bottom: 20px;
}

.manifesto-content h2 {
    font-family: var(--font-primary);
    font-size: 32px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

    @media screen and (max-width: 768px) {
        .manifesto-intro h1 {
            font-size: 42px;
        }
    }

/* --- Footer Styles --- */
.site-footer {
    background-color: var(--color-accent-light); /* Sfondo chiaro */
    padding: 80px 0 40px;
    border-top: 1px solid #e5e5e5;
    margin-top: 0; /* Rimuovo margine se c'era */
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; /* 4 colonne: Brand e Newsletter piÃ¹ larghe */
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-family: var(--font-primary);
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-col h4 {
    font-family: var(--font-primary);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 300px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--color-accent-dark);
}

/* Newsletter Form */
.footer-newsletter-form .input-group {
    display: flex;
    gap: 10px;
}

.footer-newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    font-family: var(--font-secondary);
}

.footer-newsletter-form .btn-small {
    padding: 10px 20px;
    background-color: var(--color-base-black);
    color: var(--color-base-white);
    border: 1px solid var(--color-base-black);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer-newsletter-form .btn-small:hover {
    background-color: transparent;
    color: var(--color-base-black);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    font-size: 14px;
    text-decoration: underline;
    color: var(--color-base-black);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--color-base-black);
    color: var(--color-base-black);
    font-size: 12px;
}

.footer-bottom p {
    margin-bottom: 2px;
    max-width: 100%; /* Ensure it can take full width */
    word-wrap: break-word; /* Prevent overflow */
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

/* Footer Responsive */
@media screen and (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr; /* 2 colonne su tablet */
        gap: 40px 20px;
    }
}

@media screen and (max-width: 600px) {
    .site-footer {
        padding: 60px 0 30px;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 50px;
    }

    .footer-col {
        text-align: center;
    }
    
    .footer-col p {
        margin: 0 auto 20px; /* Centra il testo */
    }

    .footer-newsletter-form .input-group {
        flex-direction: column;
    }
    
    .footer-newsletter-form input[type="email"] {
        width: 100%;
        text-align: center;
    }

    .footer-newsletter-form .btn-small {
        width: 100%;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ==========================================================
   MOBILE-ONLY OVERRIDES
   These rules are appended at the end to ensure they only affect mobile
   without breaking the desktop structure above.
   ========================================================== */

.gallery-mobile-slider {
    display: none; /* Default hidden on desktop */
}

@media screen and (max-width: 768px) {
    /* 1. LAYOUT PRODOTTO MOBILE */
    .product-detail .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* 2. GALLERIA SLIDER MOBILE */
    .gallery-desktop {
        display: none;
    }

    .gallery-mobile-slider {
        display: block;
        width: calc(100% + 40px); /* Full width (+ compensation for padding) */
        margin-left: -20px;
        margin-right: -20px;
        position: relative;
    }

    .mobile-slider-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mobile-slider-track::-webkit-scrollbar {
        display: none;
    }

    .mobile-slider-item {
        flex: 0 0 100%;
        scroll-snap-align: center;
    }

    .mobile-slider-item img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        display: block;
    }

    .slider-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 15px 0;
    }

    .slider-dots .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: #ddd;
        transition: background-color 0.3s ease;
    }

    .slider-dots .dot.active {
        background-color: var(--color-accent-dark);
    }

    /* La barra tab esce dai 20px di padding e diventa full-bleed */
    .product-detail .product-tabs {
        width: calc(100% + 40px); /* Forza la larghezza oltre il padding */
        margin-left: -20px;
        margin-right: -20px;
        border-top: 1px solid #ddd;
    }

    .product-detail .tabs-nav {
        display: flex;
        width: 100%;
        border-bottom: 1px solid #ddd;
        gap: 0;
        box-sizing: border-box;
    }

    .product-detail .tabs-nav a {
        font-size: clamp(9px, 3.2vw, 12px); /* Dynamic scaling */
        padding: 15px 2px;
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    /* 4. UTILITY MOBILE */
    .product-detail .product-info h1 {
        font-size: 32px;
    }

    .product-detail .product-info .subtitle {
        font-size: 22px;
    }

    .product-detail .product-info .btn-primary {
        width: 100%;
        max-width: 90%;
        margin: 0 auto 40px; /* Aumentato margine inferiore a 40px */
        display: block;
    }

    .technical-details-content {
        grid-template-columns: 1fr;
    }

    .product-showcase-gallery .gallery-grid {
        grid-template-columns: 1fr 1fr; /* 2 Colonne su mobile */
        grid-template-rows: repeat(2, 180px); /* Righe piÃ¹ basse rispetto al desktop */
        gap: 15px;
    }
    
    /* Replica il layout asimmetrico desktop su 2 colonne */
    /* Img 1: Alto Sinistra */
    .product-showcase-gallery .gallery-grid img:nth-child(1) {
        grid-column: 1 / 2 !important; 
        grid-row: 1 / 2 !important;
        height: 100%;
        object-fit: cover;
    }

    /* Img 2: Colonna Destra, Doppia Altezza (come desktop) */
    .product-showcase-gallery .gallery-grid img:nth-child(2) {
        grid-column: 2 / 3 !important;
        grid-row: 1 / 3 !important;
        height: 100%;
        object-fit: cover;
    }

    /* Le altre immagini si dispongono automaticamente (Img 3 andrÃ  sotto la 1) */
    .product-showcase-gallery .gallery-grid img {
        height: 100%;
        object-fit: cover;
        /* Rimuovi l'aspect-ratio fisso per permettere al grid di decidere */
        aspect-ratio: auto; 
    }
}

/* Order Detail Page Styles - Modern Restyle */
.order-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.order-table th {
    background-color: #f9f9f9;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: #888;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.order-table td {
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
    color: #333;
    font-size: 15px;
}

.order-table tbody tr:last-child td {
    border-bottom: none;
}

.order-table tfoot {
    background-color: #fafafa;
    border-top: 1px solid #eee;
}

.order-table tfoot td {
    padding: 8px 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #555;
    text-align: right;
}

.order-table tfoot tr:last-child td {
    border-bottom: none;
    font-size: 18px;
    color: #000;
    padding-top: 15px;
    padding-bottom: 15px;
    background-color: #fff;
    border-top: 2px solid #eee;
}

/* Product Info inside table */
.line-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.line-item-info img {
    border-radius: 4px;
    border: 1px solid #eee;
    object-fit: cover;
    width: 60px;
    height: 60px;
}

.product-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
}

.variant-title {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* Sidebar Blocks */
.order-sidebar .order-block {
    background: #fff;
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.order-sidebar h3 {
    margin-top: 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-sidebar p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Addresses Page Styles */
.addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.address-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.3s ease;
}

.address-card--default {
    /* Rimosso bordo e ombra speciale, rimane solo il badge */
}

.address-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #eee;
    color: #666;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.address-card--default .badge {
    background: #666;
    color: #fff;
}

.address-details {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.address-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    border-top: 1px solid #f5f5f5;
    padding-top: 15px;
}

.address-actions .btn {
    flex: 1;
    font-size: 13px;
    padding: 8px 10px;
    text-align: center;
}

.address-actions .btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.address-actions .btn-outline:hover {
    border-color: #999;
    color: #333;
}

.add-new-address {
    text-align: center;
    margin-bottom: 40px;
}

.address-form-container {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 20px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Reordering Form Fields */
.address-form-fields {
    display: flex;
    flex-direction: column;
}

.form-grid-name { order: 1; }
.form-group-company { order: 2; }
.form-group-address2 { order: 3; }
.form-group-address1 { order: 4; }
.form-grid-city-zip { order: 5; } 
.form-group-country { order: 6; }
.form-group-province { order: 7; }
.form-group-default { order: 9; }

/* Business Order: Company (1), VAT (2), Name (3) */
.address-form-fields.is-business .form-group-company { order: 1; }
.address-form-fields.is-business .form-group-address2 { order: 2; }
.address-form-fields.is-business .form-grid-name { order: 3; }

/* Form Styles in Modal */
.address-modal-inner input[type="text"],
.address-modal-inner input[type="email"],
.address-modal-inner input[type="tel"],
.address-modal-inner select {
    width: 100%;
    padding: 10px 13px; /* Reduced from 12px 15px */
    margin-bottom: 5px; 
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px; /* Reduced from 15px */
    color: #333;
    background-color: #fcfcfc;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.address-modal-inner input:focus,
.address-modal-inner select:focus {
    border-color: var(--color-accent);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05); /* Focus ring delicato */
}

.address-modal-inner label {
    display: block;
    margin-bottom: 2px; /* Reduced from 5px */
    font-size: 12px; /* Reduced from 13px */
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-modal-inner .form-group {
    margin-bottom: 10px; /* Reduced from 18px */
}

.address-modal-inner .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px; /* Reduced from 20px */
}

.address-modal-inner .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.address-modal-inner .form-actions button {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.address-modal-inner .btn-primary {
    background-color: #000;
    color: #fff;
    border: none;
}

.address-modal-inner .btn-primary:hover {
    background-color: #333;
}

.address-modal-inner .btn-secondary {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #555;
}

.address-modal-inner .btn-secondary:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Checkbox style */
.address-modal-inner .checkbox-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-top: 15px;
    gap: 10px;
    width: 100%;
}

.address-modal-inner .checkbox-group label {
    margin-bottom: 0 !important;
    width: auto !important;
    text-transform: none;
    font-weight: normal;
    font-size: 14px;
    cursor: pointer;
    display: inline-block !important;
}

.address-modal-inner input[type="checkbox"] {
    margin: 0 !important;
    width: auto !important;
    transform: scale(1.2);
    cursor: pointer;
    display: inline-block !important;
}

/* Modal Styles */
body.modal-open {
    overflow: hidden; /* Blocca lo scroll della pagina */
}

.address-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Nero 80% */
    z-index: 9999;
    display: none; /* Gestito via JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(2px); /* Effetto sfocato extra opzionale */
}

.address-modal-inner {
    background: #fff;
    width: 100%;
    max-width: 540px; /* Reduced from 600px */
    padding: 20px; /* Reduced from 27px */
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto; /* Scroll interno se il form è lungo */
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    text-align: left; /* Reset allineamento */
    font-size: 0.95em; /* General font reduction */
}

.close-modal-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.close-modal-x:hover {
    color: #333;
}

@media screen and (max-width: 768px) {
    .order-grid {
        grid-template-columns: 1fr;
    }
    
    .order-table th {
        display: none;
    }
    
    .order-table td {
        display: block;
        text-align: right;
        padding: 10px 20px;
        border: none;
    }
    
    .order-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 11px;
        color: #999;
    }
    
    .order-table tr {
        display: block;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .line-item-info {
        justify-content: flex-end;
    }
}
 
`body.modal-open { overflow: hidden !important; height: 100vh !important; }
html.modal-open, body.modal-open { overflow: hidden !important; height: 100vh !important; touch-action: none; }
