/* =======================================================
   MAKRI TRAVEL - REZERVASYON SİSTEMİ (SEARCH.CSS)
   TEMEL: STYLE.CSS İLE BİREBİR AYNI GÖRÜNÜM
   ======================================================= */

/* 1. RESET VE TEMEL AYARLAR (STYLE.CSS'DEN ALINDI) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #006994;
    --primary-dark: #00507a;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --text: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* INPUT VE FORM ELEMANLARI (STYLE.CSS İLE AYNI) */
input,
select,
button,
textarea {
    font-family: 'Poppins', sans-serif;
    outline: none;
}

/* Container Yapısı */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =======================================================
   2. HEADER VE NAVİGASYON (GÖRÜNÜM KORUMASI İÇİN)
   ======================================================= */
.top-bar {
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a252f 100%);
    padding: 0;
    color: var(--white);
    border-bottom: 3px solid var(--primary);
    overflow: visible;
    position: relative;
    z-index: 90;
}

/* =======================================================
   Z-INDEX & STACKING FIX
   header-footer.css manages .main-header completely.
   search.css MUST NOT override .main-header rules.
   We only protect the header from generic .container
   overrides leaking in from search.css mobile queries.
   ======================================================= */

.search-header::before {
    display: none !important;
}

.search-header>.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 30px;
}

.search-summary {
    flex: 1;
    min-width: 0;
}

.search-summary h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}

.search-summary p {
    opacity: 0.75;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 0;
}

/* =======================================================
   3. REZERVASYON ADIMLARI (STEPPER)
   ======================================================= */
ul.booking-steps,
ul.booking-steps.desktop-only {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
    flex-wrap: nowrap;
}

.booking-steps li {
    position: relative;
    padding: 9px 18px 9px 32px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    transition: var(--transition);
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
    margin-right: -8px;
    flex: none;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    box-shadow: none;
}

.booking-steps li:first-child {
    padding-left: 18px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    border-radius: 6px 0 0 6px;
}

.booking-steps li:last-child {
    margin-right: 0;
    padding-right: 18px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
    border-radius: 0 6px 6px 0;
}

.booking-steps li.active {
    background: var(--accent);
    color: var(--white);
    z-index: 10;
    font-weight: 700;
    box-shadow: none;
}

.booking-steps li.completed {
    background: var(--primary);
    color: var(--white);
    z-index: 5;
}

.booking-steps .step-num {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 50%;
    font-size: 0.72rem;
    margin-right: 6px;
    font-weight: 800;
    line-height: 1;
}

.booking-steps li.active .step-num {
    background: rgba(255, 255, 255, 0.3) !important;
    color: var(--white) !important;
}

.booking-steps li.completed .step-num {
    background: rgba(255, 255, 255, 0.3) !important;
    color: var(--white) !important;
}

/* Yön Değiştirme Butonu */
.btn-swap-route {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 10px;
    font-size: 0.8rem;
}

.btn-swap-route:hover {
    background: var(--accent);
    color: var(--white);
}

/* =======================================================
   4. LAYOUT DÜZENİ
   ======================================================= */
.search-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.search-sidebar-left {
    width: 250px;
    flex-shrink: 0;
}

.search-results-area {
    flex: 1;
    min-width: 0;
}

.search-sidebar-right {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    z-index: 90;
}

/* =======================================================
   5. FİLTRE PANELİ (SOL)
   ======================================================= */
.filter-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    overflow: hidden;
}

