/* style.css - Gamat Villas - God Tier Overhaul v7 (Gift Box Unleashed & Sold Out UI) */

/* ========================== */
/* == VARIABLES & BASE == */
/* ========================== */
:root {
    /* --- V3 LUXE PALETTE --- */
    --primary-color: #005A52;     /* Deep, rich Emerald Green */
    --secondary-color: #003833;   /* Even deeper green for hover/accents */
    --accent-color: #D4A056;      /* Sophisticated, warm Gold/Ochre */
    --accent-color-dark: #C9904A; /* Darker Gold for hover states */
    --text-color: #1C2B29;        /* Dark, rich Green/Black for text */
    --text-muted: #6D7A78;       /* Softer Green/Grey for muted text */
    --background-light: #FCFBF8;  /* Very light, warm Cream/Off-White */
    --background-card: #FFFFFF;   /* Clean White for cards */
    --border-color: #EAE5DB;      /* Subtle border color */
    --danger-color: #C7756B;      /* Muted Terracotta Red for errors */
    
    /* --- NEW INCENTIVE COLORS --- */
    --incentive-bg: #FFFBF2;       /* Light gold background for bonus sections */
    --incentive-border: #F3E4C9;  /* Border for bonus sections */
    --incentive-text: #8C6D4E;    /* Text color for bonus sections */

    /* --- Fonts & Layout --- */
    --border-radius-sm: 0.4rem;
    --border-radius: 0.8rem;      /* Increased base radius for softer feel */
    --border-radius-lg: 1.2rem;       /* Larger radius for prominent elements */
    --border-radius-pill: 50px;
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Lato', sans-serif;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 8px rgba(28, 43, 41, 0.07);
    --shadow-md: 0 5px 15px rgba(28, 43, 41, 0.12);
    --shadow-lg: 0 10px 30px rgba(28, 43, 41, 0.15);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}
