/* ========================================================
   SmartBuy Trip Main Stylesheet
   ======================================================== */

* {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

.smartbuy-container {
    max-width: 1280px;
    margin: 28px auto 60px;
    padding: 0 20px;
}

/* ========================================================
   DESKTOP (>= 992px): Left-Docked Sticky Sidebar
   ======================================================== */
@media (min-width: 992px) {
    .smartbuy-layout {
        display: grid;
        grid-template-columns: 290px 1fr;
        gap: 28px;
        align-items: flex-start;
    }

    .smartbuy-sidebar {
        position: sticky;
        top: 20px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 20px;
        display: block !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .sidebar-header-title {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .sidebar-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 800;
        color: #0f172a;
    }

    .mobile-bottom-bar,
    .smartbuy-sort-modal,
    .sidebar-mobile-footer,
    .btn-sidebar-close,
    .smartbuy-drawer-overlay {
        display: none !important;
    }

    .desktop-sort-wrap {
        display: flex;
        align-items: center;
    }
}

/* Common Form & Filter Controls */
.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.filter-group {
    margin-bottom: 18px;
}

.filter-title {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 8px;
}

.search-input-wrap {
    display: flex;
    gap: 8px;
}

.filter-search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
}

.filter-search-input:focus {
    border-color: #2563eb;
    background: #ffffff;
}

.btn-filter-search {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
}

.highlight-box {
    background: #eff6ff;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
}

.radio-pills {
    display: flex;
    gap: 6px;
}

.radio-pills label {
    flex: 1;
    text-align: center;
}

.radio-pills input {
    display: none;
}

.radio-pills span {
    display: block;
    padding: 8px 6px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
}

.radio-pills input:checked + span {
    background: #2563eb;
    color: #ffffff;
}

.checkbox-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

/* Main Section Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.main-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}



/* ========================================================
   SmartBuy Navigation Bar Styles
   ======================================================== */
.smartbuy-navbar {
    background: #090e1f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.smartbuy-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.smartbuy-logo {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.smartbuy-logo span {
    color: #3b82f6;
}

.smartbuy-nav-tagline,
.smartbuy-nav-subtitle {
    font-size: 13px;
    color: #94a3b8;
}

.smartbuy-nav-actions,
.smartbuy-nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-link,
.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-item:hover,
.nav-link.active,
.nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.user-greeting,
.nav-user-name {
    font-size: 13px;
    color: #93c5fd;
    font-weight: 700;
}

.btn-nav-auth,
.nav-btn {
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-login,
.nav-btn-login {
    background: #2563eb;
    color: #ffffff !important;
}

.btn-login:hover,
.nav-btn-login:hover {
    background: #1d4ed8;
}

.btn-logout,
.nav-btn-logout {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-logout:hover,
.nav-btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
}

@media (max-width: 768px) {
    .smartbuy-nav-tagline,
    .smartbuy-nav-subtitle {
        display: none;
    }
    .smartbuy-navbar {
        padding: 12px 16px;
    }
}




/* ========================================================
   Card Theming with Solid Bank Tint
   ======================================================== */








.smartbuy-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        180deg, 
        color-mix(in srgb, var(--bank-color, #2563eb) 20%, #ffffff) 0%, 
        color-mix(in srgb, var(--bank-color, #2563eb) 10%, #ffffff) 100%
    );
    border: 1px solid color-mix(in srgb, var(--bank-color, #2563eb) 40%, #ffffff);
    border-top: 4px solid var(--bank-color, #2563eb);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.smartbuy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 24px -4px color-mix(in srgb, var(--bank-color, #2563eb) 35%, rgba(0, 0, 0, 0.2));
}

.card-head {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge-bank {
    background: var(--bank-color, #2563eb);
    color: #ffffff !important;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
}

.badge-ota {
    background: #ffffff;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    color: #090e1f;
    margin: 0 0 6px 0;
}

.card-discount {
    font-size: 16px;
    color: var(--bank-color, #090e1f);
    font-weight: 800;
    margin: 0 0 14px 0;
    filter: brightness(0.85);
}

.card-meta {
    font-size: 12px;
    color: #334155;
    background: #ffffff;
    border: 1px solid color-mix(in srgb, var(--bank-color, #2563eb) 30%, #cbd5e1);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.code-box {
    border: 2px dashed var(--bank-color, #64748b);
    border-radius: 8px;
    padding: 8px 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    cursor: copy;
}

.code-text {
    font-family: monospace !important;
    font-weight: 800;
    font-size: 13px;
    color: var(--bank-color, #0f172a);
    letter-spacing: 0.05em;
}

.btn-grab {
    flex: 1;
    background: var(--bank-color, #2563eb);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    padding: 10px;
}

/* ========================================================
   MOBILE & TABLETS (<= 991px): Bottom Bar & Modals
   ======================================================== */
@media (max-width: 991px) {
    .desktop-sort-wrap {
        display: none !important;
    }

    .smartbuy-layout {
        display: block !important;
        padding-bottom: 74px;
    }

    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 54px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        z-index: 9998;
    }

    .bottom-bar-btn {
        flex: 1;
        height: 100%;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 14px;
        font-weight: 700;
        color: #0f172a;
        cursor: pointer;
    }

    .bottom-bar-btn:active {
        background: #f1f5f9;
    }

    .bottom-bar-divider {
        width: 1px;
        height: 28px;
        background: #e2e8f0;
    }

    .sort-tag-pill {
        background: #fce7f3;
        color: #db2777;
        font-size: 11px;
        font-weight: 800;
        padding: 3px 8px;
        border-radius: 4px;
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .filter-badge-pill {
        background: #f43f5e;
        color: #ffffff;
        font-size: 11px;
        font-weight: 800;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .smartbuy-sidebar {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 10000;
        overflow-y: auto !important;
        padding: 0 0 80px 0 !important;
        display: none;
    }

    .smartbuy-sidebar.drawer-open {
        display: block !important;
    }

    .sidebar-header {
        position: sticky;
        top: 0;
        background: #0284c7;
        color: #ffffff;
        padding: 14px 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 10;
        margin: 0;
    }

    .sidebar-header-title {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .sidebar-header h3 {
        color: #ffffff;
        font-size: 17px;
        font-weight: 800;
        margin: 0;
    }

    .btn-sidebar-close {
        background: none;
        border: none;
        color: #ffffff;
        font-size: 20px;
        font-weight: 700;
        cursor: pointer;
        padding: 0;
    }

    .sidebar-header .btn-link {
        color: #ffffff;
        font-size: 13px;
    }

    .filter-group {
        padding: 0 18px;
        margin-bottom: 16px;
    }

    .filter-search-group {
        padding-top: 14px;
    }

    .sidebar-mobile-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        padding: 12px 18px;
        display: flex;
        justify-content: flex-end;
        z-index: 10;
    }

    .btn-apply-filters {
        background: #ea580c;
        color: #ffffff;
        border: none;
        border-radius: 6px;
        padding: 10px 24px;
        font-weight: 800;
        font-size: 13px;
        letter-spacing: 0.04em;
        cursor: pointer;
    }

    .smartbuy-sort-modal {
        position: fixed;
        bottom: 54px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
        z-index: 9999;
        display: none;
    }

    .smartbuy-sort-modal.modal-open {
        display: block;
    }

    .sort-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-bottom: 1px solid #f1f5f9;
        background: #f8fafc;
    }

    .sort-modal-header h4 {
        margin: 0;
        font-size: 14px;
        font-weight: 800;
        color: #0f172a;
    }

    .btn-sort-close {
        background: none;
        border: none;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
    }

    .sort-options-list {
        display: flex;
        flex-direction: column;
    }

    .sort-option {
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        color: #1e293b;
        display: flex;
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid #f8fafc;
        cursor: pointer;
    }

    .sort-option:hover {
        background: #eff6ff;
        color: #2563eb;
    }

    .deals-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast */
.smartbuy-toast {
    position: fixed;
    bottom: 64px;
    right: 20px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 99999;
}

.no-deals {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: #94a3b8;
    font-size: 14px;
}