:root {
    --primary: #0066FF;
    --secondary: #FF3366;
    --accent: #00D9B5;
    --dark: #0A0E27;
    --slate: #1E293B;
    --gray: #64748B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --gold: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(0, 102, 255, 0.1);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    flex-shrink: 0;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transform: rotate(-10deg);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-btn:hover { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin: 0 auto;
}

.nav-links a {
    color: var(--slate);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover { color: var(--primary); }

.nav-cta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    color: var(--slate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 102, 255, 0.5);
}

/* BOOKING SECTION */
.booking-section {
    padding: 120px 0 60px;
}

.booking-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--slate) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.booking-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.venue-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.venue-info-header i {
    color: var(--accent);
}

.booking-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: stretch;
}

/* BOOKING FORM */
.booking-form-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.form-label .step-number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.view-availability {
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.view-availability:hover {
    color: var(--secondary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s;
    background: white;
    color: var(--dark);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* BOOKING GRID SYSTEM */
.booking-container {
    overflow: hidden;
    border-radius: 12px;
    border: 2px solid var(--light);
    max-width: 100%;
    background: white;
    position: relative;
    width: 100%;
}

.grid-wrapper {
    display: flex;
    width: 100%;
}

.court-labels {
    display: flex;
    flex-direction: column;
    background: var(--light);
    border-right: 2px solid white;
    flex-shrink: 0;
    width: 200px;
    position: sticky;
    left: 0;
    z-index: 10;
}

.header-placeholder {
    height: 60px;
    border-bottom: 2px solid white;
    background: var(--light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--slate);
    display: flex;
    align-items: center;
}

.court-label {
    padding: 1rem;
    font-weight: 600;
    color: var(--slate);
    display: flex;
    align-items: center;
    height: 70px;
    border-bottom: 1px solid white;
    background: var(--light);
}

.scrollable-area {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
}

/* Custom scrollbar for scrollable area */
.scrollable-area::-webkit-scrollbar {
    height: 8px;
}

.scrollable-area::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

.scrollable-area::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 10px;
}

.scrollable-area::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.time-headers {
    display: flex;
    background: var(--light);
    border-bottom: 2px solid white;
    height: 60px;
    min-width: max-content;
}

.time-header {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--slate);
    min-width: 80px;
    width: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.time-header .period {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.2rem;
}

.slots-container {
    display: flex;
    flex-direction: column;
    min-width: max-content;
}

.court-row {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--light);
    height: 70px;
    min-width: max-content;
}

.court-row:hover {
    background: rgba(0, 102, 255, 0.02);
}

.time-slot {
    min-width: 80px;
    width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.slot-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--light);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.slot-circle:hover:not(.disabled):not(.blocked):not(.unavailable) {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.slot-circle.available {
    background: white;
    border-color: #E5E7EB;
}

.slot-circle.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.slot-circle.disabled,
.slot-circle.unavailable {
    background: #F3F4F6;
    border-color: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
}

.slot-circle.blocked {
    background: #FEE2E2;
    border-color: var(--danger);
    color: var(--danger);
    cursor: not-allowed;
}

.slot-circle .cross {
    font-size: 1.2rem;
    font-weight: bold;
}

.slot-circle i {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TIME SLOT LEGEND */
.slot-grid-section {
    margin-top: 2rem;
}

.slot-legend {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.legend-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.legend-indicator.unavailable {
    background: #E5E7EB;
    color: #9CA3AF;
}

.legend-indicator.available {
    background: white;
    border: 2px solid #E5E7EB;
}

.legend-indicator.selected {
    background: var(--primary);
    color: white;
}

.legend-indicator.not-allowed {
    background: #FEE2E2;
    border: 2px solid var(--danger);
    color: var(--danger);
}

/* DURATION POPUP */
.duration-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.duration-popup[style*="display: block"] {
    display: flex !important;
}

.popup-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.popup-content hr {
    border: none;
    border-top: 2px solid var(--light);
    margin: 1rem 0;
}

.popup-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

#duration-options {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

#duration-options li {
    margin-bottom: 0.8rem;
}

#duration-options button {
    width: 100%;
    padding: 1rem;
    background: var(--light);
    border: 2px solid var(--light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#duration-options button:hover {
    border-color: var(--primary);
    background: rgba(0, 102, 255, 0.05);
}

.duration-time {
    font-weight: 600;
    color: var(--dark);
}

.duration-price {
    font-weight: 700;
    color: var(--primary);
}

.btn-add-to-cart,
#add-to-cart {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
}

.btn-add-to-cart:hover,
#add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 102, 255, 0.4);
}

/* EXPIRY ALERT */
.expiry-alert {
    background: linear-gradient(135deg, #FFF4E6 0%, #FFE8CC 100%);
    border: 2px solid #FFB547;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 181, 71, 0.15);
}

.expiry-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.expiry-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    color: #856404;
    font-size: 0.95rem;
}

.expiry-message i {
    font-size: 1.25rem;
    color: #FF9800;
}

.expiry-time {
    color: var(--danger);
    font-weight: 700;
    font-size: 1.1rem;
}

.expiry-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-expiry-cancel,
.btn-expiry-pay {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-expiry-cancel {
    background: white;
    color: #666;
    border: 2px solid #ddd;
}

.btn-expiry-cancel:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
    transform: translateY(-1px);
}

.btn-expiry-pay {
    background: var(--danger);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-expiry-pay:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    transform: translateY(-1px);
}

.expiry-content.expired {
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #FFE5E5 0%, #FFCCCC 100%);
    border-color: #FF6B6B;
    color: #721c24;
    padding: 1rem 1.5rem;
}

.expiry-content.expired i {
    font-size: 1.25rem;
    color: var(--danger);
}

/* LOGIN NOTICE ALERT */
.login-notice-alert {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

.login-notice-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.login-notice-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    color: #1565C0;
    font-size: 0.95rem;
}

.login-notice-message i {
    font-size: 1.25rem;
    color: var(--primary);
}

.login-notice-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: var(--primary);
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.btn-login:hover {
    background: #0052CC;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
    transform: translateY(-1px);
}

/* CART SIDEBAR */
.cart-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cart-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light);
}

