/*
Theme Name: MRS Fashion
Theme URI: https://example.com/mrs-fashion
Author: MRS Fashion
Author URI: https://example.com
Description: Mobile-first WordPress theme for affiliate fashion websites. Features a premium Glassmorphism UI (Phase 6), 5-step Product Creator, multi-store affiliate system, internal QR resolvers, AI-powered poster generation, and the Social Publishing Center (Phase 7).
Version: 4.1.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fashionaffiliateinsta
Tags: fashion, affiliate, grid, mobile-first, custom-post-type, glassmorphism
*/

/* ============================================================
   0. DESIGN TOKENS (Glassmorphism + Premium Fashion)
   ============================================================ */
:root {
    /* Colors */
    --fai-bg:            #FDFDFD; /* Soft off-white */
    --fai-surface:       rgba(255, 255, 255, 0.65);
    --fai-surface-solid: #FFFFFF;
    --fai-ink:           #121212; /* Deep onyx */
    --fai-ink-soft:      #525252;
    --fai-gold:          #C5A059; /* Muted gold */
    /* Phase 1 premium fashion palette */
    --fai-wine:          #6E1230; /* Deep burgundy */
    --fai-wine-deep:     #4C0C21;
    --fai-rose:          #C2557A; /* Rose magenta */
    --fai-rose-soft:     #F7E9EE; /* Pale pink surface */
    --fai-ivory:         #FBF7F3; /* Warm ivory surface */
    --fai-rose-gold:     #AF6B75; /* Elegant rose */
    --fai-line:          rgba(18, 18, 18, 0.08);
    --fai-line-light:    rgba(255, 255, 255, 0.2);
    
    /* Glassmorphism */
    --fai-glass-blur:    12px;
    --fai-glass-bg:      rgba(255, 255, 255, 0.65);
    --fai-glass-border:  rgba(255, 255, 255, 0.4);
    --fai-glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.06);
    
    /* Spacing & Radii */
    --fai-radius:        16px;
    --fai-radius-sm:     12px;
    --fai-maxw:          1320px;
    --fai-gap:           16px;
    
    /* Typography */
    --fai-font-body:     'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fai-font-display:  'Playfair Display', Georgia, serif;
}

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--fai-bg);
    color: var(--fai-ink);
    font-family: var(--fai-font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-attachment: fixed;
    /* Clean retail canvas with a whisper of warmth */
    background-image: radial-gradient(at 50% 0%, rgba(197, 160, 89, 0.045) 0px, transparent 45%);
}

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

a { color: inherit; text-decoration: none; transition: 0.2s ease; }

button { font-family: inherit; cursor: pointer; border: 0; outline: none; background: none; }

.fai-container {
    width: 100%;
    max-width: var(--fai-maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   2. GLASS UI SYSTEM (Components)
   ============================================================ */
.fai-glass {
    background: var(--fai-glass-bg);
    backdrop-filter: blur(var(--fai-glass-blur));
    -webkit-backdrop-filter: blur(var(--fai-glass-blur));
    border: 1px solid var(--fai-glass-border);
    box-shadow: var(--fai-glass-shadow);
}

/* Fallback for no backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .fai-glass { background: rgba(255, 255, 255, 0.94); }
}

/* ============================================================
   3. SITE HEADER
   ============================================================ */
.fai-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px; /* compact retail header */
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 6px 20px -18px rgba(0, 0, 0, 0.6);
}


.fai-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.fai-header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.fai-header-inner .fai-brand {
    font-family: var(--fai-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fai-ink);
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.fai-brand span { color: var(--fai-gold); }

/* Search Form */
.fai-search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 999px;
    padding: 0 16px;
    width: 240px;
    transition: all 0.3s ease;
}

.fai-search-form:focus-within {
    background: #fff;
    width: 320px;
    box-shadow: 0 0 0 1px var(--fai-ink), 0 4px 12px rgba(0,0,0,0.05);
}

.fai-search-field {
    border: 0;
    background: none;
    padding: 8px 0;
    font-size: 0.82rem;
    font-weight: 500;
    width: 100%;
    outline: none;
    color: var(--fai-ink);
}

.fai-search-submit {
    color: var(--fai-ink-soft);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.fai-search-submit:hover {
    color: var(--fai-ink);
}

.fai-nav ul {
    display: flex;
    gap: 28px;
    margin: 0; padding: 0;
    list-style: none;
}

.fai-nav a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fai-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.fai-nav a:hover { color: var(--fai-ink); }

.fai-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    padding: 0;
}

.fai-mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--fai-ink);
    transition: 0.3s;
}