h1 { font-size: clamp(2.5rem, 6vw, 3.8rem); margin-bottom: 1.2rem; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); margin-bottom: 2rem; }
h3 { font-size: clamp(1.5rem, 4vw, 1.8rem); }
h4 { font-size: clamp(1.2rem, 3.5vw, 1.4rem); margin-bottom: 1.2rem; }
h5 { font-size: clamp(1.05rem, 3vw, 1.2rem); font-family: var(--body-font); font-weight: 600; color: var(--secondary-color); margin-bottom: 0.8rem; text-transform: uppercase; letter-spacing: 0.8px; }
h6 { font-size: clamp(1rem, 2.8vw, 1.1rem); }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}
a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.lead {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.text-accent { color: var(--accent-color); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* ========================== */
/* == HERO SECTION == */
/* ========================== */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 680px; 
    max-height: 900px;
    background-color: var(--secondary-color);
    background-image: url('villaview.jpeg');
    background-size: cover;
    background-position: center 30%; /* Focus a bit higher */
    background-attachment: fixed;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0, 56, 41, 0.3) 0%, rgba(0, 46, 41, 0.8) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 1.5rem;
    padding-bottom: 140px; 
}
.hero-title {
    font-size: clamp(3.2rem, 8vw, 5rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    line-height: 1.15;
}
.hero-subtitle {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem; /* More space before incentive */
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-incentive {
    font-size: clamp(1.05rem, 3vw, 1.2rem);
    font-weight: 600;
    color: var(--secondary-color);
    background-color: var(--accent-color);
    border-radius: var(--border-radius-pill);
    padding: 0.8rem 2rem;
    display: inline-block;
    margin-bottom: 3.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.hero-incentive .fa-gift {
    margin-right: 0.7rem;
}

.hero-cta.btn {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 0.9rem 2.5rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600; /* Softer weight */
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-pill);
    transition: all var(--transition-speed) ease-out;
    box-shadow: none; /* Removed default shadow */
    text-transform: none; /* More refined look */
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.hero-cta.btn:hover, .hero-cta.btn:focus {
    background-color: #fff;
    border-color: #fff;
    color: var(--secondary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Enhanced hover shadow */
    outline: none;
}

/* ========================== */
/* == BOOKING CONTAINER & SECTIONS == */
/* ========================== */
.booking-container {
    max-width: 1200px; 
    margin: -120px auto 6rem auto; /* This negative margin causes the overlap */
    position: relative;
    z-index: 10;
    background-color: var(--background-card);
    padding: clamp(2rem, 6vw, 4rem);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

#pageHeader { display: none; }

.booking-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}
.booking-section:last-of-type {
     margin-bottom: 0;
     padding-bottom: 0;
     border-bottom: none;
}
#availabilitySection, #roomSwitchSection, #detailsSection, #villaShowcase {
    padding-bottom: 0;
    border-bottom: none;
}

/* Card styling for specific sections */
.booking-section.card {
    background-color: var(--background-card);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
    padding: 0;
    transition: box-shadow var(--transition-speed) ease, border-color var(--transition-speed) ease;
}
.booking-section.card:hover { box-shadow: var(--shadow-md); }
.booking-section.card .card-body { padding: clamp(1.5rem, 4vw, 2.5rem); }
.booking-section.card:last-of-type { margin-bottom: 0; }

.section-title {
    display: flex;
    align-items: flex-start; /* Align to the top */
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--accent-color); /* Use accent for title underline */
    display: inline-flex;
    max-width: 100%;
}
.section-title .step-number {
    background-color: var(--accent-color); /* Use accent for step number */
    color: var(--secondary-color); /* Deeper text color */
    border-radius: 50%;
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-family: var(--body-font);
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
    margin-top: 4px; /* Adjust for alignment */
}
.section-title span:not(.step-number) { line-height: 1.3; }

.section-title-subtitle {
    font-size: 1rem;
    font-family: var(--body-font);
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1;
    margin-top: 0.3rem;
}


/* ========================== */
/* == VILLA SHOWCASE == */
/* ========================== */
#villaShowcase { margin-bottom: 4rem; }
#villaShowcase .section-title { border-bottom-color: var(--primary-color); }

/* === GOD-TIER CAROUSEL FIX START === */
#villaImageCarousel {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 0;
    padding-top: 75%; /* This creates a perfect 4:3 aspect ratio (3 / 4 = 75%) */
}

#villaImageCarousel .carousel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#villaImageCarousel .carousel-item {
    width: 100%;
    height: 100%;
}

#villaImageCarousel .carousel-item img {
    object-fit: cover; /* This scales the image to fill the container */
    width: 100%;
    height: 100%;
}
/* === GOD-TIER CAROUSEL FIX END === */

#villaImageCarousel .carousel-caption { background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%); bottom: 0; left: 0; right: 0; padding-bottom: 1.5rem; }
#villaImageCarousel .carousel-caption h5 { color: #fff; font-family: var(--body-font); font-weight: 400; font-size: 0.9rem; letter-spacing: 0.5px; }
#villaImageCarousel .carousel-indicators button { width: 10px; height: 10px; border-radius: 50%; background-color: #fff; opacity: 0.6; transition: opacity var(--transition-speed) ease; }
#villaImageCarousel .carousel-indicators button.active { opacity: 1; }
#villaImageCarousel .carousel-control-prev-icon, #villaImageCarousel .carousel-control-next-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.villa-description { font-size: 1.05rem; color: var(--text-color); line-height: 1.8; }
.incentive-description { background: var(--incentive-bg); border: 1px solid var(--incentive-border); border-left: 4px solid var(--accent-color); padding: 1.2rem 1.5rem; border-radius: var(--border-radius-sm); }
.incentive-description p { font-size: 0.95rem; line-height: 1.7; margin-bottom: 0; color: var(--incentive-text); }
.incentive-description strong { color: var(--text-color); }

#villaShowcase h5 { margin-bottom: 1rem; }
.villa-features { padding-left: 0; list-style: none; margin-bottom: 0; }
.villa-features li { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.8rem; }
.villa-features i.fa-fw { color: var(--primary-color); font-size: 1.3em; text-align: center; flex-shrink: 0; }