.cart-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cart-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.venue-cart-info {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05), rgba(255, 51, 102, 0.05));
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.venue-cart-category {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.venue-cart-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.venue-cart-address {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}

.cart-items {
    margin-bottom: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cart-items::-webkit-scrollbar {
    display: none;
}

.cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray);
}

.cart-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* CART ITEMS */
.cart-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-item-header {
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-item-header:hover {
    background: rgba(0, 102, 255, 0.03);
}

.cart-item-main {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.cart-item-top {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    margin-bottom: -10px;
}

.cart-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
}

.cart-item-sport {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 44px;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.cart-item-date,
.cart-item-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray);
}

.cart-item-date i,
.cart-item-time i {
    font-size: 0.75rem;
    width: 14px;
    opacity: 0.7;
}

.cart-item-price {
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

.cart-item-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.cart-item-expand {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.cart-item-expand:hover {
    background: rgba(0, 102, 255, 0.1);
}

.cart-item-expand.expanded {
    transform: rotate(180deg);
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.cart-item-remove:hover {
    background: var(--danger);
    color: white;
}

.cart-item-addons {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
    background: white;
}

.cart-item-addons.show {
    display: block;
}

.addon-select-btn {
    width: 100%;
    padding: 0.8rem;
    background: white;
    border: 2px dashed var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.addon-select-btn:hover {
    background: rgba(0, 102, 255, 0.05);
    border-style: solid;
}

/* PROMO SECTION */
.promo-section {
    margin-bottom: 1.5rem;
}

.promo-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.promo-toggle-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.promo-discount-amount {
    font-weight: 600;
    color: var(--gray);
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.promo-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s;
}

.promo-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-apply-promo {
    padding: 0.8rem 1.5rem;
    background: var(--light);
    border: 2px solid var(--light);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    color: var(--slate);
}

.btn-apply-promo:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* CART SUMMARY */
.cart-summary {
    border-top: 2px solid var(--light);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    padding-top: 0.8rem;
    border-top: 2px solid var(--light);
    margin-top: 0.8rem;
}

.summary-row.discount {
    color: var(--success);
}

.btn-checkout {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
    font-family: 'Outfit', sans-serif;
}

.btn-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 102, 255, 0.4);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ADDON STYLES */
.addons-box {
    border: 2px solid var(--light);
    border-radius: 12px;
    padding: 1rem;
}

.addon-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 0.6rem;
}

.addon-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.addon-item-info {
    flex: 1;
}

.addon-item-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.1rem;
}

.addon-item-price {
    color: var(--gray);
    font-size: 0.8rem;
}

.addon-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.addon-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--slate);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.addon-qty-btn:hover {
    background: var(--primary);
    color: white;
}

.addon-qty-value {
    font-weight: 600;
    color: var(--dark);
    min-width: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.no-addons {
    color: var(--gray);
    font-size: 0.9rem;
    padding: 1rem;
    text-align: center;
}

/* CALENDAR MODAL */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 0;
}

.calendar-modal.show {
    display: flex !important;
}

.calendar-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.calendar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--light);
    font-size: 1.5rem;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-close:hover {
    background: var(--danger);
    color: white;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.calendar-nav-btn {
    padding: 0.5rem 0.8rem;
    background: var(--light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--slate);
}

.calendar-nav-btn:hover {
    background: var(--primary);
    color: white;
}

.calendar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    min-width: 200px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.calendar-weekdays div {
    font-weight: 600;
    color: var(--slate);
    padding: 0.5rem;
    font-size: 0.85rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.calendar-day {
    padding: 1rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    position: relative;
    background: white;
    border: 2px solid transparent;
}

.calendar-day:hover:not(.disabled) {
    background: rgba(0, 102, 255, 0.05);
    border-color: var(--primary);
}

.calendar-day.other-month {
    color: var(--gray);
    opacity: 0.3;
}

.calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.calendar-day.selected {
    background: var(--secondary);
    color: white;
    font-weight: 700;
    border-color: var(--secondary);
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--light);
}

.calendar-day.has-availability::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    right: 0.3rem;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

/* FOOTER */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-brand-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-description {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-column h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .booking-header h1 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .booking-grid,
    .grid-wrapper {
        min-width: 500px;
    }

    .time-header,
    .time-slot {
        min-width: 60px;
    }

    .slot-circle {
        width: 35px;
        height: 35px;
    }
}

/* ==================== AVAILABILITY MODAL (LIVE AVAILABILITY GRID) ==================== */
.availability-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: auto;
}

