/* ==========================================================================
   GLOBAL APP CONFIGURATION & BRAND COLORS
   ========================================================================== */
:root {
    --figma-primary: #4f46e5;         
    --figma-primary-hover: #4338ca;
    --figma-bg-soft: #f1f5f9;
    --figma-text-dark: #0f172a;
    --figma-text-muted: #64748b;
    --figma-coral: #ff6b6b;           
    --figma-shadow-soft: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 8px -1px rgba(15, 23, 42, 0.02);
}

body { 
    background-color: #f8fafc; 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: #1e293b;
    padding-top: 0 !important; /* Managed by sticky layout */
}

.fw-extrabold { font-weight: 800 !important; }
.btn-figma-primary { background: var(--figma-primary); border: none; font-weight: 600; border-radius: 12px; transition: all 0.2s; }
.btn-figma-primary:hover { background: var(--figma-primary-hover); }
.bg-coral { background: var(--figma-coral) !important; color: white !important; }
.card { border-radius: 20px !important; box-shadow: var(--figma-shadow-soft) !important; border: 1px solid rgba(226, 232, 240, 0.7) !important; }
.slider-img-height { height: 340px; object-fit: cover; }

/* ==========================================================================
   FIXED RIGID HEADER LAYER (GPU ACCELERATED TO PREVENT FLICKER)
   ========================================================================== */
.main-global-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #ffffff;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
}

.global-premium-navbar { 
    padding: 0.6rem 0; 
    background: #ffffff !important;
}
.brand-logo { font-size: 1.4rem; font-weight: 800; text-decoration: none; color: var(--figma-text-dark) !important; }
.brand-logo span { color: var(--figma-primary); }

