/*
Theme Name: Flashprice App UI
Theme URI: https://flashprice.in
Author: Flashprice
Description: A custom, ultra-lightweight, mobile-first block theme for the Flashprice cashback & deal ecosystem.
Version: 2.1.0
Text Domain: flashprice-app
*/

/* ==========================================================================
   1. DESIGN TOKENS
   Change ANY value here to update the entire app instantly.
   ========================================================================== */
:root {
    /* Brand Colors */
    --fp-primary: #FACC15;
    /* Flashprice Yellow */
    --fp-secondary: #5E57E6;
    /* Flashprice Purple */
    --fp-green: #22C55E;
    /* Cashback Green */
    --fp-red: #EF4444;
    /* Alert / Sale Red */
    --fp-background: #FFFFFF;
    /* App Background - PURE WHITE, no blue */
    --fp-surface: #FFFFFF;
    /* Cards & Header */
    --fp-text-main: #111827;
    /* Dark Text */
    --fp-text-muted: #6B7280;
    /* Grey Text */
    --fp-border: #F0F0F0;
    /* Subtle Borders */
    --fp-search-bg: #F3F4F6;
    /* Search Input BG */

    /* Sizing */
    --fp-radius-sm: 8px;
    --fp-radius-md: 12px;
    --fp-radius-lg: 16px;
    --fp-radius-pill: 50px;

    /* Typography */
    --fp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fp-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transitions */
    --fp-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. GLOBAL RESET
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--fp-background);
    color: var(--fp-text-main);
    font-family: var(--fp-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Kill WordPress default block spacing inside our header */
.fp-header>* {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

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

/* ==========================================================================
   3. HEADER
   ========================================================================== */

.fp-header {
    background: var(--fp-surface);
    position: relative;
    z-index: 100;
}

/* --- ROW 1: Brand Bar --- */
.fp-header-brand {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 10px;
}

/* Hamburger (Mobile) */
.fp-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--fp-text-main);
    border-radius: var(--fp-radius-sm);
    flex-shrink: 0;
    transition: background var(--fp-transition);
}

.fp-hamburger:active {
    background: var(--fp-search-bg);
}

/* Logo */
.fp-logo {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.fp-logo-icon {
    font-size: 22px;
    line-height: 1;
}

.fp-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--fp-text-main);
    letter-spacing: -0.5px;
}

/* If using an image logo instead of text */
.fp-logo-img {
    height: 32px;
    width: auto;
}

/* Right Actions */
.fp-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Wallet Badge */
.fp-wallet-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--fp-green);
    border-radius: var(--fp-radius-pill);
    padding: 7px 14px 7px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    transition: background var(--fp-transition);
}

.fp-wallet-badge:hover {
    background: #1aad4d;
}

.fp-wallet-badge svg {
    color: #ffffff;
    flex-shrink: 0;
}

/* User Avatar */
.fp-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fp-search-bg);
    color: var(--fp-text-muted);
    overflow: hidden;
    transition: background var(--fp-transition);
}

.fp-user-avatar:hover {
    background: var(--fp-border);
}

.fp-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* --- ROW 2: Navigation Tabs (Pill Style with Shadow) --- */
.fp-header-tabs-wrapper {
    background: var(--fp-surface);
    box-shadow: inset 0 -1px 0 var(--fp-border);
    overflow: hidden;
    transition: max-height var(--fp-transition), opacity var(--fp-transition);
    max-height: 56px;
    opacity: 1;
}

.fp-header-tabs-wrapper.fp-collapsed {
    max-height: 0;
    opacity: 0;
}

.fp-header-tabs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.fp-header-tabs::-webkit-scrollbar {
    display: none;
}

.fp-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fp-text-muted);
    white-space: nowrap;
    border-radius: var(--fp-radius-pill);
    background: var(--fp-search-bg);
    border: 1px solid transparent;
    transition: all var(--fp-transition);
    position: relative;
}

.fp-tab svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
}

.fp-tab:hover {
    color: var(--fp-text-main);
    background: var(--fp-border);
}

.fp-tab.active {
    color: var(--fp-secondary);
    background: rgba(94, 87, 230, 0.08);
    border-color: rgba(94, 87, 230, 0.2);
    font-weight: 600;
}

.fp-tab.active svg {
    stroke: var(--fp-secondary);
}