/* ========================== */
/* == STEP 1: DATE SELECTION == */
/* ========================== */
.form-label { font-weight: 600; margin-bottom: 0.8rem; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.8px; }
.date-input-wrapper { position: relative; }
.date-input {
    padding: 1rem 1.5rem;
    padding-right: 3.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    width: 100%;
    appearance: none;
}
.date-input::placeholder { color: var(--text-muted); opacity: 0.8; font-weight: 300; }
.date-input:hover { border-color: var(--secondary-color); }
.date-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 90, 82, 0.15); /* Focus ring based on new primary */
    outline: none;
}
.date-icon { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); color: var(--primary-color); pointer-events: none; font-size: 1.3rem; }
#datePickerMessage { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.8rem; }

/* ========================== */
/* == FLATICKR CUSTOMIZATION == */
/* ========================== */
.flatpickr-calendar { border-radius: var(--border-radius); box-shadow: var(--shadow-lg); border: none; background-color: var(--background-card); margin-top: 8px; font-family: var(--body-font); }
.flatpickr-months { height: 56px; }
.flatpickr-months .flatpickr-month { background: var(--primary-color); color: white; fill: white; height: 100%; line-height: 56px; font-size: 1.1rem; font-weight: 600; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { height: 56px; width: 48px; padding: 12px; top: 0; color: rgba(255, 255, 255, 0.8); fill: rgba(255, 255, 255, 0.8); transition: color var(--transition-speed) ease, fill var(--transition-speed) ease; }
.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { color: #fff; fill: #fff; background: rgba(0,0,0,0.1); }
.flatpickr-weekdays { background: var(--background-light); height: 40px; line-height: 40px; }
span.flatpickr-weekday { color: var(--primary-color); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.6px; }
.flatpickr-day { border-radius: var(--border-radius-sm); transition: all 0.2s ease; height: 40px; line-height: 40px; font-size: 0.95rem; border: 1px solid transparent; max-width: 40px; margin: 2px; font-weight: 400; }
.flatpickr-day:hover { background: var(--background-light); border-color: var(--border-color); color: var(--text-color); cursor: pointer; }
.flatpickr-day.today { border-color: var(--accent-color); color: var(--secondary-color); font-weight: 600; }
.flatpickr-day.today:hover { background: var(--background-light); border-color: var(--accent-color); color: var(--secondary-color); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--primary-color); border-color: var(--primary-color); color: #fff; box-shadow: none; font-weight: 600; }
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover { background: var(--secondary-color); border-color: var(--secondary-color); color: #fff; }
.flatpickr-day.inRange { background: rgba(0, 90, 82, 0.1); border-color: transparent; box-shadow: none; border-radius: 0; color: var(--text-color); }
.flatpickr-day.startRange, .flatpickr-day.startRange.inRange { border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); }
.flatpickr-day.endRange, .flatpickr-day.endRange.inRange { border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; }
.flatpickr-day.startRange.endRange { border-radius: var(--border-radius-sm); }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover { cursor: not-allowed; color: var(--border-color); background: var(--background-light); border-color: transparent; font-style: italic; }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: rgba(28, 43, 41, 0.35); }
.flatpickr-day.prevMonthDay.flatpickr-disabled, .flatpickr-day.nextMonthDay.flatpickr-disabled { color: rgba(234, 229, 219, 0.8); }

/* ================================== */
/* == STEP 2A: AVAILABILITY RESULTS (STYLE REVISED) == */
/* ================================== */
#availabilitySection .section-title { margin-bottom: 2.5rem; }
#availabilityResults .col { display: flex; align-items: stretch; }

.villa-card {
    background-color: var(--background-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    overflow: hidden;
    display: flex; flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.villa-card-image {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0; /* Prevents image from shrinking */
}

.villa-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 90, 82, 0.5);
}
.villa-card .card-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
/* Title style to match screenshot */
.villa-card h5.card-title {
    font-size: 1.4rem;
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.villa-card .card-text { margin-bottom: 1rem; color: var(--text-muted); }
.villa-card .villa-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--heading-font);
}

