/* --- Base Variables & Setup --- */
:root {
    --bg-color: #050505;
    --card-bg: #141414;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ff3b30; /* iOS style red accent */
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
}

/* Constrain width for desktop to look like a mobile app */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh; /* Fallback for older phones */
    height: 100dvh; /* THE FIX: Dynamic height prevents it from going under the screen */
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color);
}

/* --- Glassmorphism Header --- */
.glass-header {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    color: var(--text-secondary);
    font-weight: 400;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Main Feed & Cards --- */
.feed {
    height: 100vh;
    height: 100dvh; /* THE FIX: Match the app container */
    overflow-y: scroll;
    padding: 80px 0 130px 0; /* THE FIX: Increased bottom padding to 130px so content can clear the footer */
    scroll-snap-type: y mandatory; /* TikTok style snapping */
}

/* Hide scrollbar for a cleaner look */
.feed::-webkit-scrollbar {
    display: none;
}

.property-card {
    width: 100%;
    height: calc(100vh - 170px);
    scroll-snap-align: center; 
    scroll-snap-stop: always; /* THE FIX: Forces the scroll to stop exactly on this video */
    position: relative;
    padding: 10px;
    margin-bottom: 15px;
}

.media-container {
    width: 100%;
    height: 80%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.property-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
}



/* --- Floating Bottom Nav --- */
.bottom-nav {
    position: absolute;
    /* THE FIX: Automatically lifts the footer above the iPhone Home Bar! */
    bottom: max(25px, env(safe-area-inset-bottom)); 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 100;
}

.nav-item {
    color: var(--text-secondary);
    font-size: 1.6rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: var(--text-primary);
}




/* --- Fix Label Spacing --- */
.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block; /* Ensure it takes its own line */
    font-size: 0.75rem;
    margin-bottom: 12px; /* INCREASED: Gives breathing room above the pills */
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* --- Shrink the Pills --- */
.filter-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 8px 14px; /* SHRUNK: Smaller touch targets */
    border-radius: 20px; /* Adjusted curve to match new size */
    font-size: 0.8rem; /* SHRUNK: Smaller text */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Active state for the new smaller pills */
.filter-tag.active {
    background: #ffffff;
    color: #000000;
    font-weight: 700;
    border-color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}



.filter-overlay.active .filter-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* --- Filter Header & Premium Close Button --- */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1); /* Frosted transparent background */
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%; /* Forces the perfect circle */
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-btn:active {
    background: rgba(255, 255, 255, 0.2); /* Slightly lighter when pressed */
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.range-display {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.filter-tag {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.apply-btn {
    padding: 16px;
    font-size: 1rem;
    margin-top: 5px;
}

/* --- Premium Dynamic Slider --- */
.range-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.price-slider {
    -webkit-appearance: none;  /* For Chrome, Safari, Edge, Opera */
    appearance: none;          /* The official standard */
    width: 100%;               /* Your other styles here... */

    height: 8px;
    background: rgba(255, 255, 255, 0.1); /* Subtle track */
    border-radius: 10px;
    outline: none;
}

/* The Slider 'Thumb' (The draggable circle) */
.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 -2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s;
}

.price-slider::-webkit-slider-thumb:active {
    transform: scale(1.1); /* Slightly enlarge when dragging */
}

/* --- Filter Pills (Tags) Layout --- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap; /* Allows them to drop to the next line if they run out of space */
    gap: 10px;
}

.filter-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tag:active { transform: scale(0.95); }

.filter-tag.active {
    background: rgba(245, 178, 54, 0.15);
    color: #f5b236;
    border-color: rgba(245, 178, 54, 0.5);
}

/* --- Massive iOS Style Button --- */
.apply-btn {
    width: 100%;
    background: var(--text-primary); /* High contrast white */
    color: #000000;
    border: none;
    padding: 20px;
    border-radius: 25px;
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 15px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
    transition: transform 0.2s;
}

.apply-btn:active {
    transform: scale(0.96);
}














/* Premium Minimalist Mute Toggle */
.mute-toggle {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}













/* 1. Prevent long-press "Save Video" menu & text highlighting */
.media-container {
    -webkit-touch-callout: none; /* Blocks iOS long-press menu */
    -webkit-user-select: none;   
    user-select: none;           
}

/* 2. The +10s / -10s Visual Feedback */
.seek-ripple {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none; /* Ensures it doesn't block future taps */
    opacity: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: rippleFade 0.6s ease-out forwards;
}

@keyframes rippleFade {
    0% { opacity: 1; transform: translateY(-50%) scale(0.9); }
    30% { opacity: 1; transform: translateY(-50%) scale(1.1); }
    100% { opacity: 0; transform: translateY(-50%) scale(1); }
}








/* Update the blur to work for an image instead of a video */
.video-blur-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; filter: blur(25px) brightness(0.6);
    transform: scale(1.1); z-index: 0;
}