/* Trending Pulse Dot */
.fp-tab-dot {
    width: 6px;
    height: 6px;
    background: var(--fp-red);
    border-radius: 50%;
    display: inline-block;
    animation: fp-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes fp-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

/* --- ROW 3: Search + Promo --- */
.fp-header-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 10px;
    overflow: visible;
    transition: max-height var(--fp-transition), opacity var(--fp-transition), padding var(--fp-transition);
    max-height: 70px;
    opacity: 1;
}

.fp-header-search-row.fp-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Smart Scroll: When only search bar is sticky */
.fp-search-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--fp-surface);
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-height: 60px;
    opacity: 1;
}

/* Search Bar */
.fp-search-bar {
    display: flex;
    align-items: center;
    flex: 1;
    background: var(--fp-search-bg);
    border-radius: var(--fp-radius-pill);
    padding: 0 6px 0 14px;
    height: 40px;
    gap: 2px;
    border: 1.5px solid transparent;
    transition: border-color var(--fp-transition), box-shadow var(--fp-transition);
}

.fp-search-bar:focus-within {
    border-color: var(--fp-secondary);
    box-shadow: 0 0 0 3px rgba(94, 87, 230, 0.08);
    background: var(--fp-surface);
}

.fp-search-icon {
    color: var(--fp-text-muted);
    flex-shrink: 0;
}

.fp-search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    color: var(--fp-text-main);
    padding: 8px 6px;
    font-family: var(--fp-font);
    min-width: 0;
}

.fp-search-input::placeholder {
    color: var(--fp-text-muted);
    font-size: 13px;
    transition: opacity 0.2s;
}

.fp-search-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--fp-text-muted);
    flex-shrink: 0;
    transition: background var(--fp-transition), color var(--fp-transition);
}

.fp-search-action-btn:hover {
    background: var(--fp-border);
    color: var(--fp-secondary);
}

/* Promo Badge (Image or Text) */
.fp-promo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--fp-radius-sm);
    overflow: hidden;
    height: 40px;
    min-width: 50px;
    max-width: 80px;
    transition: transform var(--fp-transition);
}

.fp-promo-badge:hover {
    transform: scale(1.03);
}

/* When using an image */
.fp-promo-badge-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: var(--fp-radius-sm);
}

/* Text fallback when no image */
.fp-promo-badge-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--fp-text-main);
    letter-spacing: 0.3px;
    white-space: nowrap;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--fp-primary), #F59E0B);
    border-radius: var(--fp-radius-sm);
    height: 100%;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   4. SIDE MENU
   ========================================================================== */
.fp-side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--fp-transition), visibility var(--fp-transition);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.fp-side-menu-overlay.fp-open {
    opacity: 1;
    visibility: visible;
}

.fp-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: var(--fp-surface);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform var(--fp-transition);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.fp-side-menu.fp-open {
    transform: translateX(0);
}

.fp-side-menu-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fp-border);
}

.fp-side-menu-header .fp-logo-icon {
    font-size: 18px;
}

.fp-side-menu-header .fp-logo-text {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.fp-side-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--fp-text-muted);
    border-radius: 50%;
    transition: background var(--fp-transition);
}

.fp-side-menu-close:hover {
    background: var(--fp-search-bg);
}

.fp-side-menu-nav {
    flex: 1;
    overflow-y: auto;
}

/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */

/* Tablet (768px+) */
@media (min-width: 768px) {
    .fp-hamburger {
        display: none;
    }

    .fp-header-brand {
        padding: 10px 32px;
        max-width: 1280px;
        margin: 0 auto;
    }

    .fp-header-tabs {
        padding: 8px 32px;
        max-width: 1280px;
        margin: 0 auto;
    }

    .fp-header-search-row {
        padding: 4px 32px 12px;
        max-width: 1280px;
        margin: 0 auto;
    }

    .fp-search-bar {
        max-width: none;
    }

    .fp-logo-text {
        font-size: 24px;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .fp-header-brand {
        padding: 12px 48px;
    }

    .fp-header-tabs {
        padding: 8px 48px;
        gap: 8px;
    }

    .fp-tab {
        padding: 7px 18px;
        font-size: 14px;
    }

    .fp-header-search-row {
        padding: 6px 48px 14px;
        gap: 12px;
    }

    .fp-search-bar {
        max-width: none;
        height: 44px;
    }

    .fp-search-input {
        font-size: 14px;
    }
}

/* Wide Desktop (1440px+) */
@media (min-width: 1440px) {

    .fp-header-brand,
    .fp-header-tabs,
    .fp-header-search-row {
        max-width: 1400px;
    }
}