/* Desktop View High-Quality Search Box Fixed */
.desktop-hq-search-wrapper {
    width: 45%;
    max-width: 550px;
}
.desktop-premium-search-box {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px !important;
    overflow: hidden;
    transition: all 0.25s ease;
    align-items: center;
}
.desktop-premium-search-box:focus-within {
    background: #ffffff;
    border-color: var(--figma-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
}
.desktop-premium-search-box .input-group-text {
    background: transparent !important;
    border: none;
    color: #64748b;
    padding-left: 16px;
}
.desktop-premium-search-box input {
    background: transparent !important;
    border: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 0.8rem !important;
    color: var(--figma-text-dark);
}
.desktop-premium-search-box input:focus { box-shadow: none !important; outline: none; }

/* ==========================================================================
   MOBILE SEARCH STRIP LAYOUT WITH LOCK BOUNDARIES
   ========================================================================== */
.mobile-fixed-search-bar-container {
    background: #ffffff;
    max-height: 65px; /* Hard static boundary */
    opacity: 1;
    visibility: visible;
    overflow: hidden;
    box-sizing: border-box;
    transform: translate3d(0, 0, 0);
    will-change: max-height, opacity, visibility, padding;
    transition: max-height 0.24s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.18s ease-in-out,
                visibility 0.18s ease-in-out,
                padding 0.24s ease-in-out;
}

/* Hard CSS Toggle Multipliers to Override Animation Confusions */
.main-global-header.scrolled-state .mobile-fixed-search-bar-container {
    max-height: 0px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* Mobile Icon Inside Brand Navbar */
#mobileScrollSearchTrigger { 
    display: none; 
    background: #f1f5f9; 
    will-change: opacity, transform;
}

.main-global-header.scrolled-state #mobileScrollSearchTrigger {
    display: flex !important;
    animation: fadeInSmoothIcon 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInSmoothIcon {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

/* Animated Typewriter Elements Styling */
.premium-hq-search-box { background: #f1f5f9; border: 1.5px solid #e2e8f0; border-radius: 14px !important; overflow: hidden; align-items: center; }
.premium-hq-search-box:focus-within { background: #ffffff; border-color: var(--figma-primary); }
.premium-hq-search-box .search-icon-left { background: transparent !important; border: none; color: #64748b; padding-left: 14px; }
.premium-hq-search-box .search-mic-right { background: transparent !important; border: none; color: #94a3b8; padding-right: 14px; cursor: pointer; }

.animated-placeholder-container { position: relative; flex: 1 1 auto; width: 1%; display: flex; align-items: center; }
.premium-hq-search-box input { background: transparent !important; font-size: 0.92rem; font-weight: 500; padding: 0.65rem 0.4rem !important; color: var(--figma-text-dark); z-index: 2; position: relative; }
.premium-hq-search-box input:focus { box-shadow: none !important; outline: none; }

.custom-typing-placeholder, .custom-typing-placeholder-dropdown { position: absolute; left: 6px; font-size: 0.92rem; color: #94a3b8; font-weight: 500; pointer-events: none; z-index: 1; }
.custom-typing-placeholder::after, .custom-typing-placeholder-dropdown::after { content: '|'; color: var(--figma-primary); animation: blinkCursor 0.7s infinite; margin-left: 1px; }

@keyframes blinkCursor { 50% { opacity: 0; } }

/* ==========================================================================
   CATEGORY STRIP BAR LAYOUT
   ========================================================================== */
.premium-slim-category-strip { background: #ffffff; padding: 0.4rem 0 !important; }
.container-category-scroll { display: flex; gap: 1.2rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.container-category-scroll::-webkit-scrollbar { display: none; }
.premium-slim-category-strip .category-pill { background: transparent; border: none; font-size: 0.85rem !important; font-weight: 600; color: var(--figma-text-dark); padding: 0.3rem 0.6rem !important; border-radius: 6px; display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.premium-slim-category-strip .strip-icon { font-size: 0.9rem !important; color: var(--figma-text-muted); }
.premium-slim-category-strip .category-pill.active { color: var(--figma-primary) !important; background: rgba(79, 70, 229, 0.08); }

.mobile-dropdown-search-container { display: none; width: 100%; }
.mobile-strip-arrow-btn { background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 25%); border: none; color: var(--figma-primary); padding: 0.3rem 0.5rem 0.3rem 1.2rem; position: absolute; right: 0; top: 50%; transform: translateY(-50%); height: 100%; display: flex; align-items: center; z-index: 10; }

@media (max-width: 991.98px) {
    .slider-img-height { height: 190px; }
    .container-category-scroll { gap: 1rem; padding-left: 0.5rem; padding-right: 2.2rem; }
}

/* ==========================================================================
   PRODUCT PREMIUM CARDS SYSTEM
   ========================================================================== */
.product-premium-card { border: 1px solid rgba(226, 232, 240, 0.8) !important; background: #ffffff; overflow: hidden; position: relative; border-radius: 16px !important; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.product-premium-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -4px rgba(15,23,42,0.08) !important; }
.card-img-frame { height: 170px; background: #fafafa; display: flex; align-items: center; justify-content: center; padding: 16px; border-bottom: 1px solid #f1f5f9; }
.card-img-frame img { max-height: 100%; max-width: 100%; object-fit: contain; }
.offer-tag-ribbon { position: absolute; top: 12px; left: 12px; background: var(--figma-coral); color: #ffffff; font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 8px; z-index: 3; }
.prod-title-link { font-size: 0.88rem; font-weight: 600; color: var(--figma-text-dark); text-decoration: none; height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }

/* ==========================================================================
   PREMIUM MODERN DARK FOOTER DESIGN
   ========================================================================== */
.premium-global-app-footer { background: #0f172a; color: #94a3b8; }
.footer-brand { font-size: 1.5rem; text-decoration: none; }
.footer-brand span { color: var(--figma-primary); }
.footer-desc-text { font-size: 0.88rem; line-height: 1.6; color: #94a3b8; }
.footer-title-header { color: #ffffff; font-weight: 700; font-size: 0.95rem; margin-bottom: 1.2rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links-list li { margin-bottom: 0.7rem; }
.footer-links-list a { color: #94a3b8; text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.2s ease, padding-left 0.2s ease; }
.footer-links-list a:hover { color: #ffffff; padding-left: 4px; }

.footer-newsletter-box { background: #1e293b; border: 1px solid #334155; border-radius: 10px !important; overflow: hidden; padding: 2px; }
.footer-newsletter-box input { background: transparent !important; border: none !important; color: #ffffff !important; font-size: 0.88rem; padding-left: 12px; }
.footer-newsletter-box input::placeholder { color: #64748b; }
.footer-newsletter-box input:focus { box-shadow: none; outline: none; }
.btn-newsletter-submit { background: var(--figma-primary); color: white; border-radius: 8px !important; padding: 0.55rem 1rem; transition: all 0.2s; }
.btn-newsletter-submit:hover { background: var(--figma-primary-hover); color: white; }

.social-circle-link { width: 36px; height: 36px; background: #1e293b; color: #94a3b8; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.2s ease; font-size: 0.9rem; }
.social-circle-link:hover { background: var(--figma-primary); color: #ffffff; transform: translateY(-2px); }

.btn-action-circle { border: none; background: var(--figma-bg-soft); border-radius: 50%; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; color: #475569; }
.no-caret::after { display: none !important; }
.mobile-left-category-drawer { position: fixed; top: 0; left: 0; width: 280px; height: 100vh; background: #ffffff; z-index: 1100; transform: translateX(-100%); transition: transform 0.3s ease; }
.mobile-left-category-drawer.drawer-open { transform: translateX(0); }
.drawer-overlay-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.4); z-index: 1090; display: none; }
.drawer-overlay-backdrop.overlay-active { display: block; }