/* static/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Lato:wght@300;400;700&family=Italianno&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

/* === VARIABILI CSS E STILI GENERALI === */
:root {
    --color-background-nav: #F3EADC;
    --color-background-body: #FFFFFF;
    --color-text: #2c2c2c;
    --color-primary: #8C5B3F;
    --color-overlay: rgba(0, 0, 0, 0.2);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', 'Lato', sans-serif;
    --font-script: 'Italianno', cursive;
    --nav-height-mobile: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background-body);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
}

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

section {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}


/* === FINAL REVISED HEADER & NAVIGATION === */
.main-header {
    position: relative;
    width: 100%;
    background-color: var(--color-background-nav);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px 40px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: padding 0.3s ease;
}

.header-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.header-logo-image-link {
    display: block;
}

.logo {
    height: 50px;
    display: block;
}

.header-logo-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-text);
}

.main-nav-desktop {
    display: block;
}

.main-nav-desktop ul {
    list-style: none;
    display: flex;
    gap: 50px;
}

.main-nav-desktop a {
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.main-nav-desktop a:hover,
.main-nav-desktop a.active {
    color: var(--color-primary);
}

/* --- Mobile Navigation & Dropdown --- */
.hamburger-menu {
    display: none;
    width: 30px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    z-index: 1002;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease-in-out;
    border-radius: 1px;
}

.main-nav-mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-background-nav);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.main-nav-mobile-dropdown ul {
    list-style: none;
    padding: 10px 0;
}

.main-nav-mobile-dropdown li a {
    display: block;
    padding: 15px 40px;
    text-align: center;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
}

.main-nav-mobile-dropdown li a:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* --- Active state for mobile menu --- */
body.mobile-nav-active .main-nav-mobile-dropdown {
    display: block;
}

body.mobile-nav-active .hamburger-menu span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

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

body.mobile-nav-active .hamburger-menu span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}


/* === ALL OTHER STYLES (UNCHANGED) === */
.hero-section {
    height: auto;
    min-height: 500px;
    padding: 80px 20px;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    /* Use the provided hero photo; crop to hide the bottom-right mark */
    background-image: url('../images/hero.png');
    background-repeat: no-repeat;
    background-size: 115% auto;
    /* slight zoom to push bottom-right out of frame */
    background-position: left top;
    /* anchor top-left so bottom-right is cropped */
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-overlay);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: #fff;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-button {
    background-color: #fff;
    color: var(--color-primary);
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hero-button:hover {
    transform: scale(1.05);
}

/* === LEGNO PREGIATO SECTION === */
.legno-section {
    position: relative;
    padding: 120px 20px;
    color: #fff;
    text-align: center;
    background: url('../images/legno_section_bg.jpg') no-repeat center center/cover;
    width: 100%;
    max-width: none;
    margin: 0;
}

.legno-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-overlay);
}

.legno-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(to bottom, var(--color-background-nav) 0%, transparent 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    z-index: 2;
    pointer-events: none;
}

.legno-section .section-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.legno-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
}

.legno-section p {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 25px;
    color: #fff;
}