/* Button style to match screenshot (outline by default) */
.villa-card .select-villa-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-pill);
    text-transform: none;
    font-size: 1rem;
    transition: all 0.2s ease-out;
    margin-top: auto; /* Pushes button to the bottom */
}
.villa-card .select-villa-btn:hover, .villa-card .select-villa-btn:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Selected state style to match screenshot */
.villa-card.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 90, 82, 0.15), var(--shadow-md);
    transform: translateY(-2px);
}
.villa-card.selected .select-villa-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.villa-card.selected .select-villa-btn::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 0.6em;
}


#noAvailabilityMessage { background-color: var(--incentive-bg); border: 1px solid var(--incentive-border); border-radius: var(--border-radius); padding: 2.5rem; color: var(--incentive-text); text-align: center; font-size: 1.1rem; margin-top: 2rem; display: flex; align-items: center; justify-content: center; gap: 1rem; font-weight: 500; }
#noAvailabilityMessage::before { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 1.5rem; flex-shrink: 0; }

/* ==================================== */
/* == STEP 2B: ROOM SWITCH (GOD TIER) == */
/* ==================================== */
#roomSwitchSection {
    background-color: transparent;
    border: none;
    border-radius: var(--border-radius-lg);
    padding: clamp(1rem, 3vw, 2rem) 0;
    margin-bottom: 4rem;
}

#roomSwitchSection .section-title {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

#roomSwitchIntro {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    text-align: center;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

#roomSwitchIntro strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* The new card container */
.room-switch-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) ease;
}

.room-switch-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: rgba(0, 90, 82, 0.4);
}

/* Title like "Split Stay Option" */
.room-switch-title {
    font-family: var(--body-font);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.room-switch-segments {
    list-style: none;
    margin: 0;
    padding: 0;
}

.room-switch-segments li {
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color); /* Dates are now the same color */
}

.room-switch-segments li:last-child {
    margin-bottom: 0;
}

.room-switch-segments li strong {
    font-family: var(--heading-font);
    font-weight: 700;
    margin-right: 0.5rem;
}

.room-switch-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Container for price and button on the right */
.room-switch-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Default for mobile */
    height: 100%;
}

.room-switch-price {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--text-color);
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    line-height: 1;
    margin-bottom: 1rem;
}

.book-switch-option-btn {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border-radius: var(--border-radius-pill);
    color: white;
    font-weight: 700;
    transition: all var(--transition-speed) ease-out;
    width: 100%; /* Full width on mobile */
}

.book-switch-option-btn:hover, .book-switch-option-btn:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* "Choose Different Dates" button */
#cancelRoomSwitchBtn.btn-outline-secondary {
    border-width: 1px;
    border-color: var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    border-radius: var(--border-radius-pill);
    transition: all var(--transition-speed) ease;
}

#cancelRoomSwitchBtn.btn-outline-secondary:hover {
    background-color: var(--background-light);
    color: var(--text-color);
    border-color: var(--text-muted);
}

/* Desktop alignment */
@media (min-width: 768px) {
    .room-switch-actions {
        align-items: flex-end; /* Align right on desktop */
    }
    .book-switch-option-btn {
        width: auto; /* Auto width on desktop */
    }
}

/* ========================== */
/* == STEP 3: DETAILS & PAYMENT == */
/* ========================== */
#detailsSection { padding-top: 1rem; }
#detailsSection .section-title { margin-bottom: 3rem; }
.form-section-title, .summary-section-title { font-size: 1.3rem; font-family: var(--heading-font); color: var(--secondary-color); font-weight: 600; margin-bottom: 2rem !important; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); display: inline-block; }
.form-group-enhanced .form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 0.6rem; display: block; }
.form-group-enhanced .input-wrapper { position: relative; }
.form-group-enhanced .input-icon { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; z-index: 3; font-size: 1.1rem; transition: color var(--transition-speed) ease; }
.form-group-enhanced .form-control.with-icon { padding: 0.9rem 1.25rem; padding-left: 3.2rem; }
.form-group-enhanced .form-control { font-size: 1rem; border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); background-color: var(--background-card); color: var(--text-color); transition: all var(--transition-speed) ease; height: auto; padding: 0.9rem 1.25rem; }
.form-group-enhanced .form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-group-enhanced .form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 90, 82, 0.15); outline: none; }
.form-group-enhanced .form-control:focus + .input-icon, .form-group-enhanced .input-wrapper:focus-within .input-icon { color: var(--primary-color); }

