/* =========================================
   ATÖLYESEL - BOOKING CSS V5.1 (TEMİZLENDİ VE MOBİL OPTİMİZE EDİLDİ)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-main: #f4f7fa; 
    --white: #ffffff;
    --primary: #c69d4e;
    --primary-dark: #dc2626;
    --primary-light: #fef2f2;
    --ink-dark: #111827;
    --ink-main: #374151;
    --ink-light: #6b7280;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
    --shadow-float: 0 20px 40px -10px rgba(0,0,0,0.08);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font: 'Inter', sans-serif;
}

/* Zorunlu Evrensel Kurallar (Taşmayı Önler) */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body { background: var(--bg-main); font-family: var(--font); color: var(--ink-main); margin: 0; }
.booking-page-container { padding: 40px 0 100px 0; }

/* ─── 1. ARAMA WIDGET ─── */
.booking-widget-wrapper { margin: 0 auto 40px; max-width: 1250px; padding: 0 20px; }
.booking-widget { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 8px; }
.widget-form { display: grid; grid-template-columns: 2fr 1fr auto; padding: 16px; gap: 20px; align-items: flex-end; }
.input-wrapper label { display: block; font-size: 11px; font-weight: 700; color: var(--ink-light); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.widget-input { width: 100%; padding: 14px 16px; border: 2px solid var(--border-light); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--ink-dark); background: var(--border-light); transition: 0.3s; font-family: var(--font); }
.widget-input:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 4px var(--primary-light); }
.btn-search { height: 52px; padding: 0 32px; background: var(--primary); color: var(--white); border: none; border-radius: var(--radius-sm); font-weight: 800; font-size: 15px; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
.btn-search:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3); }

/* ─── 2. ÜÇ SÜTUNLU ANA YAPI ─── */
.booking-wrapper { display: grid; grid-template-columns: 1fr 340px 320px; gap: 32px; max-width: 1300px; margin: 0 auto; padding: 0 20px; }

