:root {
    --primary: #C5A059;
    --primary-hover: #B8860B;
    --secondary: #2C2C2C;
    --bg-color: #FAF9F6;
    --text-main: #333333;
    --text-muted: #666666;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: #E2E2E2;
    --accent: #E8D3A3;
    --booked: #D9D9D9; 
    --available: #FFFFFF;
    --selected: #C5A059;
    --selected-text: #FFFFFF;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

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

header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo span {
    font-weight: 300;
    color: var(--primary);
}

.hero {
    position: relative;
    height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    overflow: hidden;
    background: #1a1a1a;
}

.hero-carousel-track {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.02);
    transition: opacity 1.2s ease-in-out, transform 6s ease-out;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    transform: translateY(-20px);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

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

.booking-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 2rem;
    max-width: 1200px;
    margin: -40px auto 4rem;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(20px);
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-muted);
}

/* Calendar Styling */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 10px 0;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
    border: 1px solid var(--border-color);
}

.day-cell .price {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -2px;
}

.day-cell.booked .price {
    opacity: 0.2;
}

.day-cell.selected .price,
.day-cell.partial-booked-start.selected .price {
    color: rgba(255, 255, 255, 0.9);
}

.day-cell.booked {
    background-color: var(--booked);
    color: var(--text-muted);
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.5;
}

.day-cell.available:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(197, 160, 89, 0.05);
}

.day-cell.selected { background-color: var(--selected) !important; color: white; transform: scale(1.05); }
.day-cell.in-range { background-color: rgba(197, 160, 89, 0.2); }
.day-cell.hover-range { background-color: rgba(197, 160, 89, 0.4); }
.day-cell.hover-error { background-color: rgba(231, 76, 60, 0.2); }

/* Smart Gap Offer Styles */
.day-cell.gap-offer { border: 2px dashed var(--gold); background: rgba(197, 160, 89, 0.05); }
.gap-badge { position: absolute; top: 2px; right: 2px; background: #e67e22; color: white; font-size: 0.6rem; padding: 2px 4px; border-radius: 4px; font-weight: bold; z-index: 5; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.7; } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.7; } }

.day-cell.today {
    border: 2px solid var(--primary);
}

/* Check-out check-in indicator */
.day-cell.partial-booked {
    background: linear-gradient(to bottom right, var(--booked) 50%, var(--available) 50%);
}

.calendar-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.box.booked { background: var(--booked); }
.box.available { background: var(--available); }
.box.selected { background: var(--selected); }

/* Form Styling */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.booking-summary {
    background: rgba(197, 160, 89, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px dashed var(--primary);
}

.booking-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-line.highlight {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--primary);
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    background: var(--secondary);
    color: white;
    border-radius: var(--radius);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Navigation buttons */
.nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.day-cell.partial-booked-start {
    background: linear-gradient(to bottom right, var(--available) 50%, var(--booked) 50%);
}

.day-cell.hover-range {
    background-color: rgba(197, 160, 89, 0.1) !important;
}

.day-cell.hover-error {
    background-color: rgba(244, 67, 54, 0.1) !important;
    border-color: #f44336 !important;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
    .booking-container {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .hero {
        height: 250px;
    }
    .card {
        padding: 1.5rem;
    }
}