.preview-section h2,
.materials-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.preview-item {
    border: 1px solid #EAEAEA;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    background-color: #fff;
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.preview-item .image-placeholder {
    height: 250px;
    background-color: #EAEAEA;
}

.preview-item .item-info {
    padding: 25px;
}

.preview-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.preview-item p {
    font-weight: 300;
}

.materials-section {
    background-color: #fff;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.material-card .image-placeholder {
    width: 100%;
    height: 280px;
    background-color: #EAEAEA;
    margin-bottom: 20px;
}

.material-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.material-card p {
    max-width: 300px;
    margin: 0 auto;
}

.main-footer {
    background-color: #222;
    color: #fff;
    padding: 60px 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-container .footer-column:last-child {
    text-align: right;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-column p,
.footer-column a {
    color: #ccc;
    font-weight: 300;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a:hover {
    color: #fff;
}

.social-icons {
    display: inline-flex;
    gap: 15px;
    margin-top: 10px;
    justify-content: flex-end;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.social-icons a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.footer-signature {
    text-align: center;
    font-style: italic;
    color: #fff;
    margin-top: 30px;
    font-family: var(--font-script);
    font-size: 2rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
}


/* === ENHANCED MODAL STYLING === */
/* ADDED THIS RULE for the background color */
.modal {
    background-color: var(--color-background-nav);
}

.modal .modal-content h4 {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 30px;
}

/* Style the modal login button with our primary color */
.modal .btn {
    background-color: var(--color-primary);
}

.modal .btn:hover {
    background-color: #7a4f37;
    /* A slightly darker shade for hover */
}

/* Style the focus color for text inputs in the modal */
.modal .input-field input[type=text]:focus+label,
.modal .input-field input[type=email]:focus+label,
.modal .input-field input[type=password]:focus+label {
    color: var(--color-primary);
}

.modal .input-field input[type=text]:focus,
.modal .input-field input[type=email]:focus,
.modal .input-field input[type=password]:focus {
    border-bottom: 1px solid var(--color-primary);
    box-shadow: 0 1px 0 0 var(--color-primary);
}



/* === QR CODE PAGE STYLING === */
.qr-code-page .btn,
.qr-code-page .btn:hover {
    background-color: var(--color-primary);
}

.qr-code-page .card {
    background-color: #fdfbf7;
    /* A very light, warm off-white */
}

.qr-code-page .card .card-action a {
    color: var(--color-primary);
    /* Style the 'Edit' link */
    font-weight: bold;
}

.qr-code-page .card .card-action a:hover {
    color: #7a4f37;
    /* Darker brown on hover */
}


/* === CORRECTED EVENT FORM STYLING === */
.event-page-wrapper {
    background-color: #F5F1EC;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.event-form-panel {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 40px !important;
}

.event-form-panel .form-header {
    text-align: center;
    margin-bottom: 30px;
}

.event-title {
    /* APPLY THE NEW FONT HERE */
    font-family: 'Old Standard TT', serif;
    font-size: 1.5rem;
    /* Increased size for better appearance */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.event-subtitle {
    /* APPLY THE NEW FONT HERE */
    font-family: 'Old Standard TT', serif;
    font-size: 1.2rem;
    line-height: 1.6;
}

.event-submit-button,
.event-submit-button:hover {
    background-color: var(--color-primary);
}



/* === ENHANCED EVENT SUCCESS PAGE STYLING === */
.success-page-wrapper {
    background-color: #F5F1EC;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    text-align: center;
}

.success-card {
    border-radius: 8px;
    max-width: 500px;
    /* Control the max width of the card */
    margin: 0 auto;
    /* Center the card */
}

.success-card .card-content {
    padding: 40px;
}

.discount-header {
    font-family: var(--font-heading);
    font-size: 4rem;
    /* Big, impactful text */
    font-weight: 700;
    color: var(--color-primary);
    /* Use your primary brand color */
    line-height: 1.1;
    margin-bottom: 20px;
}

.congrats-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.remaining-text {
    font-size: 1rem;
    color: #757575;
    /* A softer grey for less important text */
}

.highlight {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.2em;
    /* Makes the number slightly bigger */
}

/* Styling for the error panel remains similar */
.error-panel {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 50px !important;
}

.error-panel h1 {
    font-family: 'Old Standard TT', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #F44336;
    margin-top: 1rem;
    margin-bottom: 1rem;
}



/* ============================================== */
/* == STILI PER IL WIZARD DI CREAZIONE ALAMASTR == */
/* ============================================== */

/* Stile di base per la pagina del wizard */
.wizard-page-body {
    font-family: 'Poppins', sans-serif;
    background-color: #FDFBF5;
    /* Sfondo color crema/avorio */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Allinea in alto per form lunghi */
    min-height: 100vh;
    margin: 2rem 1rem;
}

.wizard-page-body--centered {
    align-items: center;
    margin: 0;
    padding: 2rem 1rem;
}

.wizard-container {
    width: 100%;
    max-width: 700px;
    padding: 1rem;
}

/* Full-width variant for questionnaire inside intro */
.wizard-container--full {
    max-width: 1100px;
}

.step-counter {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Stile per i gruppi di domande */
.wizard-form .form-group {
    margin-bottom: 3rem;
}

.wizard-form .form-group>label {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* Stile per input standard (testo, email, numero, textarea) */
.wizard-form input[type="text"],
.wizard-form input[type="email"],
.wizard-form input[type="number"],
.wizard-form textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background-color: transparent;
    font-size: 1rem;
    font-family: var(--font-body);
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.wizard-form input:focus,
.wizard-form textarea:focus {
    outline: none;
    border-bottom-color: #333;
}

/* Stile per i messaggi di errore di Django */
.wizard-form .errorlist {
    color: #c0392b;
    list-style: none;
    padding: 0;
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Stile per il pulsante di invio */
.submit-container {
    text-align: center;
    margin-top: 3rem;
}

.submit-btn {
    display: inline-block;
    padding: 14px 22px;
    background-color: #493224;
    /* consistent primary */
    color: #ffffff;
    /* ensure white text */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
}

.submit-btn--primary {
    background-color: #493224;
    color: #fff;
}

.submit-btn:hover,
.submit-btn:focus {
    filter: brightness(0.95);
}

/* Stile per le scelte cliccabili personalizzate (Radio Buttons) */
.custom-radio-group {
    padding-left: 10px;
    /* Leggero indent */
}

.custom-radio-label {
    display: block;
    padding: 10px 0;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 300;
    transition: font-weight 0.2s, color 0.2s;
}

.custom-radio-label input[type="radio"] {
    /* Nascondiamo completamente il radio button originale */
    opacity: 0;
    position: fixed;
    width: 0;
}

.custom-radio-label.selected {
    /* Stile per l'opzione selezionata */
    font-weight: 600;
    color: #000;
}

/* Pill style like the reference */
.custom-radio-label.pill {
    display: inline-block;
    margin: 6px 8px 6px 0;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #f7f7f7;
}

.custom-radio-label.pill.selected {
    background: #ffffff;
    border-color: #bfbfbf;
}

/* Stile per le scelte cliccabili personalizzate (Checkboxes) */
.custom-checkbox-group {
    padding-left: 10px;
    /* Leggero indent */
}

.custom-checkbox-label {
    display: block;
    padding: 10px 0;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 300;
    transition: font-weight 0.2s, color 0.2s;
}

.custom-checkbox-label input[type="checkbox"] {
    /* Nascondiamo completamente la checkbox originale */
    opacity: 0;
    position: fixed;
    width: 0;
}

.custom-checkbox-label.selected {
    /* Stile per l'opzione selezionata */
    font-weight: 600;
    color: #000;
}

/* Pill style per checkbox */
.custom-checkbox-label.pill {
    display: inline-block;
    margin: 6px 8px 6px 0;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #f7f7f7;
}

.custom-checkbox-label.pill.selected {
    background: #ffffff;
    border-color: #bfbfbf;
}

/* Hint inline per indicare selezione multipla */
.hint-inline {
    font-size: 0.9rem;
    font-weight: 300;
    color: #666;
    font-style: italic;
}

/* Single-page section headings matching screenshots */
.wizard-form .section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    letter-spacing: .06em;
    margin: 40px 0 16px;
    text-align: left;
}

/* Desktop: center section titles in questionnaire */
@media (min-width: 992px) {
    .bespoke-intro-content .wizard-form .section-title {
        text-align: center;
    }
}

.wizard-form .inline-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.wizard-form .hint {
    text-align: left;
    color: #737373;
    margin: -12px 0 10px;
}

/* Desktop layout for GENERALI fields: label left, input right */
@media (min-width: 992px) {
    .bespoke-intro-content .form-group-generali {
        display: grid;
        gap: 14px;
    }

    .bespoke-intro-content .form-group-generali .field-row {
        display: grid;
        grid-template-columns: 280px 1fr;
        align-items: center;
        gap: 18px;
    }

    .bespoke-intro-content .form-group-generali .field-label {
        text-align: left;
        font-weight: 400;
    }

    .bespoke-intro-content .form-group-generali .field-input input,
    .bespoke-intro-content .form-group-generali .field-input textarea,
    .bespoke-intro-content .form-group-generali .field-input select {
        width: 100%;
        max-width: 520px;
        border: 1px solid #d7d7d7;
        border-radius: 4px;
        padding: 10px 12px;
        background-color: #fff;
    }

    .bespoke-intro-content .form-group-generali .field-input input:focus,
    .bespoke-intro-content .form-group-generali .field-input textarea:focus,
    .bespoke-intro-content .form-group-generali .field-input select:focus {
        border-color: #333;
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.02);
    }

    .bespoke-intro-content .form-group-generali .errorlist {
        margin-top: 6px;
    }
}

.measure-instructions {
    text-align: left;
    display: grid;
    gap: 22px;
}

.measure-block h3 {
    font-size: 1rem;
    margin: 8px 0 6px;
}

.measure-block p {
    color: #555;
}

.measure-block ul {
    margin: 6px 0 10px 20px;
}

/* Guide image for face measurements under the title */
.measure-guide {
    margin: 10px 0 18px;
}

.measure-guide img {
    width: 100%;
    height: auto;
    border: 1px solid #e8e8e8;
    background: #fff;
}

/* Stile per l'upload di file */
.wizard-form input[type="file"] {
    border: 2px dashed #ddd;
    padding: 2rem;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background-color: transparent;
}

/* Single-page questionnaire inside bespoke intro: unify typography/background */
.bespoke-intro-content .wizard-container,
.bespoke-intro-content .wizard-form,
.bespoke-intro-content .wizard-form label,
.bespoke-intro-content .wizard-form .helptext,
.bespoke-intro-content .wizard-form .errorlist,
.bespoke-intro-content .custom-radio-label,
.bespoke-intro-content .submit-btn {
    /* Use same font as intro text block */
    font-family: var(--font-body);
    color: var(--color-text);
}

.bespoke-intro-content .wizard-form input[type="text"],
.bespoke-intro-content .wizard-form input[type="email"],
.bespoke-intro-content .wizard-form input[type="number"],
.bespoke-intro-content .wizard-form input[type="file"],
.bespoke-intro-content .wizard-form textarea,
.bespoke-intro-content .wizard-form select {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: #fff;
}

/* Boxed style for "Altro" specific inputs */
#id_personal_style_other,
#id_message_to_convey_other {
    background: #f9f4ed;
    border: 1px solid #e2d7c9;
    border-radius: 10px;
    padding: 12px 14px;
}

/* Altro wrapper: no background/border as requested */
.altro-wrapper[data-altro-input] {
    background: transparent;
    border: none;
    padding: 0;
}

/* Image preview styling */
.image-preview {
    display: block;
    margin-top: 8px;
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
}

.bespoke-intro-content .wizard-container {
    background-color: transparent;
    margin: 0 auto;
}

/* === MEDIA QUERIES === */
@media (max-width: 992px) {

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

    .footer-container {
        text-align: center;
    }

    /* Ensure contacts column centers on mobile */
    .footer-container .footer-column:last-child {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}

/* CORRECTED AND FINAL MOBILE STYLES */
@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }

    .main-header {
        height: var(--nav-height-mobile);
        justify-content: center;
        padding: 0 20px;
    }

    .header-center-content {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .main-nav-desktop {
        display: none;
    }

    .logo {
        height: 35px;
    }

    .header-logo-text {
        font-family: var(--font-heading);
        display: block;
        font-size: 1.8rem;
    }

    .hamburger-menu {
        display: flex;
        right: 20px;
    }

    .hero-section {
        background-size: cover;
        /* fill viewport without awkward cropping */
        background-position: center;
        /* center focal area on mobile */
        min-height: 70vh;
        /* ensure enough vertical space */
        padding: 100px 20px;
        /* more top space under header */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .wizard-form .inline-two {
        grid-template-columns: 1fr;
    }
}


/* === COLLECTIONS PAGE === */
.bespoke-hero {
    /* Full-bleed hero with readable text on image */
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 100px 20px;
    /* a bit taller for impact */
    text-align: center;
    color: #fff;
    /* ensure text stays readable */
    /* Default background; now using bespoke intro hero image */
    background: url('../images/create_bespoke_hero.jpg') center center/cover no-repeat,
        #F3EADC;
    /* fallback color */
}

.bespoke-hero::before {
    /* dark overlay to increase contrast for readability */
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.bespoke-hero-inner {
    position: relative;
    /* stack above overlay */
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
}

.bespoke-hero-inner h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.bespoke-hero-inner p {
    color: rgba(255, 255, 255, 0.9);
}



/* === COLLECTIONS PAGE === */
.collections-hero {
    /* Full-bleed hero with readable text on image */
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 100px 20px;
    /* a bit taller for impact */
    text-align: center;
    color: #fff;
    /* ensure text stays readable */
    /* Default background; now using bespoke intro hero image */
    background: url('../images/collezioni-background.png') center center/cover no-repeat,
        #F3EADC;
    /* fallback color */
}

.collections-hero::before {
    /* dark overlay to increase contrast for readability */
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.collections-hero-inner {
    position: relative;
    /* stack above overlay */
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
}

.collections-hero-inner h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.collections-hero-inner p {
    color: rgba(255, 255, 255, 0.9);
}

.collections-grid {
    max-width: 1200px;
    margin: 40px auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.collection-card {
    grid-column: span 3;
    background-color: #fff;
    position: relative;
    border: none;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.collection-card-wide {
    grid-column: span 6;
    border: none;
}

.collection-link {
    display: block;
    color: inherit;
}

.collection-image {
    width: 100%;
    padding-top: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
}

.collection-banner {
    width: 100%;
    padding-top: 80%;
    background-size: cover;
    background-position: center;
}

.collection-info {
    padding: 16px 8px 22px;
    text-align: center;
}

.collection-info h3 {
    font-size: 1.05rem;
    margin: 10px 0 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.collection-info p {
    font-weight: 300;
    color: #777;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    position: absolute;
    top: 10px;
    right: 10px;
    /* Default position for PROVALI */
    z-index: 2;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #8C5B3F;
    background-color: #F3EADC;
    border: 1px solid #E6D8C4;
    padding: 4px 10px;
    border-radius: 3px;
}

/* LIMITED badge on the left */
.badge-limited {
    right: auto;
    left: 10px;
    background-color: #fff;
    color: #9a9a9a;
    border: 1px solid #e0e0e0;
}

/* Availability pill for Materials list (non-absolute) */
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}

.status-pill--available {
    background-color: #2e7d32;
    /* green darken */
    color: #fff;
}

.status-pill--unavailable {
    background-color: #c62828;
    /* red darken */
    color: #fff;
}

@media (max-width: 992px) {
    .collection-card {
        grid-column: span 6;
    }

    .collection-card-wide {
        grid-column: span 12;
    }
}

@media (max-width: 600px) {
    .collections-hero-inner h1 {
        font-size: 2.2rem;
    }

    .collection-card {
        grid-column: span 12;
    }
}

/* === PRODUCT DETAIL PAGE === */
.product-breadcrumbs {
    background: #fbf6ee;
    padding: 12px 24px;
    font-size: 0.85rem;
    color: #7a6c5a;
}

.product-breadcrumbs a {
    color: #7a6c5a;
}

.product-page {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 20px auto 80px;
    padding: 0 24px;
}

.product-gallery {
    background: #fff;
}

.product-main-image {
    width: 100%;
    padding-top: 62%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #fff;
    border: 1px solid #eee;
}

.product-info {
    text-align: left;
}

.product-meta {
    color: #9b9b9b;
    font-size: 0.8rem;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 6px 0;
}

.product-subtitle {
    color: #777;
    font-size: .95rem;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 14px 0;
}

.klarna-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: #6b6b6b;
    margin-bottom: 14px;
}

.klarna-badge {
    background: #ffb7c5;
    color: #4c2a33;
    padding: 4px 10px;
    border-radius: 14px;
    font-weight: 700;
    font-size: .8rem;
}

.learn-more {
    color: #8C5B3F;
    text-decoration: underline;
}

.product-colors h4 {
    margin: 14px 0 8px;
    font-size: .9rem;
    letter-spacing: .08em;
}

.color-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

.color-thumb {
    width: 100%;
    padding-top: 60px;
    background-size: cover;
    background-position: center;
    border: 1px solid #eee;
}

.color-thumb.more {
    display: grid;
    place-items: center;
    background: #fff9ef;
    color: #6b5a46;
    font-size: .8rem;
    text-align: center;
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b6b6b;
    font-size: .9rem;
    margin: 10px 0 18px;
}

.availability-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6f7d2c;
    box-shadow: 0 0 0 2px #c7cf9b inset;
}

.product-size label {
    display: block;
    font-size: .9rem;
    margin-bottom: 6px;
}

.size-select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ccc;
    background: #fff;
    margin-bottom: 16px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 56px;
    gap: 12px;
    margin-bottom: 16px;
}

.add-to-cart {
    background: #493224;
    color: #fff;
    border: none;
    padding: 16px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
}

.wishlist {
    background: #fff;
    border: 1px solid #ccc;
    font-size: 1.2rem;
    cursor: pointer;
}

.product-cta {
    display: grid;
    gap: 10px;
}

.secondary-cta {
    background: #f0e6d7;
    border: none;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    color: #493224;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.secondary-cta .plus {
    font-weight: 900;
}

@media (max-width: 980px) {
    .product-page {
        grid-template-columns: 1fr;
    }
}

/* === PIERPAOLO PAGE === */
.product-detail-page {
    max-width: 1280px;
    margin: 40px auto 80px;
    padding: 0 24px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-detail-photos {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-detail-photo {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 18px;
    background-color: #f9f5f0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.product-detail-photo[data-photo-trigger] {
    cursor: zoom-in;
}

.product-detail-photo.primary {
    height: clamp(520px, 90vh, 980px);
    border-radius: 26px;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.product-detail-secondary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.product-detail-secondary-grid .product-detail-photo {
    aspect-ratio: 4 / 3;
    min-height: 180px;
    border-radius: 16px;
    border: 1px solid #e5dfd7;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.note-colors {
    font-size: .85rem;
    color: #777;
    margin-top: 4px;
    text-align: center;
}

/* Product Videos Section - 9:16 Mobile-ready Carousel */
.product-videos-section {
    margin-top: 32px;
    margin-bottom: 24px;
}

.product-videos-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-videos-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #8b6914 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
}

.product-videos-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #e0e0e0;
    color: #616161;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0 8px;
    margin-left: auto;
}

/* Carousel Container */
.product-videos-carousel {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
}

.product-videos-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: pan-y pinch-zoom;
    cursor: grab;
}

.product-videos-track.is-dragging {
    cursor: grabbing;
    transition: none;
}

.product-video-slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

.product-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.product-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Navigation Arrows */
.video-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 10;
}

.video-nav:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.video-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.video-nav-prev {
    left: -22px;
}

.video-nav-next {
    right: -22px;
}

.video-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Indicators / Dots */
.video-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.video-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d0d0d0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.video-indicator:hover {
    background: #a0a0a0;
}

.video-indicator.active {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* Custom video controls styling */
.product-video-player::-webkit-media-controls-panel {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.product-video-player::-webkit-media-controls-play-button {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Desktop - larger carousel */
@media (min-width: 769px) {
    .product-videos-carousel {
        max-width: 360px;
    }

    .video-nav-prev {
        left: -50px;
    }

    .video-nav-next {
        right: -50px;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .product-videos-carousel {
        max-width: 280px;
        border-radius: 16px;
    }

    .product-video-container {
        border-radius: 16px;
    }

    .product-videos-title {
        font-size: 1rem;
        justify-content: center;
    }

    .video-nav {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .video-nav-prev {
        left: -18px;
    }

    .video-nav-next {
        right: -18px;
    }
}

@media (max-width: 480px) {
    .product-videos-carousel {
        max-width: 260px;
    }

    .product-video-container {
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    }

    .video-nav {
        display: none;
    }

    .video-indicators {
        margin-top: 12px;
    }
}

body.product-lightbox-open {
    overflow: hidden;
}

.product-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.product-lightbox.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.product-lightbox[hidden] {
    display: none;
}

.product-lightbox__frame {
    position: relative;
    max-width: min(90vw, 1100px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.product-lightbox__close {
    position: absolute;
    top: -32px;
    right: -32px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.product-lightbox__close:hover,
.product-lightbox__close:focus {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.product-lightbox__close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.product-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.product-lightbox__nav span {
    pointer-events: none;
    line-height: 1;
}

.product-lightbox__nav:hover,
.product-lightbox__nav:focus {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.05);
}

.product-lightbox__nav:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.product-lightbox__nav--prev {
    left: 18px;
}

.product-lightbox__nav--next {
    right: 18px;
}

.product-lightbox:not(.has-prev) [data-lightbox-prev],
.product-lightbox:not(.has-next) [data-lightbox-next] {
    opacity: 0;
    pointer-events: none;
}

.product-lightbox:not(.has-prev) [data-lightbox-prev] span,
.product-lightbox:not(.has-next) [data-lightbox-next] span {
    visibility: hidden;
}

.product-detail-info {
    text-align: left;
}

.product-detail-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.product-detail-subtitle {
    color: #666;
    margin-bottom: 10px;
}

.product-detail-price {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 10px 0 16px;
}

.product-detail-section {
    font-size: 1rem;
    letter-spacing: .06em;
    margin: 14px 0 8px;
}

.essences-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
}

.essences-list label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* New essence tiles grid */
.essences-grid {
    list-style: none;
    margin: 8px 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.essence-item {
    position: relative;
    aspect-ratio: 3 / 4;
}

.essence-item input[type="checkbox"],
.essence-item input[type="radio"] {
    /* hide native checkbox but keep it accessible */
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.essence-item label {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.essence-item .thumb {
    width: 100%;
    flex: 1;
    /* square */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.essence-item .caption {
    display: block;
    text-align: center;
    padding: 6px 6px 8px;
    font-size: .7rem;
    letter-spacing: .03em;
}

.essence-item:hover label {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.essence-item input[type="checkbox"]:checked+label,
.essence-item input[type="radio"]:checked+label,
.essence-item.is-selected label {
    border-color: #b08a6f;
    box-shadow: 0 0 0 2px #e7d7c7 inset;
}

.eyewear-dimensions {
    margin: 28px 0;
    padding: 20px 22px;
    border: 1px solid #e3d4c2;
    background: #fdf8f3;
    border-radius: 8px;
}

.eyewear-dimensions__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

.eyewear-dimensions__table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    background: #ffffff;
    border: 1px solid #d9c8b4;
}

.eyewear-dimensions__table tr+tr {
    border-top: 1px solid #e8d9c9;
}

.eyewear-dimensions__table th,
.eyewear-dimensions__table td {
    text-align: left;
    padding: 10px 14px;
}

.eyewear-dimensions__table th {
    font-weight: 600;
    color: #3f332b;
    width: 70%;
}

.eyewear-dimensions__table td {
    font-weight: 500;
    color: #493224;
}

.eyewear-dimensions__code {
    display: inline-block;
    min-width: 18px;
    font-weight: 700;
    letter-spacing: .04em;
}

.eyewear-dimensions__fit th {
    text-transform: uppercase;
    letter-spacing: .08em;
}

.eyewear-dimensions__illustrations {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.eyewear-dimensions__image {
    width: 100%;
    height: auto;
    display: block;
}

/* === RENDER REQUEST PAGE === */
.render-request {
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 0 24px;
}

.rr-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    align-items: start;
}

.rr-upload {
    display: grid;
    gap: 12px;
}

.rr-photo-box {
    width: 100%;
    padding-top: 150%;
    position: relative;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.rr-photo-box:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-color: var(--color-primary);
}

.rr-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rr-upload-btn {
    background: #fff;
    border: 1px dashed #bfbfbf;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
}

.rr-form {
    text-align: left;
    display: grid;
    gap: 16px;
}

.rr-field label {
    display: block;
    font-size: .95rem;
    margin-bottom: 6px;
    color: #555;
}

.rr-field input {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    font-size: 1rem;
}

.rr-actions {
    margin-top: 8px;
}

.rr-submit {
    background: #493224;
    color: #fff;
    border: none;
    padding: 14px 18px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
}

@media (max-width: 900px) {
    .rr-grid {
        grid-template-columns: 1fr;
    }
}

/* Example thumbnails (use generic placeholders until specific assets are added) */
.essence-ziricote .thumb {
    background-image: url('../images/collections/first-card.jpg');
}

.essence-sandalo .thumb {
    background-image: url('../images/collections/second-card.jpg');
}

.essence-mogano .thumb {
    background-image: url('../images/collections/third-card.jpg');
}

.essence-zebrano .thumb {
    background-image: url('../images/collections/fourth-card.jpg');
}

.essence-amaranto .thumb {
    background-image: url('../images/collections/sixth-card.jpg');
}

.essence-noce .thumb {
    background-image: url('../images/collections/eighth-card.jpg');
}

.essence-acero-nero .thumb {
    background-image: url('../images/collections/second-card.jpg');
}

.essence-wenge .thumb {
    background-image: url('../images/collections/fourth-card.jpg');
}

@media (max-width: 720px) {
    /* .essences-grid handled by auto-fill */
}

@media (max-width: 480px) {
    /* .essences-grid handled by auto-fill */

    .eyewear-dimensions__layout {
        grid-template-columns: 1fr;
    }

    .eyewear-dimensions__illustrations {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .eyewear-dimensions__image {
        max-width: 100%;
    }
}

.btn-render {
    background: #493224;
    color: #fff;
    border: none;
    padding: 14px 18px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
}

@media (max-width: 980px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-detail-photo.primary {
        height: clamp(420px, 70vh, 760px);
    }

    .product-detail-secondary-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .product-detail-photo.primary {
        height: clamp(320px, 60vh, 640px);
        border-radius: 20px;
    }

    .product-detail-secondary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-lightbox {
        padding: 16px;
    }

    .product-lightbox__frame {
        max-width: 96vw;
        max-height: 88vh;
    }

    .product-lightbox__close {
        top: 12px;
        right: 12px;
    }

    .product-lightbox__nav {
        bottom: 16px;
        top: auto;
        transform: none;
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .product-lightbox__nav:hover,
    .product-lightbox__nav:focus {
        transform: scale(1.05);
    }

    .product-lightbox__nav--prev {
        left: 16px;
    }

    .product-lightbox__nav--next {
        right: 16px;
    }
}

/* === BESPOKE INTRO PAGE (CREA IL TUO - PAGINA 1) === */
.bespoke-intro-hero {
    position: relative;
    width: 100%;
    max-width: none;
    height: 56vh;
    min-height: 420px;
    /* Use bespoke intro hero image provided by client */
    background: url('../images/create_bespoke_hero.jpg') center center/cover no-repeat;
    margin: 0;
    padding: 0;
}

.bespoke-intro-overlay {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}

.bespoke-intro-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* .bespoke-intro-logo removed per new single-page layout */

.bespoke-intro-content {
    background-color: #f9f4ed !important;
    /* enforce page background */
    width: 100%;
    max-width: none;
    /* override generic section max-width */
    margin: 0;
    /* full-bleed background */
    padding: 90px 24px 110px;
}

.bespoke-intro-text {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.bespoke-intro-text h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 24px;
    color: var(--color-text);
}

.bespoke-intro-text p {
    font-size: 1.1rem;
    color: #4a4a4a;
    margin-bottom: 16px;
}

/* Inputs and labels a bit larger for readability */
.wizard-form .form-group>label {
    font-size: 1.05rem;
}

.wizard-form input[type="text"],
.wizard-form input[type="email"],
.wizard-form input[type="number"],
.wizard-form textarea,
.wizard-form select {
    font-size: 1.05rem;
}

.bespoke-intro-cta {
    margin-top: 28px;
}

@media (max-width: 768px) {
    .bespoke-intro-logo {
        height: 64px;
        bottom: -32px;
    }

    .bespoke-intro-text h1 {
        font-size: 2rem;
    }

    .bespoke-intro-content {
        padding: 70px 20px 90px;
    }
}

/* === ABOUT PAGE === */
.about-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 120px;
    background: linear-gradient(180deg, rgba(14, 9, 5, 0.55) 0%, rgba(14, 9, 5, 0.55) 100%),
        url('../images/about_hero.jpg') center center/cover no-repeat;
    color: #fff;
}

.about-hero__overlay {
    display: none;
}

.about-hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.about-hero__eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 20px;
}

.about-hero h1 {
    font-size: 3.8rem;
    margin-bottom: 18px;
}

.about-hero p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.92);
}

.about-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    padding: 14px 36px;
    background: #fdf2e7;
    color: #493224;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.about-section {
    padding: 110px 24px;
    color: var(--color-text);
}

.about-section--intro {
    padding-top: 90px;
    padding-bottom: 70px;
    background: #f9f4ed;
}

.about-section--muted {
    background: linear-gradient(180deg, #fbf6ee 0%, #f4ede4 100%);
}

.about-section__inner {
    max-width: 1080px;
    margin: 0 auto;
}

.about-section__header {
    text-align: center;
    margin-bottom: 60px;
}

.about-section__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--color-primary);
    margin-bottom: 18px;
}

.about-section__header h2 {
    font-size: 2.6rem;
    margin-bottom: 18px;
}

.about-section__header p {
    max-width: 760px;
    margin: 0 auto 18px;
    font-size: 1.05rem;
    color: #4b4036;
}

.contact-section {
    padding: 120px 24px;
    background: linear-gradient(180deg, #fbf6ee 0%, #f4ede4 100%);
    color: var(--color-text);
}

.contact-section__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.contact-section__intro {
    max-width: 420px;
}

.contact-section__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--color-primary);
    margin-bottom: 18px;
}

.contact-section__intro h2 {
    font-size: 2.6rem;
    margin-bottom: 20px;
}

.contact-section__intro p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4b4036;
    margin-bottom: 24px;
}

.contact-section__intro a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.contact-section__intro a:hover {
    text-decoration: underline;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(73, 50, 36, 0.12);
}

.contact-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form__group label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b5141;
}

.contact-form__group input,
.contact-form__group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(73, 50, 36, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form__group input:focus,
.contact-form__group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(140, 91, 63, 0.18);
    outline: none;
}

.contact-form__group textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form__group--full {
    grid-column: 1 / -1;
}

.contact-form__submit {
    grid-column: 1 / -1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    border: none;
    border-radius: 999px;
    background: #fdf2e7;
    color: #493224;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(73, 50, 36, 0.2);
}

.contact-form__privacy {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: #6f645b;
    margin: 0;
}

.contact-form__privacy a {
    color: var(--color-primary);
    text-decoration: underline;
}

.contact-form__alert {
    grid-column: 1 / -1;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(140, 91, 63, 0.1);
    color: #4b4036;
    font-size: 0.95rem;
    font-weight: 600;
}

.contact-form__alert--success {
    background: rgba(66, 184, 131, 0.18);
    color: #29664a;
}

.contact-form__alert--error,
.contact-form__alert--danger {
    background: rgba(192, 57, 43, 0.12);
    color: #a53a2d;
}

.contact-form__alert--info {
    background: rgba(86, 148, 204, 0.14);
    color: #285d84;
}

.contact-form__alert--warning {
    background: rgba(255, 193, 7, 0.18);
    color: #795300;
}

.contact-form__group.has-error input,
.contact-form__group.has-error textarea {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}

.contact-form__error {
    font-size: 0.8rem;
    color: #a53a2d;
}

.contact-form__alerts {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form__alerts[hidden] {
    display: none;
}

.contact-form__alert-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-form__alert-body strong {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #493224;
}

.contact-form__alert-note {
    margin: 0;
    font-size: 0.9rem;
    color: #6f645b;
}

.contact-form__alert--interactive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.contact-form__alert-close {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 10px 26px;
    background: #493224;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form__alert-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(73, 50, 36, 0.25);
}

.contact-form__alert-close:focus-visible {
    outline: 2px solid #fdf2e7;
    outline-offset: 2px;
}

.contact-form--loading .contact-form__submit {
    cursor: wait;
    opacity: 0.85;
}

.contact-modal__content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-modal__success {
    padding: 0;
}

.contact-modal__success-inner {
    width: 100%;
    padding: 80px 48px;
    border-radius: 32px;
    background: linear-gradient(180deg, #fbf6ee 0%, #f4ede4 100%);
    box-shadow: 0 35px 70px rgba(73, 50, 36, 0.2);
    text-align: center;
}

.contact-modal__success-inner h2 {
    font-size: 2.2rem;
    margin-bottom: 18px;
    color: #493224;
}

.contact-modal__success-inner p {
    font-size: 1.05rem;
    color: #4b4036;
    margin-bottom: 32px;
}

.contact-modal__success-close {
    border: none;
    border-radius: 999px;
    padding: 16px 42px;
    background: #493224;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-modal__success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(73, 50, 36, 0.2);
}

.contact-modal__success-close:focus-visible {
    outline: 2px solid #fdf2e7;
    outline-offset: 2px;
}

body.modal-open {
    overflow: hidden;
}

.contact-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    z-index: 1000;
    pointer-events: none;
}

.contact-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 9, 5, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal__dialog {
    position: relative;
    width: min(1040px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 40px;
    transform: translateY(24px) scale(0.98);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    background: transparent;
    padding: 32px 24px;
}

.contact-modal.is-active {
    pointer-events: auto;
}

.contact-modal.is-active .contact-modal__overlay {
    opacity: 1;
}

.contact-modal.is-active .contact-modal__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.contact-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #493224;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 2;
}

.contact-modal__close:hover {
    transform: translateY(-2px);
    background: #ffffff;
}

.contact-section--modal {
    padding: 0;
    background: transparent;
}

.contact-section--modal .contact-section__inner {
    padding: 80px 48px;
    background: linear-gradient(180deg, #fbf6ee 0%, #f4ede4 100%);
    border-radius: 32px;
    box-shadow: 0 35px 70px rgba(73, 50, 36, 0.2);
}

.about-intro {
    text-align: left;
}

.about-intro__highlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    margin-bottom: 22px;
}

.about-intro__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-top: 36px;
}

.about-intro__item {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 45px rgba(73, 50, 36, 0.08);
}

.about-intro__item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.about-intro__item p {
    color: #564738;
    font-size: 1rem;
    line-height: 1.6;
}

.about-timeline {
    display: grid;
    gap: 30px;
    position: relative;
}

.about-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 36px;
    width: 2px;
    background: linear-gradient(180deg, rgba(140, 91, 63, 0.5) 0%, rgba(140, 91, 63, 0.1) 100%);
}

.about-timeline__step {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 32px;
    position: relative;
}

.about-timeline__index {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-primary);
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(73, 50, 36, 0.1);
    position: relative;
    z-index: 1;
}

.about-timeline__body {
    background: #fff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(73, 50, 36, 0.08);
}

.about-timeline__body h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.about-timeline__body p {
    font-size: 1.02rem;
    color: #4a4036;
    line-height: 1.7;
}

.about-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.about-card {
    background: #fff;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 20px 45px rgba(73, 50, 36, 0.08);
    border: 1px solid rgba(140, 91, 63, 0.12);
}

.about-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.about-card p {
    color: #4b4036;
    font-size: 1.02rem;
    line-height: 1.65;
}

.about-solutions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.about-solutions__item {
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 45px rgba(73, 50, 36, 0.08);
    border-top: 5px solid rgba(140, 91, 63, 0.4);
}

.about-solutions__item h3 {
    font-size: 1.4rem;
    margin-bottom: 18px;
    font-family: var(--font-heading);
}

.about-solutions__item p {
    color: #4b4036;
    font-size: 1.03rem;
    line-height: 1.7;
}

.about-cta {
    background-color: #fdf7f0;
    padding: 120px 24px;
}

.about-cta__inner {
    max-width: 940px;
    margin: 0 auto;
    text-align: center;
}

.about-cta h2 {
    font-size: 2.6rem;
    margin-bottom: 18px;
}

.about-cta p {
    font-size: 1.1rem;
    color: #4b4036;
    margin-bottom: 26px;
}

.about-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 42px;
    background: #493224;
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-cta__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(73, 50, 36, 0.2);
}

@media (max-width: 1040px) {

    .about-intro__grid,
    .about-card-grid,
    .about-solutions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-hero {
        padding: 120px 48px 100px;
    }

    .contact-section__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-section--modal .contact-section__inner {
        padding: 60px 32px;
    }

    .contact-modal {
        padding: 32px 18px;
    }

    .contact-form {
        padding: 36px;
    }
}

@media (max-width: 768px) {
    .about-hero {
        min-height: 60vh;
        padding: 120px 24px 80px;
        align-items: center;
        text-align: center;
    }

    .about-hero h1 {
        font-size: 3rem;
    }

    .about-hero__content {
        margin: 0 auto;
    }

    .about-section {
        padding: 80px 18px;
    }

    .about-section__header h2 {
        font-size: 2.1rem;
    }

    .about-intro__grid,
    .about-card-grid,
    .about-solutions {
        grid-template-columns: 1fr;
    }

    .contact-section {
        padding: 100px 18px;
    }

    .contact-section__inner {
        gap: 40px;
    }

    .contact-section--modal .contact-section__inner {
        padding: 48px 22px;
    }

    .contact-modal {
        align-items: flex-start;
    }

    .contact-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 32px);
        padding: 24px 12px 16px;
        border-radius: 28px;
    }

    .contact-modal__close {
        top: 10px;
        right: 10px;
    }

    .contact-form {
        grid-template-columns: 1fr;
        padding: 32px 24px;
    }

    .contact-form__submit {
        justify-self: stretch;
        width: 100%;
    }

    .contact-form__privacy {
        text-align: center;
    }

    .contact-modal__success-inner {
        padding: 60px 28px;
    }

    .about-timeline::before {
        left: 24px;
    }

    .about-timeline__step {
        grid-template-columns: 72px 1fr;
        gap: 22px;
    }

    .about-timeline__index {
        width: 62px;
        height: 62px;
        font-size: 1.2rem;
    }

    .about-timeline__body {
        padding: 26px;
    }

    .about-cta {
        padding: 90px 18px;
    }
}

@media (max-width: 520px) {
    .about-hero h1 {
        font-size: 2.4rem;
    }

    .about-hero p {
        font-size: 1rem;
    }

    .contact-form {
        padding: 28px 20px;
    }

    .contact-form__submit {
        padding: 14px 24px;
    }

    .contact-form__alert--interactive {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-form__alert-close {
        width: 100%;
        text-align: center;
    }

    .contact-modal__success-inner {
        padding: 48px 22px;
    }

    .contact-modal__success-close {
        width: 100%;
    }

    .contact-section--modal .contact-section__inner {
        padding: 40px 18px;
        border-radius: 24px;
    }

    .contact-modal__dialog {
        padding: 18px 8px 12px;
    }

    .contact-modal__close {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .about-timeline::before {
        display: none;
    }

    .about-timeline__step {
        grid-template-columns: 1fr;
    }

    .about-timeline__index {
        justify-self: flex-start;
        margin-bottom: 16px;
    }
}

/* === COOKIE BANNER STYLES === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    padding: 15px 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    /* Hidden by default, shown by JS */
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 300;
}

.cookie-content a {
    color: #fff;
    text-decoration: underline;
}

.btn-accept {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-accept:hover {
    background-color: #7a4f37;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}