/**
 * Marinozzi Booking System - CSS CORRETTO
 * Fix: Card dimensioni, responsive, layout
 */

/* ========================================
   VARIABILI CSS
   ======================================== */
:root {
    /* Colori */
    --color-primary: #C1272D;
    --color-primary-dark: #9B1F23;
    --color-primary-light: #E63946;
    
    --color-secondary: #223542;
    --color-secondary-dark: #1E3610;
    --color-secondary-light: #3A6B1E;
    
    /* --color-accent: #D4AF37; */
    --color-accent: #235A82;
    --color-accent-light: #F4E5D3;
    
    --color-bg: #fff1dc; /*fafafa*/
    --color-bg-alt: #F5F5F5;
    --color-surface: #FFFFFF;
    
    --color-text: #1A1A1A;
    --color-text-secondary: #666666;
    --color-text-light: #999999;
    
    --color-border: #E0E0E0;
    --color-border-light: #F0F0F0;
    
    --color-success: #2D5016;
    --color-error: #C1272D;
    --color-warning: #F59E0B;
    --color-info: #3B82F6;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--color-surface);
    padding: var(--space-xl) 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    position: relative;
    z-index: 1;
}

.logo h1 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-top: var(--space-xs);
    font-weight: 400;
}

.header-info {
    text-align: right;
}

.header-info p {
    margin: var(--space-xs) 0;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ========================================
   HERO SECTION
   ======================================== */
/* .hero {
    background: linear-gradient(to right, #16222a, #3a6073);
    padding: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
} */
 .hero {
    background: 
        linear-gradient(rgba(0, 20, 40, 0.8), rgba(0, 20, 40, 0.8)),
        url('/assets/images/hero-bg-4.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* .hero::before {
    content: '❄️';
    position: absolute;
    top: 10%;
    left: 10%;
    font-size: 80px;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
} */

/* .hero::after {
    content: '🎄';
    position: absolute;
    bottom: 10%;
    right: 10%;
    font-size: 80px;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite reverse;
} */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero h2 {
    font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-4xl));
    font-weight: 800;
    margin-bottom: var(--space-lg);
    color: white;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: clamp(var(--font-size-base), 2vw, var(--font-size-xl));
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto var(--space-xl) auto;
    color: white;
    position: relative;
    z-index: 1;
}

/* ========================================
   ANCORE NAVIGAZIONE (NUOVO)
   ======================================== */
/* .category-navigation {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    margin-top: var(--space-xl);
} */