/* ─── 3. TARİH ŞERİDİ (DATE STRIP) ─── */
.date-strip-container { display: flex; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 24px; overflow: hidden; padding: 8px; }
.date-nav { width: 48px; border: none; background: transparent; cursor: pointer; color: var(--ink-light); font-size: 18px; border-radius: var(--radius-sm); transition: 0.2s; }
.date-nav:hover { background: var(--border-light); color: var(--ink-dark); }
.date-strip { display: flex; flex: 1; gap: 4px; }
.ds-item { flex: 1; padding: 12px 4px; text-align: center; border-radius: var(--radius-sm); cursor: pointer; transition: 0.3s; border: 2px solid transparent; }
.ds-item:hover:not(.disabled) { background: var(--border-light); }
.ds-item.active { background: var(--ink-dark); color: var(--white); box-shadow: var(--shadow-md); }
.ds-daynum { display: block; font-size: 22px; font-weight: 900; margin: 4px 0; }
.ds-dayname, .ds-month { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.ds-item.active .ds-dayname, .ds-item.active .ds-month { opacity: 1; color: #cbd5e1; }

/* ─── 4. BİLET KARTLARI (TICKETS) ─── */
.ticket-list { display: flex; flex-direction: column; gap: 16px; }
.ticket-card { display: flex; background: var(--white); border: 2px solid transparent; border-radius: var(--radius-md); cursor: pointer; transition: 0.3s; box-shadow: var(--shadow-sm); }
.ticket-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ticket-card.selected { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-md); }
.tc-time-col { padding: 24px; border-right: 2px dashed var(--border-light); min-width: 130px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.tc-time { font-size: 28px; font-weight: 900; color: var(--ink-dark); letter-spacing: -1px; }
.tc-duration { font-size: 12px; font-weight: 600; color: var(--ink-light); margin-top: 4px; }
.tc-info-col { padding: 24px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tc-title { margin: 0 0 12px 0; font-size: 18px; font-weight: 800; color: var(--ink-dark); }
.tc-price-col { padding: 24px; text-align: right; min-width: 150px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.tc-price { font-size: 24px; font-weight: 900; margin-bottom: 12px; color: var(--ink-dark); letter-spacing: -0.5px; }
.btn-select-ticket { background: var(--primary); color: var(--white); border: none; padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 800; cursor: pointer; transition: 0.2s; }
.ticket-card.selected .btn-select-ticket { background: var(--ink-dark); }
.ticket-card.sold-out { opacity: 0.5; filter: grayscale(1); cursor: not-allowed; }
.ticket-card.sold-out:hover { transform: none; box-shadow: var(--shadow-sm); }

/* ─── 5. REZERVASYON ÖZETİ (ORTA SÜTUN) ─── */
.sticky-card { position: sticky; top: 32px; }
.b-card { background: var(--white); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); }
.empty-cart-state { text-align: center; padding: 40px 0; color: var(--ink-light); }
.empty-cart-state .icon { font-size: 48px; opacity: 0.5; margin-bottom: 16px; display: block;}
.b-header { margin-bottom: 24px; text-align: center; }
.b-header h2 { font-size: 20px; font-weight: 900; margin: 0; color: var(--ink-dark); }
.ticket-summary { background: var(--border-light); padding: 20px; border-radius: var(--radius-md); margin-bottom: 24px; }
.ts-row { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center; }
.ts-row:last-child { margin-bottom: 0; }
.ts-label { font-size: 13px; font-weight: 600; color: var(--ink-light); }
.ts-val { font-size: 14px; font-weight: 800; color: var(--ink-dark); text-align: right; }
.price-band { background: var(--ink-dark); color: var(--white); padding: 24px; border-radius: var(--radius-md); text-align: center; margin-bottom: 24px; box-shadow: 0 10px 20px rgba(17, 24, 39, 0.15); }
.price-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
.t-total-val { font-size: 36px; font-weight: 900; margin-top: 8px; letter-spacing: -1px;}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-light); margin-bottom: 8px; text-transform: uppercase;}
.p-input { width: 100%; padding: 14px 16px; border: 2px solid var(--border-light); border-radius: var(--radius-sm); font-family: var(--font); font-size: 15px; font-weight: 500; transition: 0.3s; background: #fcfcfc; box-sizing: border-box; }
.p-input:focus { outline: none; border-color: var(--ink-dark); background: var(--white); }
.btn-premium { width: 100%; background: var(--primary); color: var(--white); padding: 16px; border: none; border-radius: var(--radius-sm); font-weight: 800; font-size: 16px; cursor: pointer; transition: 0.3s; margin-top: 8px; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25); }
.btn-premium:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 15px rgba(239, 68, 68, 0.35); }

/* ─── 6. BÜYÜK ÜRÜN VİTRİNİ (SAĞ SÜTUN) ─── */
.booking-products-col { position: sticky; top: 32px; }
.large-store-card { background: transparent; }
.ls-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; color: var(--ink-main); display: flex; align-items: center; gap: 12px; }
.ls-title::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.ls-grid { display: flex; flex-direction: column; gap: 24px; }
.ls-item { text-decoration: none; display: block; }
.ls-img-box { position: relative; width: 100%; height: 240px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-md); }
.ls-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.ls-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 24px; opacity: 0; transition: 0.3s; }
.ls-overlay span { background: var(--white); color: var(--ink-dark); padding: 8px 20px; border-radius: 30px; font-size: 13px; font-weight: 800; transform: translateY(10px); transition: 0.3s; }
.ls-item:hover .ls-img-box img { transform: scale(1.05); }
.ls-item:hover .ls-overlay { opacity: 1; }
.ls-item:hover .ls-overlay span { transform: translateY(0); }
.ls-info { text-align: left; padding: 0 4px; }
.ls-name { display: block; font-size: 15px; font-weight: 700; color: var(--ink-dark); margin-bottom: 4px; }
.ls-price { display: inline-block; font-size: 14px; font-weight: 800; color: var(--primary); background: var(--primary-light); padding: 4px 10px; border-radius: 6px; }
.ls-all-link { display: block; text-align: center; margin-top: 32px; padding: 16px; border: 2px dashed var(--border); border-radius: var(--radius-md); font-size: 14px; font-weight: 800; color: var(--ink-light); text-decoration: none; transition: 0.2s; }
.ls-all-link:hover { border-color: var(--ink-main); color: var(--ink-main); background: var(--white); }

/* ─── 7. MOBİL UYUM ─── */
@media (max-width: 1200px) {
    .booking-wrapper { grid-template-columns: minmax(0, 1fr) 340px; }
    .booking-products-col { grid-column: span 2; position: static; margin-top: 20px; }
    .ls-grid { flex-direction: row; flex-wrap: wrap; }
    .ls-item { width: calc(50% - 12px); }
}