.availability-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.availability-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--light);
    font-size: 1.5rem;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.availability-close:hover {
    background: var(--primary);
    color: white;
}

.availability-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.availability-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.availability-header-left i {
    color: var(--primary);
    font-size: 1.25rem;
}

.availability-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.availability-date-wrapper {
    position: relative;
    display: inline-block;
}

.availability-date-input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 150px;
    cursor: pointer;
    background: white;
}

.availability-date-input:focus {
    outline: none;
    border-color: var(--primary);
}

.availability-date-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    z-index: 1;
}

.availability-calendar-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    z-index: 1000;
    min-width: 280px;
}

.calendar-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calendar-dropdown-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
}

.calendar-dropdown-header .calendar-nav-btn {
    padding: 0.4rem 0.6rem;
    background: var(--light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--slate);
    font-size: 0.85rem;
}

.calendar-dropdown-header .calendar-nav-btn:hover {
    background: var(--primary);
    color: white;
}

.calendar-dropdown-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.calendar-dropdown-weekdays div {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--slate);
    padding: 0.25rem;
}

.calendar-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-dropdown-day {
    padding: 0.6rem 0.4rem;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    background: white;
    border: 1px solid transparent;
}

.calendar-dropdown-day:hover:not(.disabled):not(.other-month) {
    background: rgba(0, 102, 255, 0.1);
    border-color: var(--primary);
}

.calendar-dropdown-day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-dropdown-day.other-month {
    color: #cbd5e1;
    opacity: 0.5;
}

.calendar-dropdown-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--light);
}

.availability-date-display {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.availability-legend {
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.availability-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--slate);
}

.availability-legend .legend-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.availability-legend .legend-indicator.available {
    background: white;
}

.availability-legend .legend-indicator.unavailable {
    background: #3B82F6;
}

.availability-legend .legend-indicator.blocked {
    background: #EF4444;
}

.availability-legend .legend-indicator.allowed {
    background: #10B981;
}

.availability-legend .legend-indicator.elapsed {
    background: #E5E7EB;
}

.availability-grid-container {
    flex: 1;
    overflow: auto;
    padding: 1.5rem 2rem;
    min-height: 0; /* Important for flex children to respect overflow */
    display: flex;
    flex-direction: column;
}

.availability-grid-wrapper {
    position: relative;
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.loading-availability {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--slate);
}

.loading-availability i {
    font-size: 2rem;
    color: var(--primary);
}

.no-availability {
    text-align: center;
    padding: 3rem;
    color: var(--slate);
}

.availability-grid {
    display: grid;
    grid-template-columns: 200px repeat(48, 1fr);
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: visible;
    background: white;
    min-width: max-content; /* Ensure grid doesn't shrink below content width */
}

.availability-grid-header {
    display: contents;
    background: #f8fafc;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 5;
}

.availability-court-header {
    grid-column: 1;
    padding: 1rem;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    left: 0;
    z-index: 6;
    font-weight: 600;
    color: var(--dark);
}

.availability-time-header {
    padding: 0.75rem 0.5rem;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
    white-space: nowrap;
}

.availability-court-row {
    display: contents;
}

.availability-court-name {
    grid-column: 1;
    padding: 1rem;
    background: white;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    left: 0;
    z-index: 4;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.availability-slot {
    min-width: 20px;
    height: 40px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.availability-slot.available {
    background: white;
}

.availability-slot.unavailable {
    background: #3B82F6;
}

.availability-slot.blocked {
    background: #EF4444;
}

.availability-slot.allowed {
    background: #10B981;
}

.availability-slot.elapsed {
    background: #E5E7EB;
}

.availability-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.btn-select-date {
    padding: 0.875rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-select-date:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
}

.btn-select-date:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 1200px) {
    .availability-grid {
        grid-template-columns: 180px repeat(48, 1fr);
    }
}

@media (max-width: 768px) {
    .availability-content {
        width: 98%;
        max-height: 95vh;
        padding: 0;
    }

    .availability-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .availability-header-right {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .availability-date-input {
        width: 100%;
    }

    .availability-grid {
        grid-template-columns: 150px repeat(24, 1fr);
        font-size: 0.8rem;
    }

    .availability-time-header {
        font-size: 0.65rem;
        padding: 0.5rem 0.25rem;
    }

    .availability-court-name,
    .availability-court-header {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .availability-slot {
        height: 35px;
        min-width: 15px;
    }
}