/* The Premium Loading Spinner */
.video-spinner {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #f5b236; font-size: 40px; z-index: 5;
    display: none; animation: spin-slow 1s linear infinite;
}
.video-spinner.active { display: block; }
@keyframes spin-slow { 100% { transform: translate(-50%, -50%) rotate(360deg); } }


.main-video {
    position: absolute; /* Changed to absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 2;
    transition: object-fit 0.3s ease;
}

/* We will use JS to add this class ONLY if the video is extremely horizontal */
.smart-contain {
    object-fit: contain;
}

/* Make sure the mute button and price tag sit above the videos */
.mute-toggle, .price-tag {
    z-index: 3;
}

/* --- 2. The Details Overlay (Hidden by default) --- */
.details-overlay {
    position: absolute;
    top: 0;
    left: 100%; /* Pushes it entirely off-screen to the right */
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 20, 0.85); /* Dark transparent background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    color: white;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); /* Springy animation */
    overflow-y: auto; /* Allows scrolling inside if there are many amenities */
}

/* Add a class that JS will toggle to slide it in */
.details-overlay.active {
    transform: translateX(-100%); 
}

.details-content {
    padding: 30px 20px;
}

.details-title {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* --- 3. The Admin Note --- */
.admin-note {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #f5b236; /* Premium gold accent */
    padding: 15px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 25px;
    position: relative;
}

.admin-note i {
    color: #f5b236;
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.admin-note p {
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
}

/* --- 4. Amenities Grid --- */
.amenities-title {
    font-size: 16px;
    color: #a0a0a0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 perfect columns */
    gap: 15px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
}

.amenity-item i {
    font-size: 18px;
    color: #fff;
}











/* --- Centered Auth Modal --- */
.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 300; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}

.auth-overlay.active { opacity: 1; pointer-events: auto; }

.auth-content {
    background: rgba(20, 20, 22, 0.85); border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); width: 90%; max-width: 380px;
    border-radius: 24px; padding: 30px; position: relative;
    transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-overlay.active .auth-content { transform: scale(1); }

/* Force all close buttons to the absolute top of the layering system */
.close-x {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 9999 !important; /* Forces it above all other elements */
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: white !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure parents are relative so absolute positioning works */
.p2p-content, .profile-content, .cart-content-centered, .filter-content, .auth-content {
    position: relative !important;
}

.close-x:active { background: rgba(255, 255, 255, 0.2); }
.auth-header { text-align: center; margin-bottom: 25px; }
.auth-header h2 { font-size: 24px; margin-bottom: 8px; }
.auth-header p { font-size: 14px; color: var(--text-secondary); }

/* --- Premium Profile Badge --- */
.profile-badge {
    width: 30px; height: 30px; background: #f5b236; color: #000;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; border: 2px solid white;
}

/* Forces real Google images into a perfect circle */
img.profile-badge { padding: 0; object-fit: cover; }

/* --- Premium Google Button --- */
.google-btn {
    width: 100%; background: #ffffff; color: #000000; border: none;
    padding: 16px; border-radius: 16px; font-size: 1.1rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1); transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.google-btn:active {
    transform: scale(0.96); box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}





/* --- Heart Animation --- */
.action-btn i.ph-heart {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

/* When the heart is "liked" */
.action-btn.liked i.ph-heart {
    color: #ff3b30; /* Apple iOS Red */
    font-weight: 800; /* Makes it a solid fill if using Phosphor icons correctly */
}

/* The pop effect on click */
.action-btn.pop-anim i.ph-heart {
    transform: scale(1.4);
}




/* --- WhatsApp Action Button --- */
.action-btn i.ph-whatsapp-logo {
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Flashes green and pops slightly only when tapped */
.action-btn:active i.ph-whatsapp-logo {
    color: #25D366; 
    transform: scale(1.2);
}







/* --- Premium Footer & Action Cluster --- */
.card-footer {
    display: flex;
    justify-content: space-between; 
    align-items: flex-end; /* Aligns buttons nicely to the bottom */
    width: 100%;
    padding: 15px 10px; /* RESTORED: Prevents text from touching the video */
}

/* RESTORED: Text styling for the Location and Agent */
.location {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.agent {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* The Button Cluster */
.actions-cluster {
    display: flex;
    align-items: center;
    gap: 10px; 
}

/* Base style for all action buttons */
.action-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* RESTORED: The smooth 'tap' shrink effect */
.action-btn:active {
    transform: scale(0.9);
}

/* The round buttons (WhatsApp & Share) */
.circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
}

/* The Pill button (Like + Counter) */
.pill-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 25px;
    gap: 6px; 
    font-size: 20px;
}

.like-counter {
    font-size: 14px;
    font-weight: bold;
}

/* The Verified Badge (Using the Premium Gold) */
.verified-badge {
    color: #f5b236; 
    margin-left: 4px;
    font-size: 14px;
    vertical-align: middle;
}










/* --- VIP Profile Modal --- */
.profile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 400; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}

.profile-overlay.active { opacity: 1; pointer-events: auto; }

.profile-content {
    background: rgba(20, 20, 22, 0.95); border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); 
    width: 85%; /* Covers 85% of screen width */
    max-width: 400px;
    border-radius: 24px; padding: 30px 20px; position: relative;
    transform: scale(0.8) translateY(20px); /* Starts slightly small and lower */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-overlay.active .profile-content { transform: scale(1) translateY(0); }

/* Header & Avatar */
.profile-header { text-align: center; margin-bottom: 30px; }
.modal-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid #f5b236; object-fit: cover; margin-bottom: 10px; }
.profile-header h2 { font-size: 20px; margin-bottom: 2px; }
.profile-header p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.verification-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #1d9bf0; background: rgba(29, 155, 240, 0.1); padding: 4px 10px; border-radius: 20px; font-weight: bold; }

/* Menu Items */
.profile-menu { display: flex; flex-direction: column; gap: 12px; }
.menu-item {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.05);
    color: white; width: 100%; padding: 16px; border-radius: 16px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 15px; cursor: pointer; transition: background 0.2s;
}
.menu-item:active { background: rgba(255, 255, 255, 0.1); transform: scale(0.98); }
.menu-left { display: flex; align-items: center; gap: 12px; }
.menu-left i { font-size: 20px; color: var(--text-secondary); }

/* Custom Badges & Colors */
.badge { background: #f5b236; color: #000; font-size: 10px; font-weight: bold; padding: 3px 8px; border-radius: 10px; }
.logout-btn { color: #ff3b30; }
.logout-btn .menu-left i { color: #ff3b30; }







/* --- Premium Centered Cart Modal --- */
.cart-overlay-centered {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 500; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.cart-overlay-centered.active { opacity: 1; pointer-events: auto; }

.cart-content-centered {
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.1);
    width: 85%; max-width: 420px; max-height: 80vh;
    border-radius: 30px; display: flex; flex-direction: column;
    transform: scale(0.9) translateY(20px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden; 
}
.cart-overlay-centered.active .cart-content-centered { transform: scale(1) translateY(0); }

/* Header */
.cart-header-premium {
    padding: 25px 25px 15px 25px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.cart-header-premium h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.5px;}
.cart-header-premium h2 i { color: #f5b236; }

/* Body */
.cart-body-premium {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 15px;
}

/* Futuristic Cart Cards */
.futuristic-cart-item {
    display: flex; gap: 15px;
    background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px; padding: 12px; align-items: center; cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.futuristic-cart-item:active { transform: scale(0.97); background: rgba(255,255,255,0.08); }

.cart-thumb-wrapper {
    position: relative; width: 75px; height: 75px; border-radius: 14px; overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}
.cart-thumbnail-premium { width: 100%; height: 100%; object-fit: cover; }




/* --- Premium Cart Typography Layout --- */
.cart-details-premium { 
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Forces title to the top, price to the bottom */
    height: 75px; /* Matches the exact height of the image thumbnail! */
    padding: 2px 0; /* Slight breathing room */
}

.details-text-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.details-text-group h3 { 
    font-size: 16px; 
    font-weight: 700; 
    letter-spacing: 0.3px; 
    color: #ffffff;
    margin: 0; 
    line-height: 1.1;
}

/* Stripped the background, kept it clean and readable */
.details-text-group p { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin: 0; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}

/* Bold, Raw Brand Gold */
.cart-price-premium { 
    font-size: 15px; 
    font-weight: 800; 
    color: #FFDF73; /* Matches the top of your 3D button */
    letter-spacing: 0.5px; 
    margin: 0;
}



/* 4. TRUE 3D Metallic Gold Button */
.futuristic-checkout-btn {
    width: 100%; 
    /* The metallic multi-stop gradient (Bright top, rich middle, deep bottom) */
    background: linear-gradient(to bottom, #FFDF73 0%, #E5A93C 45%, #B4751A 100%); 
    color: #1A0D00; /* Ultra-dark brown/black for contrast */
    border: none; 
    padding: 18px; 
    border-radius: 20px; 
    font-size: 1.15rem; 
    font-weight: 800; 
    cursor: pointer;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    
    /* The 3D Bevel & Glow effect */
    box-shadow: 
        inset 0 2px 1px rgba(255, 255, 255, 0.6), /* Top highlight reflection */
        inset 0 -2px 4px rgba(0, 0, 0, 0.4), /* Bottom inner shadow */
        0 10px 25px rgba(229, 169, 60, 0.4); /* Outer gold glow */
        
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3); /* Subtle text engraving */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.futuristic-checkout-btn:active { 
    transform: scale(0.96) translateY(2px); 
    /* Pushes the button "down" visually */
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(229, 169, 60, 0.4); 
}






/* The Redesigned Trash Icon */
.delete-btn-premium {
    background: rgba(255, 59, 48, 0.1); border: none; color: #ff3b30;
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; transition: all 0.2s ease;
}
.delete-btn-premium:active { background: #ff3b30; color: white; transform: scale(0.9); }

/* Premium Sticky Footer */
.cart-footer-premium {
    padding: 20px 25px 25px 25px; background: rgba(10, 10, 12, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.cart-total-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;
    font-size: 13px; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.highlight-count {
    background: rgba(245, 178, 54, 0.15); color: #f5b236; padding: 4px 12px; border-radius: 12px; font-size: 15px; font-weight: 800;
}



/* --- Custom Premium Checkbox --- */
.premium-checkbox-wrapper {
    display: flex; align-items: center; justify-content: center;
    padding-right: 5px;
}
.premium-checkbox {
    appearance: none; -webkit-appearance: none;
    width: 24px; height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px; background: rgba(0, 0, 0, 0.4);
    cursor: pointer; position: relative;
    transition: all 0.2s ease;
}
/* When Checked (Glowing Gold) */
.premium-checkbox:checked {
    background: #f5b236; border-color: #f5b236;
    box-shadow: 0 0 10px rgba(245, 178, 54, 0.4);
}
.premium-checkbox:checked::after {
    content: '✔'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); color: #000; font-size: 14px; font-weight: 900;
}

/* --- Saved For Later Divider --- */
.saved-divider {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; margin-top: 10px; background: rgba(255, 255, 255, 0.05);
    border-radius: 12px; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 14px; font-weight: 700; color: var(--text-secondary);
    transition: background 0.2s;
}
.saved-divider:active { background: rgba(255, 255, 255, 0.1); }
.saved-divider i { transition: transform 0.3s ease; }
.saved-divider.expanded i { transform: rotate(180deg); }











/* --- Premium Search Bar --- */
.search-container {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
}

.premium-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 16px 16px 45px;
    border-radius: 16px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.premium-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.premium-search-input:focus {
    border-color: #f5b236;
    box-shadow: 0 0 15px rgba(245, 178, 54, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

/* Upgraded Filter Modal Background */
.premium-filter-glass {
    background: rgba(15, 15, 18, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px 30px 0 0;
}









/* --- Premium Toast Notification --- */
.toast-container {
    position: fixed;
    top: -100px; /* Hidden off-screen */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-container.active {
    top: 20px; /* Slides down */
}

.toast-content {
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid rgba(245, 178, 54, 0.3); /* Gold border */
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 20px rgba(245, 178, 54, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-icon-wrapper {
    background: linear-gradient(135deg, #f5b236, #d49a24);
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.toast-text h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.toast-text p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}







/* --- P2P Modal Styles --- */
.p2p-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: all 0.3s ease;
}
.p2p-overlay.active { opacity: 1; pointer-events: auto; }

.p2p-content {
    background: var(--card-bg); border: 1px solid var(--glass-border);
    width: 90%; max-width: 450px; border-radius: 20px; padding: 25px;
    position: relative; transform: translateY(20px) scale(0.95); transition: all 0.3s;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}
.p2p-overlay.active .p2p-content { transform: translateY(0) scale(1); }

.p2p-category-slider {
    display: flex; background: rgba(0,0,0,0.4); padding: 4px; border-radius: 12px;
    margin-bottom: 20px; gap: 4px;
}
.cat-btn {
    flex: 1; background: transparent; color: var(--text-secondary); border: none;
    padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: 0.3s;
}
.cat-btn.active { background: rgba(255,255,255,0.1); color: white; }

.close-x {
    position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.05);
    border: none; color: var(--text-secondary); width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer;
}



/* --- Contextual Filter Dropdown --- */
.filter-dropdown {
    position: fixed; 
    top: 75px; /* Just below your header */
    right: 15px; /* Aligned with the filter icon */
    width: 260px; /* Extremely compact */
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px rgba(245, 178, 54, 0.1);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    padding: 20px;
    z-index: 1000;
    
    /* The Magic Animation: Originates from the top right */
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    transform-origin: top right; 
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.filter-dropdown.active {
    opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}

.filter-header {
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 12px; margin-bottom: 15px;
}
.filter-header h3 {
    font-size: 15px; font-weight: 800; color: white; display: flex; align-items: center; gap: 8px; margin: 0;
}
.filter-header h3 i { color: #f5b236; }

/* The Real-Time Slider */
.range-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.range-header label { font-size: 12px; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; }
.gold-text { color: #FFDF73; font-weight: 800; font-size: 14px; background: rgba(245, 178, 54, 0.15); padding: 4px 10px; border-radius: 12px; }

.premium-slider {
    width: 100%; appearance: none; -webkit-appearance: none;
    height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; outline: none;
}
.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: #f5b236; cursor: pointer;
    box-shadow: 0 0 10px rgba(245, 178, 54, 0.5); border: 2px solid white;
}








/* --- End of Feed Bumper Card --- */
.end-of-feed-card {
    height: auto !important; 
    padding: 0 10px !important; 
    margin-top: -15px !important; /* THE FIX: Pulls it super tight to the last video */
    
    /* THE SECRET SAUCE: 150px of invisible padding. 
       When it snaps to the bottom, this pushes your button up above the footer! */
    padding-bottom: 150px !important; 
    margin-bottom: 0 !important;
    
    scroll-snap-align: end; 
    background: transparent;
}

.end-content {
    width: 100%;
    height: auto; 
    padding: 30px 20px; /* Tightened the inner spacing */
    background: linear-gradient(180deg, #141418 0%, #0a0a0c 100%);
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.end-icon {
    width: 80px; height: 80px;
    margin: 0 auto 20px auto;
    background: rgba(245, 178, 54, 0.1);
    color: #f5b236;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    box-shadow: 0 0 30px rgba(245, 178, 54, 0.2);
}

.end-content h3 {
    color: white;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.end-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}











/* --- Pull To Refresh Engine --- */
.ptr-container {
    position: absolute;
    top: 75px; /* Sits right below the glass header */
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50; /* Under header, above videos */
    transform: translateY(-100%); /* Hidden completely by default */
    opacity: 0;
    pointer-events: none;
}

.ptr-icon-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px rgba(245, 178, 54, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5b236; /* Premium Gold */
    font-size: 22px;
}








/* --- The FOMO Booked Overlay --- */
.booked-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: grayscale(80%); -webkit-backdrop-filter: grayscale(80%);
    z-index: 4; display: flex; align-items: center; justify-content: center;
    pointer-events: none; /* Lets them still tap to pause if they really want */
}
.booked-badge {
    background: #ff3b30; color: white; padding: 10px 25px;
    font-weight: 900; font-size: 22px; letter-spacing: 2px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.3); /* Softer border */
    transform: rotate(-12deg); 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6); /* Dark realistic shadow, no red glow */
    text-transform: uppercase;
}
.btn-disabled { opacity: 0.4; cursor: not-allowed; }









/* --- Premium File Upload Styling --- */
input[type="file"].premium-search-input {
    padding: 8px 12px !important;
    color: var(--text-secondary) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px dashed rgba(245, 178, 54, 0.5) !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Style the actual "Choose File" button inside the input */
input[type="file"].premium-search-input::file-selector-button {
    background: #f5b236 !important;
    color: #000 !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    margin-right: 15px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
}

input[type="file"].premium-search-input::file-selector-button:active {
    transform: scale(0.95) !important;
}

/* --- Fix Placeholder Text Overflow --- */
.premium-search-input {
    text-overflow: ellipsis !important; /* Adds the "..." if text is too long */
    white-space: nowrap !important;
    overflow: hidden !important;
}

.premium-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
    text-overflow: ellipsis !important;
}





/* --- Premium Buffer Progress Bar --- */
.buffer-track {
    position: absolute;
    bottom: 0; /* Sits exactly at the bottom edge of the video */
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent; 
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease; /* Fades out smoothly when 100% */
}

.buffer-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.4); /* Faint white/glass line */
    width: 0%;
    border-radius: 0 2px 2px 0;
    transition: width 0.3s linear;
}
