/* ==========================================================================
   BIO AFFILIATE STORE - MAIN STYLESHEET (style.css)
   ========================================================================== */

/* 1. CORE DESIGN SYSTEM & VARIABLES */
:root {
    --bg-body: #0b0f17;
    --bg-card: #151c2c;
    --bg-card-hover: #1e293b;
    --bg-glass: rgba(21, 28, 44, 0.85);
    --bg-input: rgba(30, 41, 59, 0.8);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sub: #cbd5e1;
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    line-height: 1.5;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Mobile-First Layout (Max-Width 480px) */
.bio-app {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: rgba(11, 15, 23, 0.95);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 40px;
}

/* ==========================================================================
   2. HEADER & PROFILE
   ========================================================================== */
.header {
    padding: 28px 20px 20px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
}

.avatar-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 16px auto;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-glow);
    transition: var(--transition-smooth);
}

.avatar-wrapper:hover .avatar-img {
    transform: scale(1.05);
    border-color: var(--primary);
}

.verified-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--primary);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-body);
    font-size: 12px;
}

.profile-name {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.profile-caption {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto 18px auto;
}

.profile-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: var(--border-light);
}

.social-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-btn:hover {
    transform: translateY(-3px);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   3. STICKY SEARCH & CATEGORY PILLS
   ========================================================================== */
.sticky-search-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 42px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: none;
    align-items: center;
    justify-content: center;
}

.categories-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 2px 0;
    scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar { display: none; }

.cat-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cat-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 10px var(--primary-glow);
}

.results-meta {
    padding: 12px 20px 4px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

.results-count-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* ==========================================================================
   4. PRODUCT GRID (2-Column Mobile Layout)
   ========================================================================== */
.products-container {
    padding: 12px 16px;
    flex-grow: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: var(--bg-card-hover);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #0f172a;
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .card-img { transform: scale(1.06); }

.badge-id {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-family: monospace;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    z-index: 2;
}

.badge-discount {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--accent-pink);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 6px;
    z-index: 2;
}

.card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 35px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #f59e0b;
    margin-bottom: 8px;
}

.price-box {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.price-current {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-orange);
}

.price-original {
    font-size: 11px;
    color: #64748b;
    text-decoration: line-through;
}

.btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.btn-buy:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

.btn-buy svg {
    width: 14px; height: 14px;
    fill: none; stroke: currentColor;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Empty State */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
    text-align: center;
}

.btn-reset {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.footer {
    margin-top: auto;
    padding: 24px 20px 10px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Bio storefront refinements */
.header { padding-top: 34px; }
.header::before { content: "@ngynqtt"; display: inline-flex; margin-bottom: 12px; padding: 5px 10px; border: 1px solid var(--border-highlight); border-radius: var(--radius-full); color: #a5b4fc; background: rgba(99, 102, 241, .10); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.profile-stats { width: max-content; min-width: 150px; margin-left: auto; margin-right: auto; }
.card-category { display: inline-flex; margin-bottom: 6px; padding: 3px 7px; border-radius: 999px; color: #a5b4fc; background: rgba(99, 102, 241, .12); font-size: 10px; font-weight: 700; }
.btn-buy { justify-content: center; }