@media (max-width: 900px) {
    .widget-form { grid-template-columns: 1fr 1fr; }
    .input-btn { grid-column: span 2; }
}

@media (max-width: 768px) {
    /* Kapsayıcı Taşması (Grid Blowout) Kesin Çözümü */
    .booking-wrapper { 
        grid-template-columns: minmax(0, 1fr); 
        gap: 20px; 
        width: 100%;
        overflow: hidden;
    }
    .booking-products-col { grid-column: span 1; }
    
    .widget-form { 
        grid-template-columns: minmax(0, 1fr); 
        padding: 16px !important; 
        gap: 12px !important; 
    }
    .input-btn { grid-column: span 1; }
    .widget-input { height: 46px !important; padding: 8px 12px !important; font-size: 13px !important; }
    .btn-search { height: 46px !important; font-size: 14px !important; }
    .input-wrapper label { margin-bottom: 4px !important; font-size: 10px !important; }

    /* Takvim Şeridi Taşma Önlemleri */
    .date-strip-container { padding: 4px; width: 100%; }
    .date-nav { width: 32px; font-size: 14px; flex-shrink: 0; }
    .date-strip { 
        overflow-x: auto; 
        scroll-behavior: smooth; 
        scrollbar-width: none; 
        min-width: 0; /* Flex alt elemanının ekranı itmesini kesin olarak engeller */
    }
    .date-strip::-webkit-scrollbar { display: none; }
    .ds-item { min-width: 50px; padding: 8px 4px; }
    .ds-daynum { font-size: 16px; margin: 2px 0; }
    .ds-dayname, .ds-month { font-size: 9px; }

    .ticket-card { flex-direction: column; }
    .tc-time-col { border-right: none; border-bottom: 2px dashed var(--border-light); flex-direction: row; justify-content: space-between; align-items: center; padding: 16px; }
    .tc-price-col { flex-direction: row; justify-content: space-between; align-items: center; padding: 16px; }
    .tc-price { margin-bottom: 0; }
    
    .b-card { padding: 20px; }
    .p-input { padding: 12px 14px; font-size: 13px; }
    .btn-premium { padding: 14px; font-size: 14px; }
    
    .ls-item { width: 100%; }
}

/* ─── 8. EKSİK OLAN OTP MODAL KODLARI ─── */
.otp-modal-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(17, 24, 39, 0.85); 
    backdrop-filter: blur(8px); 
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999; 
}
.otp-modal-content { 
    background: var(--white); 
    padding: 40px; 
    border-radius: var(--radius-lg); 
    width: 90%; 
    max-width: 420px; 
    text-align: center; 
    box-shadow: var(--shadow-float); 
}
.otp-modal-content h3 {
    font-size: 24px;
    font-weight: 900;
    color: var(--ink-dark);
    margin: 0 0 8px 0;
}
.otp-desc {
    font-size: 14px;
    color: var(--ink-light);
    margin-bottom: 24px;
}
.otp-input { 
    width: 100%; 
    font-size: 32px; 
    text-align: center; 
    letter-spacing: 16px; 
    padding: 16px; 
    margin-bottom: 16px; 
    border: 2px solid var(--border); 
    border-radius: var(--radius-md); 
    font-weight: 900; 
    color: var(--ink-dark); 
    outline: none; 
    transition: 0.3s;
    box-sizing: border-box;
}
.otp-input:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px var(--primary-light); 
}
.otp-error { 
    color: var(--primary); 
    font-size: 13px; 
    font-weight: 700; 
    margin-bottom: 16px; 
    display: none;
}
.btn-cancel { 
    background: none; 
    border: none; 
    color: var(--ink-light); 
    font-weight: 700; 
    font-size: 14px;
    margin-top: 20px; 
    cursor: pointer; 
    transition: 0.2s;
}
.btn-cancel:hover { color: var(--ink-dark); text-decoration: underline; }

/* Utilities */
.loading-state, .empty-state { padding: 60px 20px; text-align: center; color: var(--ink-light); font-weight: 600; background: var(--white); border-radius: var(--radius-md); border: 2px dashed var(--border); }
.badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }