/* Custom CSS per centrare meglio la casetta e la scritta rotante */

/* Blocca scroll quando modal aperto */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Centra la hero section */
.hero-top {
    justify-content: center !important;
    align-items: center !important;
}

/* Centra meglio l'h1 che contiene la casetta */
h1.hero-side-gingerbread-holiday-home {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
}

/* Casetta centrata */
img.hero__title {
    position: relative;
    z-index: 2;
}

/* Scritta rotante centrata rispetto alla casetta */
.rotateImage {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 45vw !important;
    height: auto !important;
    margin: 0 !important;
    z-index: 1 !important;
    transform-origin: center center !important;
    /* Negative margins to center the element exactly */
    margin-left: -22.5vw !important;
    margin-top: -22.5vw !important;
    -webkit-animation: spinRotate 6s linear infinite;
    -moz-animation: spinRotate 6s linear infinite;
    animation: spinRotate 6s linear infinite;
}

/* Nascondi la sezione di testo che non serve */
.hero-side-content-wrapper {
    display: none !important;
}

/* Media query per tablet */
@media only screen and (max-width: 960px) {
    .rotateImage {
        width: 55vw !important;
        margin-left: -27.5vw !important;
        margin-top: -27.5vw !important;
    }
}

/* Media query per mobile */
@media only screen and (max-width: 578px) {
    .rotateImage {
        width: 120vw !important;
        margin-left: -60vw !important;
        margin-top: -60vw !important;
    }
    
    h1.hero-side-gingerbread-holiday-home {
        width: 100%;
        height: auto;
    }
}

/* Animazione di rotazione */
@-moz-keyframes spinRotate {
    0% {
        -moz-transform: rotate(0deg);
    }
    100% {
        -moz-transform: rotate(360deg);
    }
}

@-webkit-keyframes spinRotate {
    0% {
        -webkit-transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spinRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   NEW PROTOTYPE STYLES (Cards & Modals)
   ========================================= */

/* UTILITIES & ANIMATIONS */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gold-glow {
    box-shadow: 0 0 40px -10px rgba(234, 179, 8, 0.3);
}

.text-gold {
    color: #eab308; /* Tailwind yellow-500 */
}

.bg-gold {
    background-color: #eab308;
}

.shadow-gold {
    box-shadow: 0 10px 25px -5px rgba(234, 179, 8, 0.4);
}

.font-display {
    font-family: 'Playfair Display', serif; /* Ensure this font is loaded or fallback */
}

/* CARD V2 CONFIGURATION */
.gift-card-v2 {
    position: relative;
    padding-top: 3rem; /* mobile pt-12 */
    margin-bottom: 4rem;
    width: 100%;
}

@media (min-width: 960px) {
    .gift-card-v2 {
        padding-top: 0;
        padding-left: 3rem;
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* The Glass Background Layer */
.gift-card-v2__bg {
    position: absolute;
    inset: 0;
    top: 3rem;
    border-radius: 2rem; /* rounded-[32px] */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px -10px rgba(234, 179, 8, 0.3);
    transition: all 0.5s ease;
}

@media (min-width: 960px) {
    .gift-card-v2__bg {
        top: 0;
        left: 3rem;
        border-radius: 40px; /* md:rounded-[40px] */
    }
}

.gift-card-v2:hover .gift-card-v2__bg {
    border-color: rgba(234, 179, 8, 0.3);
    box-shadow: 0 0 60px -10px rgba(234, 179, 8, 0.4);
}

/* Content Layout */
.gift-card-v2__wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow: hidden; /* Added overflow hidden for mobile */
    border-radius: 2rem; /* Match bg radius */
}

@media (min-width: 960px) {
    .gift-card-v2__wrapper {
        flex-direction: row;
        gap: 3rem;
        padding: 1.5rem 3.5rem;
        overflow: visible; /* Release overflow on desktop */
    }
}

/* Image Section */
.gift-card-v2__image-col {
    width: 100%;
    flex-shrink: 0;
    margin-top: -2rem; /* Ridotto da -5rem per evitare tagli su mobile */
    position: relative;
}

@media (min-width: 960px) {
    .gift-card-v2__image-col {
        width: 45%;
        margin-top: 0;
        margin-left: -5rem; /* -ml-20 */
    }
}

.gift-card-v2__img-wrapper {
    position: relative;
    transition: transform 0.7s ease-out;
}

.gift-card-v2:hover .gift-card-v2__img-wrapper {
    transform: scale(1.05) rotate(-2deg);
}

.gift-card-v2__img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.8));
    display: block;
}