.submit-button-enhanced {
    background-color: var(--accent-color);
    border: 2px solid var(--accent-color);
    color: var(--secondary-color);
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-pill);
    transition: all var(--transition-speed) ease-out;
    box-shadow: var(--shadow-sm);
    text-transform: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.submit-button-enhanced .button-loader {
    display: none;
    line-height: 1;
}
.submit-button-enhanced:hover, .submit-button-enhanced:focus {
    background-color: var(--accent-color-dark);
    border-color: var(--accent-color-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    outline: none;
}
.submit-button-enhanced:disabled {
    cursor: wait;
    background-color: var(--accent-color-dark);
    border-color: var(--accent-color-dark);
    color: white;
    opacity: 1;
}

.security-note { font-size: 0.85rem; color: var(--text-muted); }
.security-note i { color: var(--primary-color); }

/* --- Intl Tel Input Customization --- */
.iti { width: 100%; }
.iti__country-list { box-shadow: var(--shadow-md); border-radius: var(--border-radius); border-color: var(--border-color); }
.iti__selected-flag { border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); }
#phone.form-control.is-invalid { border-color: var(--bs-form-invalid-border-color); }


/* --- Enhanced Summary Box Styling --- */
.summary-box-enhanced { background-color: var(--background-light); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: clamp(1.5rem, 4vw, 2.5rem); height: 100%; box-shadow: inset 0 1px 3px rgba(28, 43, 41, 0.04); }
.summary-item { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; font-size: 0.95rem; gap: 1rem; }
.summary-item:last-of-type { margin-bottom: 0; }
.summary-label { color: var(--text-muted); flex-shrink: 0; font-weight: 400; }
.summary-value { color: var(--text-color); font-weight: 600; text-align: right; }
.summary-villa-name { font-family: var(--heading-font); font-size: 1.1rem; font-weight: 700; color: var(--secondary-color); }

/* --- GOD TIER Summary Gift Box --- */
.summary-gift-box {
    background-color: var(--incentive-bg);
    border: 2px dashed var(--accent-color-dark);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    text-align: center;
    margin: 0; /* Will be positioned by divider */
    position: relative;
    overflow: hidden;
}
.summary-gift-box .gift-box-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--incentive-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.summary-gift-box .gift-box-header .fa-gift {
    color: var(--accent-color-dark);
    font-size: 1.1em;
}
.summary-gift-box .gift-name {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.3;
}
.summary-gift-box .gift-value {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0;
}


.summary-divider { border: 0; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }
.summary-total { margin-top: 1.5rem; text-align: right; }
.summary-total-label { display: block; font-size: 1.2rem; font-weight: 600; color: var(--text-color); margin-bottom: 0.5rem; font-family: var(--heading-font); }
.summary-total-price { display: block; font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 700; color: var(--primary-color); line-height: 1.1; font-family: var(--heading-font); }