.filter-header {
    background: var(--bg-light);
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.filter-body {
    padding: 15px;
}

.view-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.view-item:last-child {
    border: none;
    padding: 0;
    margin: 0;
}

.view-label {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.view-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
}

.btn-edit-toggle {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-edit-toggle:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Inputlar - STYLE.CSS'deki .input-icon-wrap mantığına uygun */
.form-label-sm {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: var(--secondary);
}

.form-control-sm {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #f9f9f9;
    color: var(--text);
}

.form-control-sm:focus {
    border-color: var(--primary);
    background: var(--white);
}

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-apply {
    flex: 2;
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-cancel {
    flex: 1;
    background: #eee;
    color: var(--text-light);
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

/* =======================================================
   6. BİLET KARTLARI (ORTA)
   ======================================================= */
.search-tabs {
    display: flex;
    background: var(--white);
    padding: 5px;
    border-radius: var(--radius);
    border: 1px solid #eee;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tab-btn.active {
    background: #eaf2f8;
    color: var(--primary);
}

.tab-status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ccc;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.tab-btn.completed .tab-status-icon {
    background: #27ae60;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Kart Tasarımı */
.ticket-card {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border: 1px solid #eee;
    transition: var(--transition);
    overflow: hidden;
}

.ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.ticket-card.selected {
    border: 2px solid var(--secondary);
    background: #fbfdff;
}

.ticket-main {
    flex: 1;
    padding: 20px;
    border-right: 1px dashed #e0e0e0;
}

.ticket-side {
    width: 180px;
    padding: 15px;
    background: #fcfcfc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ticket-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.time-big {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
}

.city-small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 4px;
}

.route-visual {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

.route-visual i {
    color: var(--primary);
    background: var(--white);
    padding: 0 5px;
    position: relative;
    z-index: 2;
}

.route-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #eee;
    z-index: 1;
}

.duration-badge {
    font-size: 0.75rem;
    background: var(--bg-light);
    color: var(--text-light);
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
}

.ship-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 6px;
}

.ship-tag {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feature-list i {
    color: #bdc3c7;
    margin-left: 5px;
    font-size: 0.85rem;
}

.feature-list i:hover {
    color: var(--primary);
}

.total-price-big {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
}

.btn-select {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-select:hover {
    background: var(--secondary);
    color: var(--white);
}

/* =======================================================
   7. SEPET (SAĞ)
   ======================================================= */
.cart-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    overflow: hidden;
}

.cart-header {
    background: var(--white);
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}

.cart-badge {
    background: var(--accent);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.cart-body {
    padding: 0;
    max-height: 350px;
    overflow-y: auto;
    background: #fbfbfb;
}

.cart-item-static {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    background: var(--white);
}

.cart-item-static:last-child {
    border-bottom: none;
}

.cart-route {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 3px;
}

.cart-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.cart-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.cart-price {
    font-weight: 700;
    color: var(--secondary);
}

.btn-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: #ffecec;
    color: var(--accent);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.cart-footer {
    padding: 15px;
    background: var(--white);
    border-top: 1px solid #eee;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.price-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.btn-checkout-static {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-checkout-static:hover {
    background: #d35400;
    transform: translateY(-2px);
}

.btn-checkout-static:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* =======================================================
   8. FORMLAR VE INPUTLAR (ÖNEMLİ: Style.css uyumu)
   ======================================================= */
.passenger-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid #eee;
    overflow: hidden;
}

.p-header {
    padding: 15px 20px;
    background: #fcfcfc;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    color: var(--secondary);
}

.p-body {
    padding: 20px;
}

/* Style.css'deki .input-icon-wrap gibi görünmesi için */
.form-label-custom {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
    display: block;
}

.form-control-custom {
    width: 100%;
    height: 45px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.form-control-custom:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 105, 148, 0.1);
}

.input-icon-wrap {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    padding: 0 15px;
    border-radius: 8px;
    height: 45px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.input-icon-wrap:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 105, 148, 0.1);
}

.input-icon-wrap input,
.input-icon-wrap select {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    height: 100%;
}

/* =======================================================
   9. ÖDEME VE KREDİ KARTI
   ======================================================= */
.credit-card-box {
    background: linear-gradient(135deg, #2c3e50 0%, #000 100%);
    border-radius: 12px;
    color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cc-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e295 50%, #d4af37 100%);
    border-radius: 5px;
    margin-bottom: 15px;
}

.cc-number {
    font-family: monospace;
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
}

.cc-holder,
.cc-expiry {
    font-family: monospace;
    text-transform: uppercase;
    font-size: 0.8rem;
    opacity: 0.8;
}

.cc-logo {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.5;
}

.payment-option-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.payment-option-card:hover {
    background: #f9f9f9;
}

.payment-option-card.active {
    border-color: #27ae60;
    background: #eafaf1;
}

.payment-option-card input {
    width: 16px;
    height: 16px;
    accent-color: #27ae60;
}

/* =======================================================
   10. RESPONSIVE (MOBİL)
   ======================================================= */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.m-bar-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
}

.btn-mobile-checkout {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
}

@media (max-width: 992px) {

    /* GLOBAL SAFEGUARDS */
    body,
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* =============================================
       HEADER PROTECTION — Do NOT let generic
       .container overrides leak into the header.
       header-footer.css owns .main-header layout.
       ============================================= */
    .main-header,
    .main-header .container,
    .main-header .header-flex,
    .main-header nav {
        overflow: visible !important;
    }

    .main-header .container,
    .main-header .header-flex {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Hamburger must be clickable above everything */
    .main-header .menu-toggle {
        position: relative;
        z-index: 1002;
        pointer-events: auto !important;
    }

    /* Nav links panel (curtain) must be able to expand */
    .main-header .nav-links {
        z-index: 999;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only-hide {
        display: none !important;
    }

    /* HEADER COMPACTING */
    .search-header {
        padding: 5px 0;
    }

    .search-header>.container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding-top: 10px;
        padding-bottom: 0px;
        /* Reduced to fit better */
    }

    .search-summary h1 {
        font-size: 1.1rem;
        white-space: normal;
        line-height: 1.3;
        margin-bottom: 0;
    }

    .search-summary p {
        justify-content: center;
        font-size: 0.75rem;
        gap: 8px;
        opacity: 0.8;
    }

    /* LAYOUT - Ensure nothing breaks out */
    .search-layout {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }

    .search-sidebar-left,
    .search-sidebar-right {
        width: 100%;
        position: static;
    }

    /* MOBILE FILTER - BOTTOM SHEET (OFF-CANVAS) */
    .search-sidebar-left {
        display: block !important;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2001;
        background: #fff;
        border-radius: 20px 20px 0 0;
        width: 100%;
        height: 85vh;
        max-height: 85vh;
        margin: 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        visibility: hidden;
        pointer-events: none;
    }

    .search-sidebar-left.active {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .filter-card {
        height: 100%;
        border-radius: 20px 20px 0 0;
        border: none;
        display: flex;
        flex-direction: column;
        box-shadow: none;
        background: #fff;
    }

    .filter-header {
        border-radius: 20px 20px 0 0;
        padding: 15px 20px;
        font-size: 1rem;
        justify-content: space-between;
        background: #fff;
        border-bottom: 1px solid #eee;
    }

    .filter-body {
        overflow-y: auto;
        flex: 1;
        padding: 20px;
        padding-bottom: 60px;
        /* More safe area */
        -webkit-overflow-scrolling: touch;
    }

    /* Filter Close Button */
    .btn-filter-close {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #f1f1f1;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border: none;
        font-size: 1rem;
    }

    /* MOBILE OVERLAY BACKDROP */
    .mobile-filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        pointer-events: none;
    }

    .mobile-filter-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* GLOBAL SAFEGUARDS */
    body,
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

    .container {
        padding-left: 5px !important;
        /* Maximize width */
        padding-right: 5px !important;
        max-width: 100%;
        overflow-x: hidden;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .col-lg-7,
    .col-lg-5 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
    }

    /* ... */

    /* FIX TAB CONTENT FIT - NUCLEAR OPTION */
    #tab-content-out,
    #tab-content-ret,
    .tab-content {
        width: 100% !important;
        max-width: 100vw !important;
        /* Force viewpoint width */
        overflow-x: hidden !important;
        padding-bottom: 10px !important;
        /* Reduced for gap fix */
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .search-results-area {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Ensure page bottom has space for fixed bar */
    .section-padding {
        padding-bottom: 80px !important;
    }

    /* MOBILE TICKET CARD OPTIMIZATION (Fit everything) */
    .ticket-card {
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        /* Optional: square edges to maximize space */
        border-left: none !important;
        border-right: none !important;
    }

    .ticket-main {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 15px 12px;
        width: 100%;
    }

    .ticket-row-top {
        margin-bottom: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .time-group {
        text-align: center;
        flex: 1;
    }

    .time-big {
        font-size: 1.4rem;
        color: var(--secondary);
        font-weight: 800;
    }

    .city-small {
        font-size: 0.75rem;
        color: #7f8c8d;
        font-weight: 600;
        text-transform: uppercase;
    }

    .route-visual {
        padding: 0 5px;
        min-width: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .duration-badge {
        font-size: 0.7rem;
        background: #f0f0f0;
        padding: 2px 8px;
        border-radius: 10px;
        margin-top: 4px;
        color: #555;
    }

    .ship-info-bar {
        display: flex !important;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
        /* Spread items */
        align-items: center;
        background: #f9f9f9;
        padding: 8px 10px;
        border-radius: 6px;
        margin-top: 5px;
    }

    .ship-tag {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--secondary);
    }

    .feature-list {
        display: flex;
        gap: 8px;
    }

    .feature-item {
        color: #bdc3c7;
        font-size: 0.9rem;
    }

    .ticket-side {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
        background: #fff;
        /* White background for clean look */
        align-items: center;
        gap: 10px;
        border-top: none;
    }

    .ticket-side>div:first-child {
        display: block !important;
        /* SHOW BREAKDOWN (User wanted features/details) */
        font-size: 0.7rem;
        color: #999;
        text-align: left;
    }

    .total-price-big {
        font-size: 1.3rem;
        font-weight: 800;
        color: var(--secondary);
    }

    .btn-select {
        width: auto;
        min-width: 100px;
        padding: 10px 20px;
        font-size: 0.9rem;
        background: var(--secondary);
        color: #fff;
        border: none;
        border-radius: 6px;
        font-weight: 700;
    }

    .col-lg-7,
    .col-lg-5 {
        width: 100%;
        padding: 0;
    }

    /* Fix Tab Buttons Overflow - SQUEEZE, NO SCROLL */
    .search-tabs {
        width: 100%;
        overflow: hidden;
        /* No scroll */
        display: flex;
        flex-wrap: nowrap;
        gap: 0;
        border-radius: 8px;
        /* Slightly tighter radius */
        background: #eaf2f8;
        /* Unified background */
        padding: 4px;
    }

    .tab-btn {
        flex: 1;
        min-width: 0;
        /* Allows shrinking */
        padding: 10px 5px;
        /* Reduced padding */
        font-size: 0.8rem;
        /* Smaller text */
        gap: 5px;
        white-space: nowrap;
        justify-content: center;
        border-radius: 6px;
    }

    .tab-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tab-status-icon {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        /* Smaller icon */
    }

    /* MOBILE STEPS (RESTORED & FITTED) */
    ul.booking-steps,
    ul.booking-steps.desktop-only {
        display: flex !important;
        width: 100%;
        margin-top: 5px;
        margin-bottom: 5px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        overflow: hidden;
        padding: 0;
    }

    .booking-steps li {
        flex: 1;
        min-width: 0;
        /* Forces equality even with long text */
        padding: 6px 2px !important;
        margin: 0 !important;
        font-size: 0.65rem !important;
        /* compact */
        justify-content: center;
        text-align: center;
        clip-path: none !important;
        /* Remove arrow shape */
        border-radius: 0 !important;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
        /* subtle separator */
        height: auto;
        white-space: nowrap;
    }

    .booking-steps li:last-child {
        border-right: none;
    }

    .booking-steps li.active {
        background: var(--accent);
        color: #fff;
        font-weight: 700;
    }

    .booking-steps li.completed {
        background: var(--primary);
        color: #fff;
    }

    .booking-steps .step-num {
        display: none !important;
        /* Hide number icon on mobile */
    }
}

@media (max-width: 380px) {

    /* iPhone SE / Small Android */
    .time-big {
        font-size: 1.1rem;
    }

    .ticket-side {
        padding: 10px;
    }

    .total-price-big {
        font-size: 1.1rem;
    }

    .btn-select {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .search-summary h1 {
        font-size: 1rem;
    }

    .tab-btn {
        font-size: 0.75rem;
    }
}

@media (max-width: 992px) {

    /* SAFARI & MOBILE INPUT FIXES (Date/Text/Number) */
    input[type="date"],
    input[type="number"],
    input[type="text"],
    select,
    .form-control-sm,
    .pax-box input {
        appearance: none !important;
        -webkit-appearance: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        background-color: #f9f9f9;
        border: 1px solid #e1e1e1;
        border-radius: 6px;
        padding: 10px !important;
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
        margin: 0 !important;
        min-width: 0 !important;
        line-height: normal !important;
    }

    /* Pax Grid Fix (Side by Side) */
    .pax-grid {
        display: flex;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .pax-box {
        flex: 1;
        min-width: 0;
    }

    /* Ensure label doesn't break layout */
    .form-label-sm {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
        width: 100%;
    }
}