.nav-anchor {
        background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 5px 20px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    /* padding: var(--space-md) var(--space-xl); */
    /* background: var(--color-surface); */
    /* color: var(--color-text); */
    text-decoration: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.nav-anchor:hover {

    box-shadow: var(--shadow-lg);
     background: rgba(255, 255, 255, 0.2);
    border-color: #FFD700;
    transform: translateY(-2px);
    /*background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-surface) 100%);*/
}

.nav-anchor:active {
    transform: translateY(-1px);
}

/* ========================================
   MAIN CONTENT GRID
   ======================================== */
.main-content {
    padding: var(--space-2xl) 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-2xl);
    align-items: start;
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products-section {
    flex: 1;
}

.category-section {
    margin-bottom: var(--space-3xl);
    scroll-margin-top: 100px;
}

.category-title {
    /* font-size: var(--font-size-2xl); */
    font-size: 2rem;
    font-weight: 700;
    /* color: var(--color-primary); */
    color: #3a6073;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 3px solid #3a6073;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.category-note {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFEAA7 100%);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-sm);
    border-left: 4px solid var(--color-warning);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   PRODUCTS GRID - CORRETTO
   ======================================== */
.products-grid {
    display: grid;
    /* ✅ FIX: Limito larghezza massima card a 320px */
    grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
    gap: var(--space-lg);
    justify-content: start;
}

.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    /* ✅ FIX: Altezza uniforme */
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: #3a6073;
}

.product-image {
    width: 100%;
    /* ✅ FIX: Altezza ridotta */
    height: 240px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

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

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

.placeholder-image {
    font-size: 70px;
    opacity: 0.3;
}

.product-info {
    /* ✅ FIX: Padding ridotto */
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    /* ✅ FIX: Font size ridotto */
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.product-description {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.4;
    flex: 1;
    /* ✅ FIX: Limito righe descrizione */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {

    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.product-price.price-range {
    color: var(--color-secondary);
    font-size: var(--font-size-xl);
}

.deadline-badge {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: var(--color-error);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* ========================================
   PRODUCT VARIANTS
   ======================================== */
.product-variants {
    /*margin: var(--space-md) 0;*/
    margin: 0;
}

.variant-group {
    margin-bottom: var(--space-sm);
}

.variant-group label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.variant-select {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.variant-select:hover {
    border-color: var(--color-accent);
}

.variant-select:focus {
    outline: none;
    border-color: var(--color-accent);
    /*box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.1);*/
}

/* ========================================
   PRODUCT ACTIONS - CORRETTO
   ======================================== */
.product-actions {
    margin-top: var(--space-md);
    display: flex;
    /*flex-direction: column;*/
    gap: var(--space-sm);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    padding: var(--space-xs);
    justify-content: center;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    box-shadow: var(--shadow-xs);
}

.qty-btn:hover {
    background: var(--color-accent-light);
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 45px;
    height: 32px;
    text-align: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

.quantity-input:focus {
    outline: none;
    background: var(--color-surface);
}

.btn-add-cart {
    /* ✅ FIX: Ora occupa tutta la larghezza */
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    /*background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);*/
    background-color: #235a82;
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   CART SIDEBAR
   ======================================== */
.cart-sidebar {
    position: sticky;
    top: 4rem;
    transition: transform var(--transition-base);
}

.cart-container {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
}

.cart-close-mobile {
    display: none;
}

.cart-header {
    /* background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%); */
    background-color: #223542;
    color: var(--color-surface);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-count {
    background: var(--color-surface);
    color: var(--color-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-md);
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

.cart-empty {
    text-align: center;
    color: var(--color-text-secondary);
    padding: var(--space-2xl) var(--space-md);
    font-size: var(--font-size-sm);
}

.cart-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition-fast);
}

.cart-item:hover {
    background: var(--color-bg-alt);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info h4 {
    font-size: var(--font-size-sm);
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-text);
    font-weight: 600;
}

.cart-item-variants {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin: 0;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
    gap: var(--space-sm);
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    padding: var(--space-xs);
}

.cart-qty-minus,
.cart-qty-plus {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.cart-qty-minus:hover,
.cart-qty-plus:hover {
    background: var(--color-accent-light);
    transform: scale(1.05);
}

.cart-qty {
    min-width: 25px;
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-secondary);
    font-size: var(--font-size-sm);
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    background: var(--color-error);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
}

.cart-item-remove:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

.cart-total {
    padding: var(--space-lg);
    border-top: 2px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-lg);
    background: var(--color-bg-alt);
}

.cart-total strong {
    color: var(--color-text);
    font-weight: 700;
}

#cart-total-amount {
    color: var(--color-secondary);
    font-weight: 800;
    font-size: var(--font-size-xl);
}

.btn-checkout {
    width: 100%;
    padding: var(--space-lg);
    /* background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%); */
        /* background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%); */
        background-color: #235a82;
    color: white;
    border: none;
    font-size: var(--font-size-base);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-checkout:active {
    transform: translateY(0);
}

.btn-checkout:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   MOBILE CART CONTROLS
   ======================================== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-cart-toggle {
    display: none;
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 64px;
    height: 64px;
    /*background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);*/
    background-color: #D4AF37;
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.mobile-cart-toggle:active {
    transform: scale(0.95);
}

.mobile-cart-toggle .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-primary);;
    color: var(--color-accent-light);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-2xl);
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-xl);
}

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

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-lg);
    font-size: var(--font-size-2xl);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

.modal-content h2 {
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-2xl);
    font-weight: 800;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: all var(--transition-base);
    background: var(--color-surface);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.1);
}

.form-group small {
    display: block;
    margin-top: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-errors {
    background: linear-gradient(135deg, #FFF5F5 0%, #FED7D7 100%);
    color: var(--color-error);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    display: none;
    border-left: 4px solid var(--color-error);
    font-size: var(--font-size-sm);
}

.form-errors.show {
    display: block;
}

.btn-submit {
    width: 100%;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-md);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    color: var(--color-surface);
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    margin-top: var(--space-3xl);
}

.footer p {
    margin: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 400px;
        height: 100vh;
        z-index: var(--z-modal);
        transform: translateX(100%);
    }
    
    .cart-sidebar.cart-open {
        transform: translateX(0);
    }
    
    .cart-container {
        height: 90%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .cart-items {
        flex: 1;
        max-height: none;
    }
    
    .cart-close-mobile {
        display: block;
        position: absolute;
        top: var(--space-md);
        right: var(--space-md);
        width: 36px;
        height: 36px;
        /* background: rgba(255, 255, 255, 0.1); */
        background: var(--color-accent);
        color: var(--color-surface);
        border: none;
        border-radius: var(--radius-sm);
        font-size: var(--font-size-xl);
        cursor: pointer;
        z-index: 10;
        transition: all var(--transition-fast);
    }
    
    .cart-close-mobile:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .mobile-cart-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 2.5rem;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .hero h2 {
        font-size: var(--font-size-2xl);
    }
    
    .hero p {
        font-size: var(--font-size-base);
    }
    
    .category-navigation {
        gap: 5px !important;
    }
    
    .nav-anchor {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-xs);
    }
    
    .category-title {
        font-size: var(--font-size-xl);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: var(--space-md);
    }
    
    .cart-sidebar {
        width: 100%;
        max-width: 400px;
    }
    
    .modal-content {
        padding: var(--space-xl);
        max-width: 100%;
    }
    
    .modal.show {
        padding: var(--space-md);
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-cart-toggle {
        width: 56px;
        height: 56px;
        bottom: var(--space-lg);
        right: var(--space-lg);
    }
    
    .cart-sidebar {
        max-width: 100%;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

@media print {
    .cart-sidebar,
    .mobile-cart-toggle,
    .mobile-overlay,
    .btn-add-cart,
    .quantity-control {
        display: none !important;
    }
}

   /* Data Ritiro nel Carrello */
      .cart-pickup-date-section {
            background: var(--color-accent);
            /* border: 2px solid #3a6073; */
            border-radius: 8px;
            padding: 10px 15px;
            margin: 10px 0;
            max-width: 400px;
        }
        .cart-pickup-label {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            color: white;
            font-size: 14px;
        }
        .pickup-icon {
            font-size: 18px;
        }
        .cart-pickup-date-display {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        #displayPickupDate {
            font-weight: 600;
            color: white;
            font-size: 15px;
            flex: 1;
        }
        .btn-change-date {
            background: white;
            color: white;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }
        .btn-change-date:hover {
            background: #1a7a42;
            transform: scale(1.1);
        }
        
        /* Modale cambio data */
      .change-date-modal {
        max-width: 400px;
            margin-top: 15px;
            padding: 15px;
            background: white;
            border-radius: 5px;
            border: 1px solid #ddd;
        }
        .change-date-content label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #333;
            font-size: 13px;
        }
        .change-date-content input[type="date"] {
            width: 100%;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            margin-bottom: 10px;
        }
        .change-date-actions {
            display: flex;
            gap: 10px;
        }
        .btn-confirm-date,
        .btn-cancel-date {
            flex: 1;
            padding: 8px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s;
        }
        .btn-confirm-date {
            background: #165B33;
            color: white;
        }
        .btn-confirm-date:hover {
            background: #1a7a42;
        }
        .btn-cancel-date {
            background: #dc3545;
            color: white;
        }
        .btn-cancel-date:hover {
            background: #c82333;
        }
        
        /* Warning prodotti non disponibili */
        .cart-warning {
            background: #fff3cd;
            border: 2px solid #ffc107;
            border-radius: 5px;
            padding: 12px;
            margin: 15px 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .warning-icon {
            font-size: 20px;
        }
        .warning-text {
            font-size: 13px;
            color: #856404;
            font-weight: 600;
        }
        
        /* Item non disponibile nel carrello */
        .cart-item.unavailable {
            border: 2px solid #dc3545;
            background: #f8d7da;
            opacity: 0.8;
            position: relative;
        }
        .cart-item.unavailable::after {
            content: '⚠️ Non disponibile';
            position: absolute;
            top: 10px;
            right: 10px;
            background: #dc3545;
            color: white;
            padding: 3px 8px;
            border-radius: 3px;
            font-size: 11px;
            font-weight: 600;
        }
        
        /* Prodotto non disponibile nella card */
       .product-card[data-available="false"] {
            opacity: 0.7;
            position: relative;
        }
        .product-card[data-available="false"]::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.5);
            z-index: 1;
            pointer-events: none;
            border-radius: 8px;
        }
        .product-unavailable {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 15px;
            background: #f8d7da;
            border: 2px solid #dc3545;
            border-radius: 8px;
            text-align: center;
            position: relative;
            z-index: 2;
        }
        .unavailable-icon {
            font-size: 24px;
        }
        .unavailable-text {
            font-weight: 600;
            color: #721c24;
            font-size: 14px;
        }
        .product-card[data-available="false"] .quantity-control,
        .product-card[data-available="false"] .btn-add-cart {
            display: none;
        }

        /* Sticky */

        /* Menu navigazione categorie fisso */
.category-navigation {
    position: sticky;
    top: 0;
    z-index: 999;
    margin-top: -1px;
    /* background: linear-gradient(135deg, #165B33 0%, #1a7a42 100%); */
    /* background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%); */
    background-color: #223542;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}






@media (max-width: 768px) {
    .category-navigation {
        padding: 10px 5px;
    }
    
    .nav-anchor {
        font-size: 13px;
        /* padding: 8px 15px; */
        padding: 5px 8px;
    }
}