/* style.css */
:root {
    --primary-color: #2D5A27;
    /* Dark Green */
    --secondary-color: #A67C00;
    /* Safari Yellow/Gold */
    --accent-color: #8C6239;
    /* Sand Brown */
    --neutral-light: #F4F1EA;
    /* Beige */
    --neutral-dark: #2C2A29;
    /* Deep dark */
    --success-color: #4CAF50;
    --booked-color: #E53935;
    --selected-color: #FBC02D;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--neutral-light);
    color: var(--neutral-dark);
    line-height: 1.6;
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background: url('https://images.unsplash.com/photo-1549479373-3e75bc23fb68?auto=format&fit=crop&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(45, 90, 39, 0.7), rgba(44, 42, 41, 0.6));
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

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

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Primary Button */
.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #8a6600;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(166, 124, 0, 0.4);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.full-width {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: -50px auto 3rem;
    padding: 0 20px;
    position: relative;
    z-index: 20;
}

/* Booking Wrapper */
.booking-wrapper {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd !important;
    border-radius: var(--border-radius) !important;
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    background-color: #fff !important;
    color: var(--neutral-dark) !important;
    transition: border-color 0.3s ease;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 48px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
}

/* Flex Layout for Seat & Customer Info */
.layout-flex {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.jeep-layout-section,
.customer-details-section {
    flex: 1;
    min-width: 300px;
}

.jeep-layout-section h3,
.customer-details-section h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.instruction {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Jeep Body Styles (Lovable Exact UI) */
.jeep-body {
    background-color: #ffffff;
    border-radius: 90px 90px 100px 100px;
    padding: 3rem 1.5rem 5rem 1.5rem;
    margin: 0 auto;
    width: 320px;
    position: relative;
    z-index: 1;
    border: 3px solid #d4d4d4;
    box-shadow: 0 0 0 1px #ececec, 0 10px 30px rgba(0, 0, 0, 0.03);
}

/* Jeep Front windshield */
.jeep-front {
    background-color: #000000;
    border-radius: 12px;
    text-align: center;
    padding: 0.8rem 1rem;
    color: #6a6a6a;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.jeep-front .steer-icon {
    position: absolute;
    left: 20px;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 300;
}

.jeep-front .driver-text {
    flex-grow: 1;
    text-align: right;
    padding-right: 1.5rem;
}

/* Seats Wrapper */
.seat-map {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    align-items: center;
}

.seat-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 10px;
}

/* Individual Seat (Lovable UI Style) */
/* Individual Seat (Lovable UI Style) */
.seat {
    width: 75px;
    height: 70px;
    background-color: #e8f5e9;
    border: 2px solid #66bb6a;
    border-radius: 12px 12px 18px 18px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: #2e7d32;
    font-weight: 800;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.25rem;
    padding-bottom: 6px;
    cursor: pointer;
    box-shadow: 0 5px 0px #a5d6a7, 0 8px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    position: relative;
}

/* Seat cushion lines */
.seat::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 4px;
    right: 4px;
    height: 42px;
    border: 2px solid #66bb6a;
    border-radius: 10px;
    background: repeating-linear-gradient(90deg, transparent, transparent 15px, rgba(102, 187, 106, 0.15) 15px, rgba(102, 187, 106, 0.15) 17px);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.seat:not(.booked):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0px #a5d6a7, 0 12px 20px rgba(0, 0, 0, 0.12);
}

.seat.selected {
    border-color: #fbc02d;
    color: #424242;
    background-color: #fff8e1;
    box-shadow: 0 5px 0px #ffe082, 0 8px 15px rgba(0, 0, 0, 0.08);
}

.seat.selected::before {
    border-color: #fbc02d;
    background: repeating-linear-gradient(90deg, transparent, transparent 15px, rgba(251, 192, 45, 0.2) 15px, rgba(251, 192, 45, 0.2) 17px);
}

.seat.booked {
    border-color: #bdbdbd;
    color: #9e9e9e;
    background-color: #f5f5f5;
    cursor: not-allowed;
    box-shadow: 0 4px 0px #e0e0e0;
}

.seat.booked::before {
    border-color: #e0e0e0;
    background: repeating-linear-gradient(90deg, transparent, transparent 15px, rgba(189, 189, 189, 0.1) 15px, rgba(189, 189, 189, 0.1) 17px);
}

/* Explicit Jeep Wheels */
.wheel {
    position: absolute;
    width: 26px;
    height: 65px;
    background-color: #757575;
    border-radius: 6px;
    border: 3px solid #4a4a4a;
    /* Removed z-index: -1 to prevent browser clipping bugs */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Add horizontal lines for tread */
    background-image: repeating-linear-gradient(0deg, transparent, transparent 8px, #4a4a4a 8px, #4a4a4a 10px);
}

/* Position exactly kissing the frame (-14px left/right because jeep border is 3px and wheel width is 26px) */
/* Wait, jeep body has width 320. Half is 160. Just attach it to left and right! */
.wheel-tl {
    top: 70px;
    left: -14px;
}

.wheel-tr {
    top: 70px;
    right: -14px;
}

.wheel-bl {
    bottom: 70px;
    left: -14px;
}

.wheel-br {
    bottom: 70px;
    right: -14px;
}

/* Headlights */
.jeep-front::before,
.jeep-front::after {
    content: '';
    position: absolute;
    top: -55px;
    /* Moved up completely outside the black windshield */
    width: 28px;
    height: 16px;
    background-color: #fde296;
    border: 2px solid #fbbc04;
    border-radius: 50%;
}

.jeep-front::before {
    left: 10px;
    transform: rotate(-10deg);
}

.jeep-front::after {
    right: 10px;
    transform: rotate(10deg);
}

/* Top and Bottom Bumper arcs */
.seat-map::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 40px;
    right: 40px;
    height: 40px;
    border-top: 2px solid #d4d4d4;
    border-radius: 50%;
    z-index: -2;
}

.seat-map::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 30px;
    right: 30px;
    height: 50px;
    border-bottom: 2px solid #d4d4d4;
    border-radius: 50%;
    z-index: -2;
}

/* Exhaust/back wheel + red lights container logic handled nicely by extending seat-map */
.jeep-body .rear-bumper {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
}

.bumper-dot.red {
    width: 20px;
    height: 12px;
    background-color: #ffcdd2;
    border: 2px solid #ef9a9a;
    border-radius: 50%;
}

.bumper-dot.black {
    width: 24px;
    height: 24px;
    background-color: #000;
    border: 4px solid #f5f5f5;
    box-shadow: 0 0 0 1px #e0e0e0;
    border-radius: 50%;
}

/* Legends */
.seat-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.legend-box {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid;
    background-color: transparent;
}

.legend-box.available {
    border-color: #388e3c;
}

.legend-box.selected {
    border-color: #f5b041;
}

.legend-box.booked {
    border-color: #b0bec5;
}

/* Price Box */
.price-box {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
    margin-top: 1rem;
}

.price-box h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.price-note {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 0.5rem;
}

.price-box hr {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.total-price {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Message Box */
.message-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
}

.message-box.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message-box.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Footer */
footer {
    background-color: var(--neutral-dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .layout-flex {
        flex-direction: column;
    }

    .booking-wrapper {
        padding: 1.5rem;
    }

    .form-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .form-group,
    .form-group input,
    .form-group select {
        width: 100% !important;
    }
}