/* ==========================================
   ViaRoma9 — Modern Minimalist Design System
   ========================================== */

/* Reset & Box Sizing */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #F0EEE9;
    --bg-card: #ffffff;
    --bg-subtle: #f4f3ef;
    --text-primary: #1c1c1c;
    --text-secondary: #666666;
    --text-muted: #8e8e8e;
    --border-color: #e8e6e1;
    --border-hover: #d1cece;
    --accent-dark: #111111;
    --accent-hover: #333333;
    
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Typography Scale */
    --fs-hero: clamp(2.2rem, 4.5vw, 3.4rem);
    --fs-h1: clamp(1.6rem, 2.5vw, 2.1rem);
    --fs-h2: clamp(1.3rem, 2vw, 1.6rem);
    --fs-h3: 1.05rem;
    --fs-body: 1rem;             /* Impostato a 16px */
    --fs-subtext: 0.85rem;
    --fs-caption: 0.75rem;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.65;
    letter-spacing: -0.01em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

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

/* Accessibility Focus States */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent-dark);
    outline-offset: 4px;
}

/* ==========================================
   Header & Navigation
   ========================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 7vw;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(240, 238, 233, 0.92);
}

.logo a {
    display: inline-block;
    transition: opacity 0.25s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 48px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--fs-subtext);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
    transition: color 0.25s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--accent-dark);
    transition: width 0.25s ease;
}

nav a:hover, nav a.active {
    color: var(--accent-dark);
    font-weight: 500;
}

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

.cart {
    font-size: var(--fs-subtext);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--accent-dark);
}

.cart a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.25s ease;
}

.cart a:hover {
    opacity: 0.6;
}

/* ==========================================
   Hero Section (Homepage — Full Screen Viewport)
   ========================================== */
.hero {
    min-height: calc(100vh - 139px);
    min-height: calc(100dvh - 139px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    background-color: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 40px;
    font-weight: 300;
    color: var(--accent-dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    background-color: var(--accent-dark);
    color: #ffffff;
    padding: 14px 36px;
    border: 1px solid var(--accent-dark);
    border-radius: 0px;
    font-family: var(--font-family);
    font-size: var(--fs-caption);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
    background-color: transparent;
    color: var(--accent-dark);
}

/* ==========================================
   Products & Collections Section
   ========================================== */
.products-section {
    max-width: 1240px;
    margin: 80px auto;
    padding: 0 5vw;
    flex: 1;
    width: 100%;
}

.section-title {
    margin-bottom: 50px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-title h1,
.section-title h2 {
    font-size: var(--fs-h1);
    font-weight: 400;
    color: var(--accent-dark);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.section-title span {
    font-size: var(--fs-subtext);
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Modern Minimalist Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
}

/* Product Card Image Wrapper */
.product-img {
    width: 100%;
    height: 180px;
    background-color: var(--bg-subtle);
    border-radius: 0px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.product-card:hover .product-img {
    background-color: #efece6;
}

.product-img img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

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

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-info h3 {
    font-size: var(--fs-h3);
    font-weight: 500;
    color: var(--accent-dark);
    letter-spacing: -0.01em;
}

/* Forzatura dimensione descrizione nelle pagine prodotto a 16px */
.product-description,
.product-description p,
.product-single-description,
.product-info p {
    font-size: 16px !important;
    line-height: 1.65 !important;
    font-weight: 300;
    color: var(--text-secondary);
}

.product-info .price {
    font-size: var(--fs-subtext);
    font-weight: 400;
    color: var(--accent-dark);
    line-height: 1.4;
    margin-top: 4px;
}

/* ==========================================
   SEO Content Block
   ========================================== */
.seo-text-section {
    max-width: 1240px;
    margin: 60px auto 80px auto;
    padding: 40px 48px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0px;
}

.seo-text-section h2 {
    font-size: var(--fs-h2);
    font-weight: 400;
    color: var(--accent-dark);
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.seo-text-section p {
    font-size: 16px;            /* Impostato a 16px */
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.75;
}

.seo-text-section strong {
    font-weight: 500;
    color: var(--accent-dark);
}

.seo-text-section em {
    font-style: normal;
    color: var(--accent-dark);
    border-bottom: 1px dotted var(--text-muted);
}

/* ==========================================
   Footer
   ========================================== */
footer {
    text-align: center;
    padding: 48px 24px;
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    font-size: var(--fs-caption);
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: auto;
}

/* ==========================================
   Responsive Design & Breakpoints
   ========================================== */
@media (max-width: 868px) {
    header {
        padding: 18px 20px;
        flex-direction: column;
        gap: 16px;
    }
    
    nav {
        gap: 24px;
    }
    
    .hero {
        min-height: calc(100vh - 160px);
        min-height: calc(100dvh - 160px);
        padding: 50px 20px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }
    
    .products-section {
        padding: 0 20px;
        margin: 40px auto;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }

    .product-card {
        padding: 16px;
    }

    .product-img {
        height: 150px;
        margin-bottom: 12px;
    }

    .product-img img {
        width: 90px;
        height: 90px;
    }

    .seo-text-section {
        padding: 24px;
        margin: 20px 20px 40px 20px;
    }
}