/* ========================== */
/* == FOOTER & UTILITIES == */
/* ========================== */
footer { background-color: var(--secondary-color); color: rgba(255,255,255,0.7); padding: 3rem 1rem; margin-top: 6rem; text-align: center; }
footer p { font-size: 0.9rem; margin-bottom: 0.5rem; }
footer a { color: #fff; font-weight: 600; }
footer a:hover { color: var(--accent-color); }

.loader, #loader, #roomSwitchLoader { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 1rem; min-height: 200px; width: 100%; }
.spinner-border { width: 3.5rem; height: 3.5rem; color: var(--primary-color); border-width: 0.3em; }
.loader p, #loader p, #roomSwitchLoader p { margin-top: 1.5rem; color: var(--text-muted); font-size: 1rem; font-weight: 500; }

.alert { border-radius: var(--border-radius); padding: 1.2rem 1.5rem; font-size: 1rem; font-weight: 500; display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; line-height: 1.6; }
.alert::before { font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 1.3rem; flex-shrink: 0; }
#errorMessage.alert { background-color: rgba(199, 117, 107, 0.1); color: var(--danger-color); border: 1px solid rgba(199, 117, 107, 0.3); }
#errorMessage.alert::before { content: "\f06a"; }
#scarcityMessage.alert { background-color: var(--incentive-bg); color: var(--incentive-text); border: 1px solid var(--incentive-border); }
#scarcityMessage.alert::before { content: "\f0eb"; color: var(--accent-color); }

.booking-section, .villa-card, #roomSwitchOptions .alert { animation: fadeIn 0.6s ease-out forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========================== */
/* == RESPONSIVE ADJUSTMENTS == */
/* ========================== */
@media (min-width: 992px) {
    .summary-wrapper {
        position: sticky;
        top: 2rem; 
    }
}
@media (max-width: 992px) {
    .booking-container { margin-top: -80px; padding: clamp(1.5rem, 5vw, 3rem); }
    #detailsSection .order-md-last { order: 1; }
    #detailsSection .order-md-first { order: 0; }
}
@media (max-width: 767.98px) {
    body { font-size: 0.98rem; }
    .hero-section { height: auto; min-height: 600px; background-attachment: scroll; }
    .booking-container { margin-top: -60px; padding: 2rem; border-radius: var(--border-radius); }
    h2, .section-title span:not(.step-number) { font-size: clamp(1.6rem, 4vw, 2rem); }
    .summary-box-enhanced { margin-top: 2.5rem; height: auto; }
}
@media (max-width: 576px) {
     html { font-size: 94%; }
     .booking-container { padding: 1.5rem; margin-top: -50px;}
     .villa-features .col { flex-basis: 100%; max-width: 100%; }

    /* === GOD-TIER FLATPICKR MOBILE FIX START === */
    .flatpickr-calendar {
        width: 95vw !important; /* Force width to be 95% of the viewport width */
        left: 50% !important;    /* Position the left edge at the center */
        transform: translateX(-50%) !important; /* Shift left by half its own width to center it */
        min-width: unset !important; /* Remove any minimum width constraints */
    }
    /* === GOD-TIER FLATPICKR MOBILE FIX END === */

     .room-switch-option-footer { flex-direction: column; align-items: stretch; gap: 1rem; }
     .room-switch-total-price { text-align: center; }
     .book-switch-option-btn { width: 100%; }
}

/* ==================================== */
/* == GOD-TIER SOLD OUT CARD STYLES  == */
/* ==================================== */

/* Main style for the sold-out card container */
.villa-card.sold-out {
    filter: grayscale(80%); /* De-saturate but keep a hint of color */
    opacity: 0.65;
    transition: none; /* Disable all transitions for a static feel */
}

/* IMPORTANT: Disable all hover effects on the sold-out card */
.villa-card.sold-out:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important; /* Revert to default shadow */
    border-color: var(--border-color) !important; /* Revert to default border */
}

/* This is the container for the "SOLD OUT" badge */
.sold-out-overlay {
    margin-top: auto; /* Pushes this block to the bottom */
    padding-top: 1.5rem; /* Space above the badge */
    text-align: center;
    width: 100%;
    border-top: 1px solid var(--border-color); /* Separator line */
}

/* The main "SOLD OUT" badge */
.sold-out-badge {
    display: inline-block;
    background-color: var(--text-color);
    color: var(--background-card);
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.6rem 2rem;
    border-radius: var(--border-radius-sm);
    line-height: 1;
}

/* The smaller text below the badge */
.sold-out-text {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}