/* Promotion Section - Standalone Stylesheet */
/* SHARED across all platforms: Klook, Agoda, Booking, Traveloka */
/* Base styles + Promotion-specific styles */

/* ========================================
   BASE STYLES (from credit-card-style.css)
   ======================================== */

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

html {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #2d1b69 25%, #4c1d95 50%, #6b21a8 75%, #ec4899 100%);
    min-height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: clip;
    width: 100%;
    position: relative;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
    overflow-x: clip;
    display: block;
}

/* ========================================
   MENU BAR STYLES
   ======================================== */

.menu-bar {
    background: rgba(30, 27, 75, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(139, 92, 246, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

/* Smart Menu Animation */
.menu-bar.menu-hidden {
    transform: translateY(-100%);
}

.menu-bar.menu-visible {
    transform: translateY(0);
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.menu-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.menu-item {
    margin: 0;
    padding: 0;
}

.menu-item a {
    display: block;
    padding: 18px 30px;
    color: #f8fafc;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.menu-item a:hover {
    color: #f472b6;
    background: rgba(139, 92, 246, 0.2);
    border-bottom-color: #f472b6;
}

.menu-item.active a {
    color: #f472b6;
    border-bottom-color: #f472b6;
    font-weight: 600;
}

#menuLoadingMessage {
    padding: 18px 30px;
    color: #9ca3af;
    font-size: 0.95em;
}

/* ========================================
   HEADER SECTION
   ======================================== */

.header {
    background: white;
    color: #1f2937;
    padding: 50px 30px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #8b5cf6;
    font-weight: bold;
}

.header p {
    font-size: 1.2em;
    color: #4b5563;
    line-height: 1.8;
    margin: 10px 0;
}

.section-title {
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    color: #1f2937;
    margin-bottom: 20px;
}

/* ========================================
   BUTTON STYLES (Apply Now / Promo Code Button)
   ======================================== */

.promo-btn,
.apply-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.promo-btn:hover,
.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.search-section {
    background: white;
    padding: 40px 50px;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #e5e7eb;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-description {
    text-align: center;
    margin-bottom: 30px;
    color: #4b5563;
    font-size: 1.1em;
    line-height: 1.8;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1em;
}

.form-group select {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.search-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

.clear-btn {
    background: white;
    color: #6b7280;
    padding: 12px 30px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* ========================================
   MAIN CONTENT LAYOUT (Filter + Results)
   ======================================== */

.lounge-content {
    display: flex;
    gap: 30px;
    padding: 40px 60px;
    background: white;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* ========================================
   FILTER SIDEBAR (Desktop/Tablet)
   ======================================== */

.filter-sidebar {
    flex: 0 0 280px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 25px;
    position: sticky;
    top: 90px;
    border: 1px solid #e5e7eb;
    align-self: flex-start;
}

.filter-sidebar-header h3 {
    font-size: 1.3em;
    color: #1f2937;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-title {
    font-size: 1em;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.filter-option:hover {
    background: white;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8b5cf6;
}

.filter-option label {
    cursor: pointer;
    flex: 1;
    font-size: 0.95em;
    color: #4b5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-count-badge {
    background: #e5e7eb;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

/* ========================================
   FILTER MOBILE (Sticky Bar + Panel)
   ======================================== */

.filter-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0; /* Sticky footer at bottom */
    left: 0;
    right: 0;
    width: 100%;
    height: 70px; /* Fixed height */
    background: white;
    padding: 15px;
    border-top: 1px solid #e5e7eb; /* Border at top instead of bottom */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); /* Shadow upward */
    z-index: 1000; /* Above other content */
    transform: translateY(0); /* Start visible */
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.filter-mobile-bar.visible {
    transform: translateY(0) !important;
}

.filter-mobile-bar-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-toggle-btn-mobile {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 48px;
    box-sizing: border-box;
}

.sort-select-mobile {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #8b5cf6;
    border-radius: 8px;
    font-size: 1em;
    color: #1f2937;
    background: white;
    cursor: pointer;
    font-weight: 600;
    height: 48px;
    box-sizing: border-box;
}

.filter-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.9em;
}

.filter-mobile-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    overflow-y: auto;
}

.filter-mobile-panel.active {
    display: flex;
    flex-direction: column;
}

.filter-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.filter-mobile-header h3 {
    font-size: 1.3em;
    color: #1f2937;
}

.filter-mobile-close {
    background: none;
    border: none;
    font-size: 2em;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-mobile-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.filter-mobile-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.filter-mobile-apply {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   RESULTS SECTION
   ======================================== */

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 15px;
}

.results-count {
    font-size: 1.2em;
    color: #1f2937;
    font-weight: 600;
}

.results-count span {
    color: #8b5cf6;
    font-size: 1.3em;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-container label {
    font-weight: 600;
    color: #1f2937;
}

.sort-container select {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* ========================================
   RESULT CARD (3-PART STRUCTURE)
   ======================================== */

.result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

/* Part 1: Image Section (matching airport-lounge) */
.result-card-part1 {
    text-align: center;
    padding: 5px 0;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.result-card-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

.result-card-image-container {
    width: 100%;
}

.result-card-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover;
}

/* Part 2: Details Grid (matching airport-lounge structure) */
.result-card-part2 {
    padding: 30px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.promo-details-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px 25px;
    font-size: 0.95em;
}

.promo-detail-label {
    font-weight: 600;
    color: #374151;
}

.promo-detail-value {
    color: #1f2937;
    white-space: pre-line;
}

.promo-detail-value.highlight {
    color: #8b5cf6;
    font-weight: 600;
}

.promo-detail-value a {
    color: #8b5cf6;
    text-decoration: underline;
    margin-left: 5px;
}

.promo-detail-value a:hover {
    color: #6b21a8;
}

/* Part 3: Button Section (matching airport-lounge) */
.result-card-part3 {
    padding: 30px 0;
    background: #f9fafb;
}

.result-card-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 10px;
}

/* Total click count (social proof) */
.totalclick-count {
    font-size: 0.9em;
    color: #8b5cf6;
    font-weight: 500;
    text-align: center;
    margin-bottom: 0px;
}

.card-disclaimer {
    margin-top: 0px;
    font-size: 0.85em;
    color: #6b7280;
    line-height: 1.6;
    text-align: center;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #6b7280;
    font-size: 1.1em;
}

/* Loading & Empty States */
.loading-message,
.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2em;
    color: #6b7280;
}

.loading-message {
    color: #8b5cf6;
}

.no-results-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.8em;
    color: #1f2937;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 1.1em;
    color: #6b7280;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    padding: 10px 20px;
    color: #6b7280;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

@media (max-width: 767px) {
    html, body {
        font-size: 14px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 1em;
    }

    /* Menu Bar Mobile */
    .menu-container {
        padding: 5px 10px;
    }

    .menu-items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .menu-item {
        width: 100%;
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 8px;
        background: rgba(45, 27, 105, 0.7);
    }

    .menu-item a {
        padding: 12px 10px;
        text-align: center;
        border-bottom: none;
        font-size: 0.9em;
    }

    /* Search Section Mobile */
    .search-section {
        padding: 30px 20px;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-buttons {
        flex-direction: column;
    }

    .search-btn,
    .clear-btn {
        width: 100%;
        padding: 12px 30px;
        font-size: 1em;
    }

    /* Filter & Results Layout Mobile */
    .lounge-content {
        flex-direction: column;
        padding: 0;
    }

    /* Hide desktop sidebar, show mobile filter */
    .filter-sidebar {
        display: none !important;
    }

    .filter-mobile-bar {
        display: block !important;
    }

    /* Results Section Mobile */
    .results-section {
        padding: 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-count {
        font-size: 1.1em;
    }

    .sort-container {
        width: 100%;
    }

    .sort-container select {
        flex: 1;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-title {
        font-size: 1.1em;
    }

    .card-details-section {
        padding: 20px;
    }

    .details-label,
    .details-value {
        padding: 10px 0;
        font-size: 0.95em;
    }

    .card-button-section {
        padding: 20px;
    }

    .promo-btn {
        width: 100%;
        padding: 15px 30px;
        font-size: 1.1em;
    }

    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        font-size: 0.9em;
    }
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */

@media (min-width: 768px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }

    .header {
        padding: 40px 30px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .menu-item a {
        padding: 16px 20px;
        font-size: 0.95em;
    }

    .search-section {
        padding: 40px 30px;
    }

    .search-form {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Filter & Results Layout Tablet */
    .lounge-content {
        padding: 20px;
        gap: 20px;
    }

    .filter-sidebar {
        flex: 0 0 240px;
        padding: 20px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - DESKTOP
   ======================================== */

@media (min-width: 1025px) {
    body {
        font-size: 16px;
    }

    .header {
        padding: 50px 40px;
    }

    .search-section {
        padding: 50px 50px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .header h1 {
        font-size: 3em;
    }

    .header p {
        font-size: 1.3em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .search-section {
        padding: 50px 80px;
    }
}

/* Extra Large Desktop (2K, 4K) */
@media (min-width: 1920px) {
    .header {
        padding: 60px 100px;
    }

    .header h1 {
        font-size: 3.5em;
    }

    .header p {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .search-section {
        padding: 60px 100px;
    }
}

/* ========================================
   COPY TOAST NOTIFICATION
   ======================================== */

.copy-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    white-space: nowrap;
    pointer-events: none;
}

.copy-toast.show {
    bottom: 40px;
    animation: toast-bounce 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes toast-bounce {
    0% {
        bottom: -100px;
        transform: translateX(-50%) scale(0.8);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        bottom: 40px;
        transform: translateX(-50%) scale(1);
    }
}

/* Mobile responsive toast */
@media (max-width: 767px) {
    .copy-toast {
        padding: 14px 24px;
        font-size: 0.9em;
        max-width: 90%;
        text-align: center;
    }

    .copy-toast.show {
        bottom: 30px;
    }
}