/* Content Section */
.gift-card-v2__content-col {
    flex: 1;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
}

@media (min-width: 960px) {
    .gift-card-v2__content-col {
        text-align: left;
        align-items: flex-start;
        padding-top: 0;
    }
}

/* Header: Title + Badge */
.gift-card-v2__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

@media (min-width: 960px) {
    .gift-card-v2__header {
        flex-direction: row;
    }
}

.gift-card-v2__title {
    font-size: 2rem; /* 3xl */
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: -0.05em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1;
    margin: 0;
    font-family: "Inter", sans-serif;
}

@media (min-width: 768px) {
    .gift-card-v2__title {
        font-size: 3rem; /* 5xl */
    }
}

.gift-card-v2__badge {
    display: inline-flex;
    align-items: center;
    background-color: #eab308;
    color: #0f172a; /* slate-950 */
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 10px 15px -3px rgba(234, 179, 8, 0.2);
}

/* Description */
.gift-card-v2__desc {
    color: rgba(203, 213, 225, 0.8); /* slate-300/80 */
    margin-bottom: 1.5rem;
    line-height: 1.625;
    font-size: 0.875rem;
    max-width: 36rem;
    font-weight: 500;
    ont-size: 1rem;
    line-height: 1.5rem;
}

@media (min-width: 768px) {
    .gift-card-v2__desc {
        margin-bottom: 2rem;
        font-size: 1rem;
    }
}

/* Pricing Grid */
.gift-card-v2__pricing {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .gift-card-v2__pricing {
        justify-content: flex-start;
        gap: 3rem;
        width: auto;
        border: none;
        padding: 0;
        margin-bottom: 2.5rem;
    }
}

.gift-card-v2__price-box {
    text-align: center;
}

@media (min-width: 768px) {
    .gift-card-v2__price-box {
        text-align: left;
    }
}

.gift-card-v2__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
    display: block;
}

.gift-card-v2__label--muted { color: #64748b; } /* slate-500 */
.gift-card-v2__label--gold { color: #eab308; font-weight: 900; }

.gift-card-v2__value-old {
    font-size: 1.25rem;
    font-weight: 700;
    color: #94a3b8; /* slate-400 */
    text-decoration: line-through;
    text-decoration-color: rgba(234, 179, 8, 0.4);
}

@media (min-width: 768px) {
    .gift-card-v2__value-old { font-size: 1.5rem; }
}

.gift-card-v2__value-new {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .gift-card-v2__value-new {font-size: 3.6rem;}
}

.gift-card-v2__separator {
    width: 1px;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .gift-card-v2__separator { display: none; }
}

/* Button */
.btn-gold-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto; /* Cambiato da 100% */
    padding: 1rem 2rem; /* Ridotto padding per mobile */
    background-color: #eab308;
    color: #0f172a;
    font-weight: 900;
    border-radius: 50px; /* Cambiato da 9999px a 50px */
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(234, 179, 8, 0.25);
    font-size: 1rem; /* Ridotto da 1.25rem */
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}

@media (min-width: 640px) {
    .btn-gold-v2 { width: auto; padding: 1.25rem 3.5rem; font-size: 1.5rem; }
}

.btn-gold-v2:hover {
    background-color: #0f172a; /* Inversione: sfondo scuro */
    color: #eab308; /* Testo dorato */
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.5);
}