@media (max-width: 1023px) {
    .fai-mobile-menu-toggle { display: flex; }
    .fai-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0; width: 100%;
        background: #fff;
        padding: 24px;
        border-bottom: 1px solid var(--fai-line);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    .fai-nav.is-open { display: block; }
    .fai-nav ul { flex-direction: column; gap: 20px; }

    /* Mobile Search Polish */
    .fai-header-actions {
        gap: 12px;
        flex: 1;
        justify-content: flex-end;
    }
    .fai-search-form {
        width: 40px;
        padding: 0;
        background: none;
        overflow: hidden;
    }
    .fai-search-form:focus-within {
        position: absolute;
        left: 20px;
        right: 20px;
        width: auto;
        background: #fff;
        z-index: 10;
        padding: 0 16px;
    }
    .fai-search-field {
        opacity: 0;
    }
    .fai-search-form:focus-within .fai-search-field {
        opacity: 1;
    }
}


/* ============================================================
   4. HOMEPAGE / ARCHIVE (Basic Structure, specialized in homepage.css)
   ============================================================ */
.fai-grid {
    display: grid;
    gap: var(--fai-gap);
    margin-bottom: 60px;
}

.fai-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--fai-ink-soft);
}

.fai-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 80px;
}

.fai-pagination a, .fai-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--fai-line);
    font-size: 0.85rem;
    font-weight: 600;
}

.fai-pagination .current {
    background: var(--fai-ink);
    color: #fff;
    border-color: var(--fai-ink);
}

.fai-pagination a:hover {
    border-color: var(--fai-gold);
}

/* Link More helper */
.fai-link-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fai-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fai-link-more:hover {
    color: var(--fai-ink);
    transform: translateX(4px);
}


/* ============================================================
   5. SINGLE PRODUCT PAGE (premium retail surfaces)
   ============================================================ */
.fai-pp-buy,
.fai-pp-panel {
    background: #fff;
    border: 1px solid var(--fai-line);
    box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.35);
}

.fai-pp-offer {
    background: #fbfaf8;
    border: 1px solid var(--fai-line);
    transition: 0.25s ease;
}

.fai-pp-offer:hover {
    background: #fff;
    transform: translateY(-2px);
    border-color: rgba(197, 160, 89, 0.7);
    box-shadow: 0 12px 26px -18px rgba(0, 0, 0, 0.35);
}

.fai-pp-cta {
    background: var(--fai-ink);
    transition: 0.25s ease;
}

.fai-pp-cta:hover {
    background: var(--fai-gold);
    color: #14110f;
}

/* ============================================================
   6. FOOTER
   ============================================================ */
.fai-site-footer {
    padding: 56px 0 32px;
    text-align: center;
    background: #14110f;
    color: rgba(255, 255, 255, 0.72);
    border-top: 0;
}

.fai-site-footer .fai-brand {
    display: inline-block;
    justify-content: center;
    margin-bottom: 16px;
    font-family: var(--fai-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.fai-site-footer .fai-brand span { color: var(--fai-gold); }

.fai-site-footer a { color: rgba(255, 255, 255, 0.82); }
.fai-site-footer a:hover { color: var(--fai-gold); }

.fai-site-footer p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
    max-width: 620px;
    margin: 10px auto;
    line-height: 1.8;
}

/* ============================================================
   7. UTILITIES & ACCESSIBILITY
   ============================================================ */
.fai-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


.fai-pp-role {
    position: absolute;
    left: 12px;
    bottom: 12px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--fai-ink);
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.fai-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--fai-ink-soft);
}