.btn-gold-v2:active {
    transform: scale(0.95);
    background-color: #1e293b; /* Leggermente più chiaro quando premuto */
    color: #eab308;
}

.btn-gold-v2 i {
    transition: transform 0.3s ease;
}

.btn-gold-v2:hover i {
    transform: translateX(4px);
}

/* Footer Note */
.gift-card-v2__note {
    margin-top: 1.5rem;
    font-size: 10px;
    color: rgba(100, 116, 139, 0.6); /* slate-500 op-60 */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
}

@media (min-width: 768px) {
    .gift-card-v2__note { text-align: left; }
}

/* =========================================
   MODAL V2 STYLES
   ========================================= */
.natale-modal-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Enable scrolling on the layout wrapper for mobile */
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .natale-modal-layout {
        flex-direction: row;
        overflow-y: visible; /* Reset on desktop */
    }
}

/* Left Side Summary */
.natale-modal-summary {
    background: linear-gradient(to bottom right, #0f172a, #172554); /* slate-900 to blue-950 */
    padding: 2rem;
    display: flex; 
    flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0; /* Allow it to be part of the flow */
}

@media (min-width: 768px) {
    .natale-modal-summary {
        width: 40%;
        border-right: 1px solid rgba(255,255,255,0.1);
        border-bottom: none;
        display: flex;
        height: 100%; /* Full height on desktop */
    }
}

@media (max-width: 767px) {
    .natale-modal-summary.mobile-hidden {
        display: none;
    }
}

.modal-card-img {
    width: 100%;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
}

.modal-card-img:hover {
    transform: rotate(0);
}

.modal-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-feature-list li {
    display: flex;
    align-items: center;
    color: #cbd5e1; /* slate-300 */
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.icon-box {
    margin-right: 0.5rem;
    color: #34d399; /* emerald-400 */
    font-weight: bold;
}

.price-mini-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: auto;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-label-sm {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    display: block;
}

.price-final-text {
    font-size: 2.25rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}

/* Right Side Form */
.natale-modal-form {
    flex: 1;
    padding: 1rem; /* Ridotto da 1.5rem */
    background: rgba(15, 23, 42, 0.4); /* slate-900/40 */
    /* Remove overflow-y auto from here on mobile to let it scroll with layout */
    overflow: visible; 
    padding-bottom: 6rem; /* Space for fixed CTA on mobile */
}

@media (min-width: 768px) {
    .natale-modal-form {
        padding: 2.5rem;
        overflow-y: auto; /* Restore scroll on desktop */
        height: 100%;
        padding-bottom: 2.5rem;
    }
}

.modal-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    margin: 0;
}

/* Form Inputs */
.form-group-v2 {
    margin-bottom: 1.25rem;
}

.form-label-v2 {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 0.375rem;
    margin-left: 0.25rem;
}

.input-wrapper-v2 {
    position: relative;
}

.input-icon-v2 {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #64748b;
}

.input-field-v2 {
    width: 100%;
    background-color: rgba(2, 6, 23, 0.5); /* slate-950/50 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.input-field-v2:focus {
    outline: none;
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.input-field-v2::placeholder {
    color: #475569;
}

/* Reset box-sizing for modal components to prevent layout issues */
.natale-modal * {
    box-sizing: border-box;
}

/* Sticky Footer for Mobile */
.form-actions {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95); /* High opacity background */
    backdrop-filter: blur(8px);
    padding: 1rem;
    margin: 0 -1rem -1rem -1rem; /* Ridotto da -1.5rem per match con padding form */
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 20;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
    .form-actions {
        position: static;
        background: transparent;
        padding: 0;
        margin: 0;
        border: none;
        backdrop-filter: none;
        box-shadow: none;
    }
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
}

@media (min-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-submit-btn-v2 {
    width: 100%;
    background-color: #eab308;
    color: #0f172a;
    font-weight: 900;
    padding: 1.25rem;
    border-radius: 1rem;
    border: none;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(234, 179, 8, 0.1);
    transition: all 0.2s;
    margin-top: 1rem;
}

.modal-submit-btn-v2:hover {
    background-color: #facc15;
    transform: translateY(-2px);
}

.modal-legal-text {
    font-size: 1rem;
    text-align: center;
    color: #64748b;
    margin-top: 1rem;
}

.modal-legal-text a {
    text-decoration: underline;
    color: inherit;
}

/* Custom Checkbox Styling */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    /* Hide the default checkbox but keep it accessible */
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkbox-box {
    position: relative;
    height: 1.25rem;
    width: 1.25rem;
    min-width: 1.25rem;
    background-color: rgba(2, 6, 23, 0.5);
    border: 2px solid #334155;
    border-radius: 0.375rem;
    transition: all 0.2s;
    margin-top: 0.125rem;
}

.custom-checkbox:hover .checkbox-box {
    border-color: #64748b;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box {
    background-color: #eab308;
    border-color: #eab308;
}

.custom-checkbox input[type="checkbox"]:focus ~ .checkbox-box {
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

/* Checkmark icon */
.custom-checkbox .checkbox-box::after {
    content: "";
    position: absolute;
    display: none;
    left: 0.375rem;
    top: 0.125rem;
    width: 0.375rem;
    height: 0.625rem;
    border: solid #0f172a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box::after {
    display: block;
}

.custom-checkbox .label-text {
    flex: 1;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Tooltip Styles */
.dog-activity-badge {
    cursor: pointer;
    transition: opacity 0.3s;
    display: flex; /* Ensure transforms/opacity work well */
}

.dog-activity-badge:hover {
    opacity: 1 !important;
}

.tippy-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #eab308; /* Gold to match theme */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.2rem;
}

.tippy-description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: white;
}

/* Ensure Tippy Box has a compatible background if utilizing default theme over dark background */
.tippy-box {
    background-color: #0f172a; /* Slate 900 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.tippy-arrow {
    color: #0f172a; /* Match background */
}

/* =========================================
   MODAL CONTAINER & ANIMATIONS
   ========================================= */

.natale-modal {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
    padding: 0; /* Rimosso padding per centrare meglio */
}

.natale-modal.is-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0; /* Padding solo quando aperto */
}

.natale-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(2, 6, 23, 0.9); /* slate-950/90 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
    animation: fadeIn 0.3s ease-out;
}

.natale-modal-container {
    position: relative;
    width: calc(100% - 2rem); /* Margini laterali su mobile */
    max-width: 72rem; /* Increased from 56rem to 72rem (~1150px) */
    max-height: 90vh;
    margin: auto; /* Centra il modal */
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05); /* glass */
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0 40px -10px rgba(234, 179, 8, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: scaleIn 0.3s ease-out forwards; /* Changed to forwards */
    opacity: 0;
}

.natale-modal.is-open .natale-modal-container {
    opacity: 1; /* Ensure visibility when open */
}

.natale-modal.is-closing .natale-modal-container {
    animation: scaleOut 0.3s ease-in forwards;
}

.natale-modal.is-closing .natale-modal-backdrop {
    animation: fadeOut 0.3s ease-in forwards;
}

@media (min-width: 768px) {
    .natale-modal-container {
        flex-direction: row;
        border-radius: 2rem; /* Slightly larger radius for desktop */
    }
}

/* Close Button */
.natale-modal-close {
    position: absolute;
    top: 1.5rem; /* More spacing */
    right: 1.5rem;
    z-index: 50;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 9999px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem; /* Larger touch target */
    height: 3rem;
}
.natale-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scaleOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

/* Custom Scrollbar for form styling */
.natale-modal-form::-webkit-scrollbar {
    width: 6px;
}

.natale-modal-form::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

.natale-modal-form::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.natale-modal-form::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
