/* ============================================
   What God Gave You - Complete Stylesheet
   Share What You Were Given
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
    --primary: #2f6f73;
    --primary-dark: #23575a;
    --primary-light: #e7f1f1;
    --secondary: #5b5f76;
    --secondary-light: #ececf2;
    --accent: #c85a54;
    --accent-light: #faeaea;
    --sage: #4d8a67;
    --sage-light: #e7f3eb;
    --cream: #f4f1ea;
    --warm-white: #fbfbf8;
    --gold: #a47a22;
    --gold-light: #f8f0d8;
    --text: #22262c;
    --text-light: #515966;
    --text-muted: #7b8490;
    --border: #d7dce2;
    --border-light: #e8ebef;
    --bg: #f6f7f8;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(34,38,44,.08);
    --shadow: 0 4px 12px rgba(34,38,44,.1);
    --shadow-lg: 0 8px 30px rgba(34,38,44,.12);
    --shadow-xl: 0 20px 60px rgba(34,38,44,.15);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-hand: 'Caveat', cursive;
    --transition: .2s ease;
    --max-width: 1200px;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

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

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.handwriting { font-family: var(--font-hand); }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .65rem 1.4rem; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: .9rem; font-weight: 500;
    border: none; cursor: pointer; transition: all var(--transition);
    text-decoration: none; line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow); }

.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: .45rem 1rem; font-size: .82rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* --- NAVBAR --- */
.navbar {
    background: var(--card-bg); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(12px); background: rgba(255,255,255,.92);
}
.nav-container {
    max-width: 1440px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
    display: flex; align-items: center; gap: .5rem;
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
    color: var(--text); text-decoration: none;
}
.logo-icon { font-size: 1.5rem; }
.nav-logo-img { height: 38px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-link {
    display: flex; align-items: center; gap: .4rem;
    padding: .5rem .85rem; border-radius: var(--radius-sm);
    color: var(--text-light); font-size: .88rem; font-weight: 500;
    transition: all var(--transition); text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-link i { font-size: .82rem; }

.badge {
    background: var(--accent); color: #fff; font-size: .7rem;
    padding: .1rem .45rem; border-radius: 50px; font-weight: 600; margin-left: .2rem;
}
.badge-sm { font-size: .65rem; padding: .05rem .35rem; background: var(--accent); color: #fff; border-radius: 50px; }

.mobile-toggle { display: none; background: none; border: none; font-size: 1.3rem; color: var(--text); cursor: pointer; padding: .5rem; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-toggle {
    display: flex; align-items: center; gap: .4rem;
    padding: .5rem .85rem; border-radius: var(--radius-sm);
    color: var(--text-light); font-size: .88rem; font-weight: 500;
    background: none; border: none; cursor: pointer;
    font-family: var(--font-body); transition: all var(--transition);
}
.dropdown-toggle:hover { color: var(--primary); background: var(--primary-light); }

.dropdown-menu {
    position: absolute; right: 0; top: 100%; margin-top: 0;
    background: var(--card-bg); border-radius: var(--radius); padding: .5rem;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    min-width: 200px; display: none; z-index: 200;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-item-btn {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .85rem; border-radius: var(--radius-sm);
    color: var(--text); font-size: .87rem; text-decoration: none;
    width: 100%; background: none; border: none; cursor: pointer;
    font-family: var(--font-body); transition: background var(--transition);
}
.dropdown-menu a:hover, .dropdown-item-btn:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border-light); margin: .3rem 0; }

/* Tier badges */
.tier-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .15rem .5rem; border-radius: 50px; font-size: .7rem; font-weight: 600;
}
.tier-premium { background: var(--gold-light); color: var(--gold); }
.tier-pro { background: linear-gradient(135deg, #f6d365, #fda085); color: #fff; }
.tier-badge-sm { font-size: .65rem; padding: .1rem .35rem; }
.tier-badge-sm.tier-premium { background: var(--gold-light); color: var(--gold); border-radius: 50px; }
.tier-badge-sm.tier-pro { background: linear-gradient(135deg, #f6d365, #fda085); color: #fff; border-radius: 50px; }

/* --- FLASH MESSAGES --- */
.flash {
    padding: .85rem 1.5rem; animation: slideDown .3s ease;
}
.flash-content {
    max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; gap: .6rem;
    font-size: .9rem; font-weight: 500;
}
.flash-success { background: var(--sage-light); color: #2d6a30; }
.flash-error { background: var(--accent-light); color: #c0392b; }
.flash-info { background: var(--secondary-light); color: var(--secondary); }
.flash-close { margin-left: auto; background: none; border: none; font-size: 1.3rem; cursor: pointer; opacity: .5; }
.flash-close:hover { opacity: 1; }

@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- MAIN CONTENT --- */
.main-content { min-height: calc(100vh - 64px - 300px); padding-bottom: 3rem; }

/* --- APP SHELL --- */
.app-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.app-sidebar {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.app-sidebar-heading {
    padding: 0 .35rem .35rem;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.app-sidebar-card {
    min-height: 48px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: .6rem;
    padding: .55rem .65rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-light);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.app-sidebar-card:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(2px);
}
.app-sidebar-card.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.app-sidebar-card.active .badge { background: #fff; color: var(--primary); }
.app-sidebar-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
}
.app-sidebar-card.active .app-sidebar-icon { background: rgba(255,255,255,.16); color: #fff; }
.app-sidebar-label { min-width: 0; }
.app-content { min-width: 0; }
.app-content > .container { max-width: 100%; padding-left: 0; padding-right: 0; }

/* --- HERO SECTION --- */
.hero {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
    max-width: var(--max-width); margin: -30px auto 0; padding: 4rem 1.5rem 5rem;
    position: relative; z-index: 1;
}
.hero-title {
    font-family: var(--font-display); font-size: 3.8rem; font-weight: 700;
    line-height: 1.08; margin-bottom: 1.2rem;
}
.hero-accent { color: var(--primary); display: block; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-light); line-height: 1.7; margin-bottom: 2rem; max-width: 520px; }
.hero-actions { display: flex; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 2.5rem; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.hero-visual { position: relative; height: 380px; }
.hero-card {
    position: absolute; background: var(--card-bg); border-radius: var(--radius);
    padding: .5rem; box-shadow: var(--shadow); border: 1px solid var(--border-light);
    width: 140px; overflow: hidden;
}
.hero-card-1 { top: 10%; left: 10%; transform: rotate(-3deg); animation: float1 6s ease-in-out infinite; }
.hero-card-2 { top: 35%; right: 5%; transform: rotate(2deg); animation: float2 7s ease-in-out infinite; }
.hero-card-3 { bottom: 5%; left: 20%; transform: rotate(-1deg); animation: float3 5s ease-in-out infinite; }
.hero-card .handwriting { font-size: .8rem; color: var(--text-light); margin-top: .3rem; }

.yarn-ball {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--sage));
    position: relative; overflow: hidden;
}
.yarn-ball::after {
    content: ''; position: absolute; top: 50%; left: -10%;
    width: 120%; height: 2px; background: rgba(255,255,255,.4);
    transform: rotate(30deg);
}
.yarn-ball-2 { background: linear-gradient(135deg, var(--accent), #d4b896); }
.yarn-ball-3 { background: linear-gradient(135deg, var(--gold), #c9b87a); }

/* Hero banner (standalone image) */
.hero-banner {
    width: 100%; overflow: hidden; line-height: 0;
    position: relative;
}
.hero-banner::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}
.hero-banner-img {
    width: 100%; height: auto; display: block;
    max-height: 480px; object-fit: cover; object-position: center top;
}

/* Hero card images */
.hero-card-img {
    width: 100%; height: 80px; border-radius: var(--radius-sm); object-fit: cover;
    display: block;
}

@keyframes float1 { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-12px); } }
@keyframes float2 { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-10px); } }
@keyframes float3 { 0%, 100% { transform: rotate(-1deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-8px); } }

/* --- SECTIONS --- */
.section, .section-alt { padding: 4rem 0; }
.section-alt { background: var(--cream); }
.section-title { font-size: 1.8rem; margin-bottom: .5rem; }
.section-subtitle { color: var(--text-light); margin-bottom: 2.5rem; font-size: 1.05rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }

/* --- FEATURES --- */
.features-section { padding: 5rem 0; background: var(--cream); }
.features-section .section-title, .features-section .section-subtitle { text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
    background: var(--card-bg); padding: 2rem; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); transition: all var(--transition); text-align: center;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin: 0 auto 1rem;
}
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { color: var(--text-light); font-size: .9rem; }

/* --- PATTERNS GRID --- */
.patterns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.patterns-grid-lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.pattern-card {
    background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-light); transition: all var(--transition);
    text-decoration: none; color: var(--text); display: block;
}
.pattern-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }

.pattern-image { position: relative; height: 180px; overflow: hidden; background: var(--cream); }
.pattern-image img { width: 100%; height: 100%; object-fit: cover; }
.pattern-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--primary-light); background: linear-gradient(135deg, var(--primary-light), var(--cream));
}
.premium-badge {
    position: absolute; top: .75rem; right: .75rem;
    background: linear-gradient(135deg, #f6d365, #fda085); color: #fff;
    padding: .25rem .65rem; border-radius: 50px; font-size: .72rem; font-weight: 600;
    display: flex; align-items: center; gap: .3rem;
}
.free-badge {
    position: absolute; top: .75rem; right: .75rem;
    background: var(--sage); color: #fff;
    padding: .25rem .65rem; border-radius: 50px; font-size: .72rem; font-weight: 600;
}
.featured-badge {
    position: absolute; top: .75rem; left: .75rem;
    background: var(--gold); color: #fff; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
}
.sale-badge {
    position: absolute; top: .75rem; left: .75rem;
    background: var(--accent); color: #fff; padding: .25rem .65rem;
    border-radius: 50px; font-size: .72rem; font-weight: 700;
}
.low-stock-badge {
    position: absolute; bottom: .75rem; left: .75rem;
    background: rgba(0,0,0,.7); color: #fff; padding: .2rem .5rem;
    border-radius: var(--radius-sm); font-size: .7rem;
}

.pattern-info { padding: 1.2rem; }
.pattern-info h3 { font-size: 1.05rem; margin: .4rem 0; }
.pattern-info p { color: var(--text-light); font-size: .85rem; margin-bottom: .6rem; }
.pattern-author { font-size: .8rem; color: var(--text-muted); }
.pattern-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; font-size: .78rem; color: var(--text-muted); }
.pattern-downloads { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; display: block; }

.difficulty {
    display: inline-block; padding: .15rem .55rem; border-radius: 50px;
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
}
.difficulty-beginner { background: #e8f5e9; color: #2e7d32; }
.difficulty-intermediate { background: #fff3e0; color: #e65100; }
.difficulty-advanced { background: #fce4ec; color: #c62828; }
.difficulty-expert { background: #ede7f6; color: #4527a0; }

/* --- PRODUCTS GRID --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.products-grid-lg { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.product-card {
    background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-light); transition: all var(--transition);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.product-image { position: relative; height: 200px; overflow: hidden; background: var(--cream); display: block; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--border); background: linear-gradient(135deg, var(--cream), var(--sage-light));
}

.product-info { padding: 1.2rem; }
.product-info h3 { font-size: 1rem; margin: .3rem 0; }
.product-info h3 a { color: var(--text); text-decoration: none; }
.product-info h3 a:hover { color: var(--primary); }
.product-category { font-size: .72rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: .05em; }
.product-desc { font-size: .83rem; color: var(--text-light); margin: .3rem 0; }

.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: .8rem; }
.product-price { display: flex; align-items: baseline; gap: .5rem; }
.price { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.price-sale { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.price-original { font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }
.price-save { font-size: .8rem; color: var(--sage); font-weight: 500; }
.out-of-stock { color: var(--text-muted); font-size: .82rem; font-weight: 500; }

/* --- COMMUNITY / POSTS --- */
.community-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; padding-top: 2rem; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light);
}
.sidebar-card h3 { font-size: 1rem; margin-bottom: 1rem; }
.category-list { list-style: none; }
.category-list li a {
    display: block; padding: .45rem .75rem; border-radius: var(--radius-sm);
    color: var(--text-light); font-size: .88rem; transition: all var(--transition);
    text-decoration: none;
}
.category-list li a:hover, .category-list li a.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }

.leaderboard { list-style: none; }
.leaderboard li {
    display: flex; align-items: center; gap: .6rem; padding: .45rem 0;
    font-size: .85rem; border-bottom: 1px solid var(--border-light);
}
.leaderboard li:last-child { border: none; }
.rank { font-weight: 700; color: var(--gold); min-width: 28px; }
.leader-name { flex: 1; }
.leader-points { color: var(--text-muted); font-size: .78rem; }
.guidelines { list-style: none; font-size: .85rem; color: var(--text-light); }
.guidelines li { padding: .3rem 0; }

/* Feed */
.feed { max-width: 100%; }
.feed-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.feed-actions { display: flex; gap: .75rem; align-items: center; }
.search-form { display: flex; gap: .5rem; }
.search-input { padding: .45rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .87rem; width: 200px; outline: none; }
.search-input:focus { border-color: var(--primary); }

/* Post cards */
.post-card {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); margin-bottom: 1rem;
    transition: box-shadow var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-sm); }
.pinned-label { font-size: .78rem; color: var(--gold); font-weight: 600; margin-bottom: .5rem; }
.post-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.post-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.post-avatar-lg { width: 50px; height: 50px; font-size: 1.1rem; }
.post-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.post-author { font-weight: 600; color: var(--text); text-decoration: none; }
.post-author:hover { color: var(--primary); }
.post-time { font-size: .78rem; color: var(--text-muted); }
.skill-badge { font-size: .68rem; padding: .1rem .4rem; background: var(--secondary-light); color: var(--secondary); border-radius: 50px; }
.post-title-link { text-decoration: none; color: var(--text); }
.post-title { font-size: 1.15rem; margin-bottom: .5rem; }
.post-title-link:hover .post-title { color: var(--primary); }
.post-body { color: var(--text-light); font-size: .92rem; line-height: 1.7; margin-bottom: .75rem; }
.read-more { color: var(--primary); font-weight: 500; }
.post-image { border-radius: var(--radius); overflow: hidden; margin: 1rem 0; }
.post-image img { width: 100%; max-height: 400px; object-fit: cover; }
.post-image-lg img { max-height: 600px; }

.post-footer { display: flex; align-items: center; gap: 1rem; padding-top: .75rem; border-top: 1px solid var(--border-light); }
.post-footer-detail { padding-top: 1rem; margin-top: 1rem; }
.post-action, .post-action-lg {
    display: flex; align-items: center; gap: .4rem;
    color: var(--text-muted); font-size: .85rem; background: none; border: none;
    cursor: pointer; padding: .35rem .6rem; border-radius: var(--radius-sm);
    transition: all var(--transition); text-decoration: none;
}
.post-action:hover, .post-action-lg:hover { color: var(--accent); background: var(--accent-light); }
.post-action.liked, .post-action-lg.liked { color: var(--accent); }
.post-category-tag {
    margin-left: auto; font-size: .75rem; padding: .2rem .6rem;
    background: var(--cream); border-radius: 50px; color: var(--text-muted);
}

.inline-form { display: inline; }

/* Pagination */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.page-link {
    padding: .45rem .85rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); color: var(--text-light);
    font-size: .87rem; text-decoration: none; transition: all var(--transition);
}
.page-link:hover, .page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Post preview cards (homepage) */
.posts-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.post-preview-card {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); text-decoration: none; color: var(--text);
    transition: all var(--transition); display: block;
}
.post-preview-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.post-preview-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.post-preview-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.post-preview-card p { color: var(--text-light); font-size: .87rem; margin-bottom: .75rem; }
.post-preview-footer { display: flex; gap: 1rem; font-size: .82rem; color: var(--text-muted); }
.post-preview-footer .post-category { margin-left: auto; }

/* --- SINGLE POST --- */
.post-detail { background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--border-light); margin-top: 1rem; }
.post-detail-title { font-size: 1.8rem; margin: 1rem 0; }
.post-detail-body { font-size: 1rem; line-height: 1.8; color: var(--text-light); white-space: pre-wrap; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .88rem; margin: 1.5rem 0 .5rem; }
.back-link:hover { color: var(--primary); }

/* Comments */
.comments-section { margin-top: 2rem; }
.comments-section h2 { margin-bottom: 1.5rem; }
.comment-form { margin-bottom: 2rem; }
.comment-form .btn { margin-top: .75rem; }
.login-prompt { color: var(--text-muted); font-size: .9rem; margin-bottom: 2rem; }
.login-prompt a { font-weight: 600; }
.comments-list { display: flex; flex-direction: column; gap: 1rem; }
.comment { display: flex; gap: .75rem; }
.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--sage), var(--secondary));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; flex-shrink: 0;
}
.comment-body { flex: 1; background: var(--cream); padding: .85rem 1rem; border-radius: var(--radius); }
.comment-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.comment-author { font-weight: 600; font-size: .87rem; color: var(--text); text-decoration: none; }
.comment-author:hover { color: var(--primary); }
.comment-time { font-size: .75rem; color: var(--text-muted); }
.comment-body p { font-size: .9rem; color: var(--text-light); }
.no-comments { color: var(--text-muted); font-size: .9rem; text-align: center; padding: 2rem 0; }

/* --- PATTERN DETAIL --- */
.pattern-detail { margin-top: 1rem; }
.pattern-detail-header {
    display: grid; grid-template-columns: 1fr 1.3fr; gap: 2rem;
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem;
    border: 1px solid var(--border-light);
}
.pattern-detail-image { border-radius: var(--radius); overflow: hidden; }
.pattern-detail-image img { width: 100%; height: 300px; object-fit: cover; }
.pattern-detail-info h1 { font-size: 1.8rem; margin: .75rem 0; }
.pattern-description { color: var(--text-light); margin-bottom: 1.2rem; }
.pattern-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.pattern-category-badge { font-size: .72rem; padding: .15rem .55rem; background: var(--cream); border-radius: 50px; color: var(--text-muted); }
.pattern-specs { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; font-size: .9rem; }
.spec { display: flex; align-items: center; gap: .5rem; }
.spec i { color: var(--primary); width: 18px; text-align: center; }
.pattern-author-info { font-size: .9rem; color: var(--text-light); }

.pattern-instructions {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem; margin-top: 1.5rem;
    border: 1px solid var(--border-light);
}
.instructions-content { white-space: pre-wrap; line-height: 1.8; color: var(--text-light); font-size: .95rem; }

.paywall {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 4rem 2rem; margin-top: 1.5rem;
    border: 2px dashed var(--border); text-align: center;
}
.paywall i { font-size: 3rem; color: var(--gold); margin-bottom: 1rem; }
.paywall h2 { margin-bottom: .5rem; }
.paywall p { color: var(--text-light); margin-bottom: 1.5rem; max-width: 400px; margin-left: auto; margin-right: auto; }

/* --- PRODUCT DETAIL --- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 1rem; }
.product-detail-image { border-radius: var(--radius-lg); overflow: hidden; }
.product-detail-image img { width: 100%; }
.product-placeholder-lg { height: 400px; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: var(--border); background: var(--cream); border-radius: var(--radius-lg); }
.product-detail-info h1 { font-size: 1.8rem; margin: .5rem 0 1rem; }
.product-price-lg { margin-bottom: 1.2rem; }
.product-price-lg .price, .product-price-lg .price-sale { font-size: 1.6rem; }
.product-detail-desc { color: var(--text-light); line-height: 1.7; margin-bottom: 1.5rem; }
.product-specs { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.5rem; font-size: .9rem; }
.product-specs .spec strong { min-width: 80px; display: inline-block; }

.stock-status { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 500; margin-bottom: 1rem; }
.in-stock { color: var(--sage); }
.out-of-stock { color: var(--text-muted); }

.add-to-cart-form { margin-bottom: 1.5rem; }
.quantity-selector { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.quantity-input, .quantity-input-sm { width: 70px; padding: .5rem; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; }
.quantity-input-sm { width: 55px; padding: .35rem; }

.shipping-info { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-light); }
.shipping-info p { display: flex; align-items: center; gap: .5rem; color: var(--text-light); font-size: .87rem; margin-bottom: .4rem; }
.shipping-info i { color: var(--sage); width: 18px; text-align: center; }

.related-products { margin-top: 3rem; }
.related-products h2 { margin-bottom: 1.5rem; }

/* --- CART --- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; margin-top: 1.5rem; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
    display: flex; gap: 1rem; align-items: center;
    background: var(--card-bg); border-radius: var(--radius); padding: 1rem;
    border: 1px solid var(--border-light);
}
.cart-item-image { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder-sm { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; background: var(--cream); border-radius: var(--radius-sm); color: var(--border); }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: .95rem; }
.cart-item-info h3 a { color: var(--text); text-decoration: none; }
.cart-item-category { font-size: .75rem; color: var(--text-muted); }
.cart-item-price { font-size: .85rem; color: var(--text-light); margin-top: .2rem; }
.cart-item-actions { display: flex; align-items: center; gap: 1rem; }
.cart-item-total { font-weight: 600; font-size: 1rem; min-width: 60px; text-align: right; }
.btn-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: .5rem; border-radius: var(--radius-sm); }
.btn-remove:hover { color: var(--accent); background: var(--accent-light); }

.cart-summary {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); height: fit-content; position: sticky; top: 80px;
}
.cart-summary h3 { margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .9rem; }
.summary-total { font-size: 1.15rem; font-weight: 700; padding: .75rem 0; }
.free-shipping { color: var(--sage); font-weight: 600; }
.shipping-note { font-size: .82rem; color: var(--primary); text-align: center; margin: .75rem 0; }

/* --- CHECKOUT --- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; margin-top: 1.5rem; }
.checkout-form { background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--border-light); }
.checkout-form h2 { margin: 1.5rem 0 1rem; font-size: 1.2rem; }
.checkout-form h2:first-child { margin-top: 0; }
.checkout-summary {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem;
    border: 1px solid var(--border-light); height: fit-content; position: sticky; top: 80px;
}
.checkout-item { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .87rem; color: var(--text-light); }
.stripe-placeholder {
    background: var(--cream); border-radius: var(--radius); padding: 1.5rem; margin: 1rem 0;
    text-align: center;
}
.stripe-badge { font-size: 1.3rem; color: #635bff; margin-bottom: .5rem; }
.stripe-placeholder p { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.fake-card-form { text-align: left; }

/* --- ORDERS --- */
.orders-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.order-card {
    display: block; background: var(--card-bg); border-radius: var(--radius); padding: 1.2rem 1.5rem;
    border: 1px solid var(--border-light); text-decoration: none; color: var(--text);
    transition: all var(--transition);
}
.order-card:hover { box-shadow: var(--shadow-sm); color: var(--text); }
.order-card-header { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.order-id { font-weight: 600; }
.order-status { padding: .15rem .55rem; border-radius: 50px; font-size: .75rem; font-weight: 600; }
.status-pending, .status-pending_payment { background: var(--gold-light); color: #7a5108; }
.status-paid { background: #dff1f0; color: #245f62; }
.status-in_progress { background: #e3f2fd; color: #1565c0; }
.status-fulfilled { background: var(--sage-light); color: #2e7d32; }
.status-cancelled, .status-refunded, .status-failed, .status-expired { background: #fde5e5; color: #9c3434; }
.order-card-body { display: flex; justify-content: space-between; font-size: .87rem; color: var(--text-light); }
.order-total { font-weight: 600; color: var(--text); }

.order-confirmation { text-align: center; max-width: 600px; margin: 3rem auto; }
.order-success { font-size: 4rem; color: var(--sage); margin-bottom: 1rem; }
.order-number { color: var(--text-muted); margin-bottom: 1rem; }
.order-details {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 2rem;
    border: 1px solid var(--border-light); margin: 2rem 0; text-align: left;
}
.order-details h3 { margin: 1rem 0 .75rem; font-size: 1rem; }
.order-details h3:first-child { margin-top: 0; }
.order-actions { display: flex; gap: 1rem; justify-content: center; }

/* --- AUTH PAGES --- */
.auth-container { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 2rem; }
.auth-card {
    background: var(--card-bg); border-radius: var(--radius-xl); padding: 2.5rem;
    border: 1px solid var(--border-light); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 480px;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { margin-top: .75rem; }
.auth-header p { color: var(--text-light); }
.logo-icon-lg { font-size: 3rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .9rem; color: var(--text-light); }
.auth-terms { text-align: center; margin-top: .75rem; font-size: .78rem; color: var(--text-muted); }
.demo-accounts { margin-top: 1.5rem; padding: 1rem; background: var(--cream); border-radius: var(--radius); font-size: .82rem; }
.demo-accounts code { background: var(--primary-light); padding: .1rem .35rem; border-radius: 4px; font-size: .8rem; }

/* --- FORMS --- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .87rem; font-weight: 500; margin-bottom: .35rem; color: var(--text); }
.form-input, .form-textarea, select.form-input {
    width: 100%; padding: .7rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: .9rem; color: var(--text);
    transition: border-color var(--transition); outline: none; background: var(--card-bg);
}
.form-input:focus, .form-textarea:focus, select.form-input:focus { border-color: var(--primary); }
.form-input-sm { padding: .45rem .75rem; font-size: .85rem; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; padding-top: 1.5rem; }

/* --- FILTERS --- */
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0 1rem; flex-wrap: wrap; gap: 1rem; }
.page-subtitle { color: var(--text-light); font-size: .95rem; }
.filters-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 0; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.filter-tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.filter-tab {
    padding: .45rem 1rem; border-radius: 50px; font-size: .85rem;
    color: var(--text-light); text-decoration: none; transition: all var(--transition);
    border: 1px solid transparent;
}
.filter-tab:hover { background: var(--primary-light); color: var(--primary); }
.filter-tab.active { background: var(--primary); color: #fff; }
.filters-form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* --- MODAL --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5); z-index: 500; justify-content: center; align-items: flex-start;
    padding: 3rem 1rem; overflow-y: auto; backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-content {
    background: var(--card-bg); border-radius: var(--radius-xl); padding: 2rem;
    width: 100%; max-width: 560px; animation: modalIn .3s ease;
}
.modal-lg { max-width: 720px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text-muted); }

@keyframes modalIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- PROFILE --- */
.profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; padding-top: 2rem; }
.profile-card {
    background: var(--card-bg); border-radius: var(--radius-xl); padding: 2rem;
    border: 1px solid var(--border-light); text-align: center; height: fit-content;
}
.profile-avatar-lg {
    width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 700;
}
.profile-name { font-size: 1.3rem; }
.profile-username { color: var(--text-muted); font-size: .87rem; margin-bottom: .75rem; }
.profile-bio { color: var(--text-light); font-size: .9rem; margin-bottom: 1rem; }
.profile-stats-row { display: flex; justify-content: center; gap: 2rem; margin: 1rem 0; }
.profile-stat { text-align: center; }
.profile-stat-num { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.profile-stat-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }
.profile-detail { font-size: .85rem; color: var(--text-light); margin: .3rem 0; }
.profile-detail i { width: 18px; color: var(--primary); }

.profile-content { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border-light); padding-bottom: 0; }
.profile-tab {
    padding: .65rem 1.2rem; font-size: .9rem; color: var(--text-light);
    border: none; background: none; cursor: pointer; font-family: var(--font-body);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all var(--transition);
}
.profile-tab:hover { color: var(--primary); }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* --- PHASE 2 PROFILES AND GIFTS --- */
.page-header-actions, .section-heading-row, .profile-identity-line, .public-profile-meta,
.public-profile-actions, .gift-card-flags, .gift-detail-actions {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.page-header-actions { justify-content: flex-end; }
.content-panel {
    background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    padding: 1.5rem; min-width: 0;
}
.section-heading-row { justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.section-heading-row h2 { font-size: 1.35rem; margin-top: .1rem; }
.section-heading-row p, .muted-copy { color: var(--text-light); font-size: .9rem; }
.section-kicker {
    color: var(--primary); font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em;
}
.text-link { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.btn-icon { width: 42px; min-width: 42px; height: 42px; padding: 0; justify-content: center; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span {
    display: flex; align-items: center; padding: 0 .75rem; color: var(--text-muted);
    background: var(--cream); border: 1px solid var(--border); border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-prefix .form-input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form-group small { display: block; margin-top: .35rem; color: var(--text-muted); font-size: .75rem; }
.option-stack { display: flex; flex-direction: column; justify-content: center; gap: .65rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-list.compact { gap: .3rem; }
.tag-chip {
    display: inline-flex; align-items: center; min-height: 26px; padding: .2rem .55rem;
    border-radius: 50px; background: var(--cream); color: var(--text-light);
    font-size: .72rem; line-height: 1.2;
}
.tag-list.compact .tag-chip { min-height: 22px; font-size: .68rem; }

.profile-dashboard { padding-top: 2rem; }
.profile-showcase-card {
    overflow: hidden; margin-top: 1rem; background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.profile-cover, .public-profile-cover {
    background-size: cover; background-position: center; background-color: var(--cream);
}
.profile-cover { height: 170px; }
.profile-cover-fallback {
    background:
        linear-gradient(120deg, rgba(45,122,124,.88), rgba(82,102,128,.82)),
        repeating-linear-gradient(45deg, transparent, transparent 18px, rgba(255,255,255,.08) 18px, rgba(255,255,255,.08) 36px);
}
.profile-showcase-main {
    display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, .55fr);
    gap: 1.5rem; align-items: start; padding: 0 1.5rem 1.5rem;
}
.profile-showcase-avatar, .public-profile-avatar {
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; border-radius: 50%; font-weight: 700;
}
.profile-showcase-avatar {
    width: 112px; height: 112px; margin-top: -44px; border: 5px solid var(--card-bg); font-size: 2.25rem;
}
.profile-showcase-avatar img, .public-profile-avatar img, .profile-directory-avatar img,
.mini-avatar img, .creator-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}
.profile-showcase-copy { padding-top: 1.15rem; min-width: 0; }
.profile-identity-line h1, .profile-identity-line h2 { margin: 0; }
.profile-handle { color: var(--text-muted); font-size: .82rem; }
.profile-headline { margin-top: .35rem; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.profile-showcase-bio { max-width: 720px; margin: .7rem 0; color: var(--text-light); line-height: 1.6; }
.profile-showcase-facts { display: flex; flex-direction: column; gap: .65rem; padding-top: 1.35rem; }
.profile-showcase-facts span { display: flex; gap: .55rem; color: var(--text-light); font-size: .84rem; }
.profile-showcase-facts i { width: 17px; color: var(--primary); }
.profile-metric-grid {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem;
}
.profile-metric {
    display: flex; flex-direction: column; padding: 1rem; background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.profile-metric strong { color: var(--primary); font-family: var(--font-display); font-size: 1.4rem; }
.profile-metric span { color: var(--text-muted); font-size: .72rem; text-transform: uppercase; }
.profile-dashboard .profile-tabs { overflow-x: auto; scrollbar-width: thin; }
.profile-dashboard .profile-tab { white-space: nowrap; }
.profile-dashboard-content { padding: 1.5rem 0 3rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.featured-gift-inline {
    display: grid; grid-template-columns: 62px 1fr; gap: 1rem; align-items: start;
    padding: 1rem; background: var(--cream); border-radius: var(--radius-sm); color: var(--text);
}
.featured-gift-inline:hover { color: var(--text); }
.featured-gift-inline h3 { margin: .35rem 0 .2rem; }
.featured-gift-inline p { color: var(--text-light); font-size: .85rem; }
.featured-gift-icon {
    width: 62px; height: 62px; display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; border-radius: var(--radius-sm); font-size: 1.35rem;
}
.readiness-score { display: flex; align-items: baseline; gap: .45rem; margin: .5rem 0; }
.readiness-score strong { font-family: var(--font-display); color: var(--primary); font-size: 2rem; }
.readiness-score span { color: var(--text-muted); }
.progress-track { height: 8px; overflow: hidden; background: var(--cream); border-radius: 50px; }
.progress-track span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.readiness-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem; }
.readiness-list span { color: var(--text-muted); font-size: .8rem; }
.readiness-list span.complete { color: var(--text-light); }
.readiness-list i { color: var(--border); margin-right: .25rem; }
.readiness-list .complete i { color: var(--sage); }
.empty-state.compact { padding: 2rem 1rem; }

.public-profile-hero { background: var(--card-bg); border-bottom: 1px solid var(--border-light); }
.public-profile-cover { height: 260px; }
.public-profile-header {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem;
    align-items: center; padding-top: 0; padding-bottom: 1.5rem;
}
.public-profile-avatar {
    width: 144px; height: 144px; margin-top: -58px; border: 6px solid var(--card-bg); font-size: 3rem;
}
.public-profile-identity { padding-top: 1rem; min-width: 0; }
.public-profile-identity h1 { font-size: 2rem; }
.public-profile-headline { margin: .4rem 0 .75rem; font-size: 1.08rem; color: var(--text-light); }
.public-profile-meta { color: var(--text-muted); font-size: .82rem; }
.public-profile-meta span { display: flex; align-items: center; gap: .35rem; }
.public-profile-meta i { color: var(--primary); }
.public-profile-actions { justify-content: flex-end; }
.public-profile-actions form { margin: 0; }
.public-profile-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem;
    align-items: start; padding-top: 2rem; padding-bottom: 4rem;
}
.public-profile-main, .public-profile-sidebar { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
.public-profile-sidebar { position: sticky; top: 90px; gap: 1rem; }
.profile-section { min-width: 0; }
.featured-gift-card {
    display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1fr);
    overflow: hidden; color: var(--text); background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.featured-gift-card:hover { color: var(--text); border-color: var(--primary); }
.featured-gift-media {
    min-height: 240px; display: flex; align-items: center; justify-content: center;
    background: var(--cream); color: var(--primary); font-size: 3rem;
}
.featured-gift-media img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.featured-gift-content { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.featured-gift-content p { color: var(--text-light); line-height: 1.65; }
.profile-about-copy { margin: .7rem 0 1rem; color: var(--text-light); line-height: 1.65; }
.availability-box {
    display: flex; gap: .7rem; padding: .85rem; margin-bottom: 1rem;
    background: var(--cream); border-radius: var(--radius-sm);
}
.availability-box i { color: var(--primary); padding-top: .15rem; }
.availability-box div { display: flex; flex-direction: column; gap: .15rem; }
.availability-box span { color: var(--text-light); font-size: .8rem; }
.profile-link-list { display: flex; flex-direction: column; margin-top: .65rem; }
.profile-link-list a {
    display: grid; grid-template-columns: 18px minmax(0, 1fr) 14px; gap: .45rem;
    align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border-light); font-size: .82rem;
}
.profile-link-list a:last-child { border-bottom: 0; }
.profile-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-post-card {
    display: flex; flex-direction: column; min-height: 180px; padding: 1.25rem;
    color: var(--text); background: var(--card-bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.profile-post-card:hover { color: var(--text); border-color: var(--primary); }
.profile-post-card h3 { margin: .65rem 0 .4rem; font-size: 1rem; }
.profile-post-card p { color: var(--text-light); font-size: .84rem; line-height: 1.5; }
.profile-post-card > span:last-child { margin-top: auto; padding-top: .8rem; color: var(--text-muted); font-size: .72rem; }

.gift-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem;
}
.gift-grid-directory { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gift-card {
    min-width: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--text);
    background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.gift-card:hover { color: var(--text); border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.gift-card-media {
    position: relative; height: 180px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: var(--cream); color: var(--primary); font-size: 2.5rem;
}
.gift-card-media img { width: 100%; height: 100%; object-fit: cover; }
.gift-card-body { display: flex; flex-direction: column; flex: 1; padding: 1rem; }
.gift-card-flags { color: var(--text-muted); font-size: .72rem; }
.gift-card-body h3 { margin: .6rem 0 .35rem; font-size: 1.02rem; }
.gift-card-body > p { color: var(--text-light); font-size: .84rem; line-height: 1.5; margin-bottom: .75rem; }
.gift-card-footer {
    display: flex; justify-content: space-between; align-items: center; gap: .75rem;
    margin-top: auto; padding-top: .85rem; color: var(--text-muted); font-size: .72rem;
    border-top: 1px solid var(--border-light);
}
.gift-creator { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.mini-avatar {
    width: 26px; height: 26px; flex: 0 0 26px; overflow: hidden; display: flex;
    align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff;
}
.gift-mode-badge {
    display: inline-flex; align-items: center; width: fit-content; min-height: 23px; padding: .18rem .5rem;
    border-radius: 50px; font-size: .68rem; font-weight: 700; text-transform: uppercase;
}
.mode-free { color: #236b4d; background: #e2f4e9; }
.mode-paid { color: #8a5b08; background: #fff0c9; }
.mode-trade { color: #245f79; background: #dff1f5; }
.mode-volunteer { color: #8f3f3b; background: #fbe4df; }
.mode-request { color: #5b5075; background: #ece7f5; }
.gift-filter-panel {
    display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, .35fr)) auto;
    gap: .65rem; padding: 1rem; margin-bottom: .75rem; background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.gift-search-field { position: relative; }
.gift-search-field i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.gift-search-field .form-input { padding-left: 2.35rem; }
.directory-summary { display: flex; justify-content: space-between; margin-bottom: 1rem; color: var(--text-muted); font-size: .82rem; }

.gift-detail-page { padding-top: 1.5rem; padding-bottom: 4rem; }
.gift-detail-hero {
    display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1fr); gap: 2rem;
    align-items: center; margin-top: 1rem; padding: 1.5rem; background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.gift-detail-media { overflow: hidden; min-height: 380px; border-radius: var(--radius-sm); background: var(--cream); }
.gift-detail-media img { width: 100%; height: 380px; object-fit: cover; }
.gift-detail-placeholder { height: 380px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 5rem; }
.gift-detail-intro h1 { margin: .8rem 0; font-size: 2.35rem; line-height: 1.12; }
.gift-detail-summary { color: var(--text-light); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1rem; }
.premium-badge.static { position: static; }
.gift-detail-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1.25rem 0; }
.gift-detail-specs span {
    display: grid; grid-template-columns: 18px 1fr; gap: .05rem .5rem;
    padding: .75rem; background: var(--cream); border-radius: var(--radius-sm); color: var(--text-light); font-size: .8rem;
}
.gift-detail-specs i { grid-row: 1 / 3; color: var(--primary); padding-top: .15rem; }
.gift-detail-specs strong { color: var(--text); font-size: .75rem; }
.gift-detail-actions { margin-top: 1rem; }
.gift-detail-actions form { margin: 0; }
.gift-detail-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; margin-top: 1.5rem;
}
.gift-detail-content { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.gift-creator-sidebar { position: sticky; top: 90px; }
.gift-description-panel h2 { margin: 1.25rem 0 .65rem; }
.gift-description-panel hr { border: 0; border-top: 1px solid var(--border-light); margin: 1.5rem 0; }
.rich-copy { color: var(--text-light); line-height: 1.8; margin: .8rem 0 1.25rem; }
.creator-card-identity {
    display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: .75rem;
    align-items: center; margin: .8rem 0; color: var(--text);
}
.creator-card-identity:hover { color: var(--text); }
.creator-avatar {
    width: 54px; height: 54px; overflow: hidden; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700;
}
.creator-card-identity span:last-child { display: flex; flex-direction: column; min-width: 0; }
.creator-card-identity small { color: var(--text-muted); }
.creator-card > p { color: var(--text-light); font-size: .85rem; line-height: 1.5; margin-bottom: .75rem; }
.profile-result-placeholder { background: var(--primary); color: #fff; font-weight: 700; font-size: 1.2rem; }
.profile-directory-headline { color: var(--text) !important; font-weight: 600; }
.profile-directory-avatar { overflow: hidden; }

/* --- PRICING --- */
.pricing-section { padding: 3rem 0; }
.pricing-header { text-align: center; margin-bottom: 3rem; }
.pricing-header h1 { font-size: 2.2rem; margin-bottom: .5rem; }
.pricing-header p { color: var(--text-light); font-size: 1.1rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.pricing-card {
    background: var(--card-bg); border-radius: var(--radius-xl); padding: 2rem;
    border: 2px solid var(--border-light); text-align: center; position: relative;
    transition: all var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--primary); }
.pricing-card.popular::before {
    content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; padding: .25rem 1rem; border-radius: 50px;
    font-size: .75rem; font-weight: 600;
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.pricing-amount { font-size: 2.5rem; font-weight: 700; font-family: var(--font-display); }
.pricing-amount span { font-size: .9rem; color: var(--text-muted); font-weight: 400; }
.pricing-features { list-style: none; margin: 1.5rem 0; text-align: left; }
.pricing-features li {
    padding: .4rem 0; font-size: .88rem; color: var(--text-light);
    display: flex; align-items: flex-start; gap: .5rem;
}
.pricing-features li::before { content: '✓'; color: var(--sage); font-weight: 700; }
.pricing-card .btn { margin-top: auto; }

/* --- MESSAGES --- */
.messages-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; padding-top: 2rem; min-height: 500px; }
.message-list {
    background: var(--card-bg); border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    overflow: hidden;
}
.message-thread-item {
    display: flex; align-items: center; gap: .75rem; padding: 1rem;
    border-bottom: 1px solid var(--border-light); cursor: pointer;
    transition: background var(--transition); text-decoration: none; color: var(--text);
}
.message-thread-item:hover, .message-thread-item.active { background: var(--primary-light); }
.message-thread-item .post-avatar { width: 36px; height: 36px; font-size: .8rem; }
.message-thread-name { font-weight: 600; font-size: .87rem; }
.message-thread-preview { font-size: .78rem; color: var(--text-muted); }

.message-chat {
    background: var(--card-bg); border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    display: flex; flex-direction: column;
}
.message-chat-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-light); }
.message-chat-body { flex: 1; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; }
.message-bubble {
    max-width: 70%; padding: .75rem 1rem; border-radius: var(--radius-lg); font-size: .9rem;
}
.message-bubble.sent { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.message-bubble.received { background: var(--cream); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.message-bubble .message-time { font-size: .7rem; opacity: .7; margin-top: .3rem; display: block; }
.message-chat-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); }
.message-chat-footer form { display: flex; gap: .75rem; }
.message-chat-footer .form-input { flex: 1; }

/* --- ADMIN --- */
.admin-layout { min-width: 0; max-width: 100%; padding-top: 2rem; overflow-x: hidden; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.admin-stat-card {
    background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem;
    border: 1px solid var(--border-light); text-align: center;
}
.admin-stat-card .stat-number { font-size: 2rem; }
.admin-stat-card .stat-label { font-size: .82rem; }
.admin-tabs { display: flex; gap: .25rem; margin-bottom: 1.5rem; }
.admin-tab {
    padding: .55rem 1.2rem; border-radius: 50px; font-size: .87rem;
    color: var(--text-light); text-decoration: none; transition: all var(--transition);
}
.admin-tab.active { background: var(--primary); color: #fff; }
.admin-tab:hover { background: var(--primary-light); color: var(--primary); }
.admin-table { display: block; width: 100%; max-width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius-lg); overflow-x: auto; border: 1px solid var(--border-light); }
.admin-table th { padding: .75rem 1rem; text-align: left; font-size: .82rem; text-transform: uppercase; color: var(--text-muted); background: var(--cream); border-bottom: 1px solid var(--border); }
.admin-table td { padding: .75rem 1rem; font-size: .87rem; border-bottom: 1px solid var(--border-light); }
.admin-table tr:last-child td { border: none; }
.admin-table .actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.admin-table .btn-xs { padding: .25rem .55rem; font-size: .75rem; border-radius: 4px; }
.admin-alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .75rem; }
.admin-alert-warning { background: #fff3cd; border: 1px solid #ffc107; color: #856404; }
.admin-alert i { font-size: 1.1rem; }
.admin-bar-chart { display: flex; align-items: flex-end; gap: .35rem; height: 120px; padding: 0; }
.admin-bar { background: var(--primary); border-radius: 3px 3px 0 0; min-width: 24px; position: relative; transition: background .2s; flex: 1; }
.admin-bar:hover { background: var(--secondary); }
.admin-bar-label { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: .65rem; color: var(--text-muted); white-space: nowrap; }
.admin-bar-value { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .65rem; font-weight: 600; white-space: nowrap; }
.admin-chart-section { margin-bottom: 2rem; }
.admin-chart-section h3 { margin-bottom: .75rem; font-size: 1rem; }
.admin-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.admin-report-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.25rem; }
.admin-log-item { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border-light); font-size: .85rem; }
.admin-log-item:last-child { border-bottom: none; }
.admin-log-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; flex-shrink: 0; }
.admin-log-icon.log-product { background: #e8f5e9; color: #2e7d32; }
.admin-log-icon.log-order { background: #e3f2fd; color: #1565c0; }
.admin-log-icon.log-user { background: #fce4ec; color: #c62828; }
.admin-log-icon.log-post { background: #fff3e0; color: #e65100; }
.admin-log-icon.log-pattern { background: #f3e5f5; color: #6a1b9a; }
.admin-log-time { color: var(--text-muted); font-size: .75rem; margin-top: .15rem; }
.stock-low { color: #e65100; font-weight: 600; }
.stock-critical { color: #c62828; font-weight: 700; }
.stock-ok { color: var(--sage); }
.user-suspended { opacity: .6; }
.badge-suspended { background: #c62828; color: #fff; padding: .15rem .45rem; border-radius: 3px; font-size: .7rem; font-weight: 600; }

/* Refund button */
.btn-refund { background: var(--primary, #5a8a5c); color: #fff; border: none; cursor: pointer; }
.btn-refund:hover { background: #3d6b3f; color: #fff; }

/* --- CTA SECTION --- */
.cta-section { background: linear-gradient(135deg, var(--primary), var(--secondary)); padding: 5rem 0; text-align: center; }
.cta-content h2 { font-size: 2rem; color: #fff; margin-bottom: .75rem; }
.cta-content p { color: rgba(255,255,255,.85); font-size: 1.1rem; margin-bottom: 2rem; }
.cta-content .btn-primary { background: #fff; color: var(--primary); }
.cta-content .btn-primary:hover { background: var(--cream); box-shadow: var(--shadow-lg); }

/* --- EMPTY STATE --- */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 3rem; color: var(--border); margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p { color: var(--text-light); margin-bottom: 1.5rem; }

/* --- FOOTER --- */
.footer { background: #2d2a32; color: rgba(255,255,255,.8); padding: 4rem 0 0; margin-top: 4rem; }
.footer-container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; }
.footer h3 { color: #fff; font-size: 1.2rem; margin-bottom: .75rem; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-tagline { font-family: var(--font-hand); font-size: 1.1rem; color: var(--primary-light); margin-bottom: .75rem; }
.footer-col a { display: block; color: rgba(255,255,255,.6); padding: .25rem 0; font-size: .88rem; transition: color var(--transition); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: .75rem; margin-top: 1rem; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-bottom { text-align: center; padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: rgba(255,255,255,.4); }

/* --- FOLLOW BUTTON --- */
.follow-btn { padding: .45rem 1.2rem; }

/* --- NOTIFICATIONS --- */
.notif-list { display: flex; flex-direction: column; gap: .25rem; }
.notif-item { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: background var(--transition), border-color var(--transition); }
.notif-item:hover { background: var(--cream); border-color: var(--border); }
.notif-unread { background: var(--primary-light); border-color: var(--primary); }
.notif-unread:hover { background: #f5dde4; }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.notif-icon.notif-comment { background: #e3f2fd; color: #1565c0; }
.notif-icon.notif-like { background: #fce4ec; color: #c62828; }
.notif-icon.notif-follow { background: #e8f5e9; color: #2e7d32; }
.notif-icon.notif-review { background: #fff8e1; color: #f57f17; }
.notif-icon.notif-badge { background: #f3e5f5; color: #6a1b9a; }
.notif-icon.notif-system { background: #eceff1; color: #546e7a; }
.notif-body { flex: 1; min-width: 0; }
.notif-message { font-size: .9rem; margin: 0; line-height: 1.4; }
.notif-time { font-size: .75rem; color: var(--text-muted); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }

/* --- REVIEWS --- */
.reviews-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border-light); }
.reviews-section h2 { margin-bottom: 1.25rem; font-family: var(--font-display); }
.review-form { background: var(--cream); padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.star-rating-input { margin-bottom: .75rem; display: flex; align-items: center; gap: .75rem; }
.star-rating-input label:first-child { font-weight: 500; font-size: .9rem; }
.star-select { display: flex; flex-direction: row-reverse; gap: .1rem; }
.star-select input { display: none; }
.star-select label { cursor: pointer; font-size: 1.3rem; color: var(--border); transition: color .15s; }
.star-select label:hover, .star-select label:hover ~ label,
.star-select input:checked ~ label { color: #f5a623; }
.reviews-list { display: flex; flex-direction: column; gap: .75rem; }
.review-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 1rem 1.25rem; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.review-author { font-size: .9rem; }
.review-stars { color: #f5a623; font-size: .85rem; }
.review-body { font-size: .9rem; color: var(--text-light); line-height: 1.5; margin-bottom: .35rem; }
.review-time { font-size: .75rem; color: var(--text-muted); }
.pattern-rating-summary { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; }
.stars-display { color: #f5a623; font-size: .95rem; }
.rating-text { font-size: .85rem; color: var(--text-light); }

/* --- VIDEO EMBED --- */
.pattern-video { margin: 2rem 0; }
.pattern-video h2 { margin-bottom: 1rem; font-family: var(--font-display); }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- PATTERN ACTIONS --- */
.pattern-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

/* --- BOOKMARKS --- */
.bookmarked { color: var(--primary) !important; }
.bookmarked i { color: var(--primary); }
.pattern-card-wrap { position: relative; }
.bookmark-remove-form { position: absolute; top: .5rem; right: .5rem; z-index: 2; }
.btn-bookmark-remove { background: rgba(255,255,255,.9); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--primary); font-size: .9rem; display: flex; align-items: center; justify-content: center; transition: all var(--transition); box-shadow: var(--shadow-sm); }
.btn-bookmark-remove:hover { background: var(--primary); color: #fff; }

/* --- BADGES --- */
.profile-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.user-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; background: var(--gold-light); color: var(--gold); border-radius: 12px; font-size: .72rem; font-weight: 600; border: 1px solid rgba(212,167,106,.3); }
.user-badge i { font-size: .65rem; }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.badge-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.25rem; text-align: center; transition: transform var(--transition), box-shadow var(--transition); }
.badge-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.badge-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--gold-light); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin: 0 auto .75rem; }
.badge-card h3 { font-size: .95rem; margin-bottom: .25rem; }
.badge-card p { font-size: .8rem; color: var(--text-light); margin-bottom: .5rem; }
.badge-date { font-size: .72rem; color: var(--text-muted); }
.badges-all-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.badge-mini { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 12px; font-size: .78rem; }
.badge-earned { background: var(--gold-light); color: var(--gold); border: 1px solid rgba(212,167,106,.3); font-weight: 600; }
.badge-locked { background: var(--border-light); color: var(--text-muted); border: 1px solid var(--border-light); }
.badge-locked i { opacity: .5; }

/* --- STITCH LIBRARY --- */
.stitch-quickref { background: var(--cream); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.stitch-abbr-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.stitch-abbr { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 6px; padding: .35rem .7rem; font-size: .82rem; color: var(--text-light); }
.stitch-abbr strong { color: var(--primary); margin-right: .25rem; }
.stitch-category { margin-bottom: 2.5rem; }
.stitch-category-title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: .35rem; display: flex; align-items: center; gap: .5rem; }
.stitch-category-title i { color: var(--primary); }
.stitch-category-count { font-size: .8rem; font-weight: 400; color: var(--text-muted); font-family: var(--font-body); }
.stitch-category-desc { color: var(--text-light); font-size: .9rem; margin-bottom: 1.25rem; }
.stitch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; }
.stitch-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1rem 1.25rem; cursor: pointer; transition: border-color var(--transition), box-shadow var(--transition); }
.stitch-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.stitch-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.stitch-name { font-size: 1rem; font-family: var(--font-display); }
.stitch-expand-icon { color: var(--text-muted); font-size: .7rem; transition: transform .2s; }
.stitch-card.expanded .stitch-expand-icon { transform: rotate(180deg); }
.stitch-desc { font-size: .85rem; color: var(--text-light); line-height: 1.4; }
.stitch-steps { display: none; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border-light); font-size: .85rem; line-height: 1.6; color: var(--text); }
.stitch-card.expanded .stitch-steps { display: block; }
.stitch-steps h4 { font-size: .8rem; text-transform: uppercase; color: var(--primary); margin-bottom: .35rem; letter-spacing: .5px; }
.yarn-weight-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.yarn-weight-table th { background: var(--primary-light); color: var(--primary-dark); padding: .6rem .75rem; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; }
.yarn-weight-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border-light); }
.yarn-weight-table tr:last-child td { border-bottom: none; }
.yarn-weight-table tr:hover { background: var(--cream); }

/* --- REPORT MODAL TWEAKS --- */
.modal .form-group select { appearance: auto; }

/* --- DARK MODE --- */
html.dark-mode {
    --primary: #72b5b9;
    --primary-dark: #4f8f93;
    --primary-light: #203234;
    --secondary: #a7a9bd;
    --secondary-light: #2a2b34;
    --accent: #e07a73;
    --accent-light: #3b2728;
    --sage: #78ad8b;
    --sage-light: #213129;
    --cream: #222427;
    --warm-white: #191c1f;
    --gold: #d1a84f;
    --gold-light: #332e20;
    --text: #edf0f2;
    --text-light: #b0b7bf;
    --text-muted: #7c858e;
    --border: #394047;
    --border-light: #2b3137;
    --bg: #14181b;
    --card-bg: #1d2226;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow: 0 4px 12px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.5);
    --shadow-xl: 0 20px 60px rgba(0,0,0,.6);
}

html.dark-mode body { color: var(--text); background: var(--bg); }
html.dark-mode .navbar { background: rgba(24,28,31,.95); border-bottom-color: var(--border); }
html.dark-mode .footer { background: #101315; }
html.dark-mode .flash-success { background: var(--sage-light); color: var(--sage); }
html.dark-mode .flash-error { background: var(--accent-light); color: var(--accent); }
html.dark-mode .flash-info { background: var(--secondary-light); color: var(--secondary); }
html.dark-mode .admin-table th { background: #252330; }
html.dark-mode .admin-alert-warning { background: #2e2618; border-color: #d4a76a; color: #d4a76a; }
html.dark-mode .demo-accounts { background: var(--card-bg); }
html.dark-mode .demo-accounts code { background: var(--primary-light); }
html.dark-mode .comment-body { background: var(--cream); }
html.dark-mode img { opacity: .92; }
html.dark-mode .product-placeholder,
html.dark-mode .pattern-placeholder,
html.dark-mode .blog-placeholder { background: linear-gradient(135deg, var(--border), var(--card-bg)); }
html.dark-mode .stitch-quickref { background: var(--card-bg); }
html.dark-mode .yarn-weight-table th { background: var(--primary-light); color: var(--primary); }
html.dark-mode .yarn-weight-table tr:hover { background: var(--cream); }
html.dark-mode .stripe-placeholder { background: var(--card-bg); }
html.dark-mode .review-form { background: var(--card-bg); }
html.dark-mode .cta-section { background: linear-gradient(135deg, #203234, #2a2b34); }
html.dark-mode .newsletter-section { background: linear-gradient(135deg, #2a2b34, #203234); }

html.dark-mode * { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }

.dark-mode-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--text-light); font-size: 1.1rem; padding: .5rem;
    border-radius: var(--radius-sm); transition: all var(--transition);
}
.dark-mode-toggle:hover { color: var(--gold); background: var(--gold-light); }

/* --- BLOG STYLES --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.blog-card {
    background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-light); transition: all var(--transition);
    text-decoration: none; color: var(--text); display: block;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.blog-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.blog-card-featured .blog-card-image { height: auto; min-height: 280px; }
.blog-card-image { height: 200px; overflow: hidden; position: relative; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--border); background: linear-gradient(135deg, var(--cream), var(--secondary-light));
}
.blog-category-badge {
    position: absolute; top: .75rem; left: .75rem;
    background: var(--primary); color: #fff; padding: .2rem .6rem;
    border-radius: 50px; font-size: .72rem; font-weight: 600;
}
.blog-card-content { padding: 1.5rem; }
.blog-card-content h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.blog-card-content p { color: var(--text-light); font-size: .9rem; margin-bottom: .75rem; line-height: 1.5; }
.blog-card-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--text-muted); }

/* Article Detail */
.article-detail { margin-top: 1.5rem; background: var(--card-bg); border-radius: var(--radius-lg); padding: 2.5rem; border: 1px solid var(--border-light); }
.article-header { margin-bottom: 2rem; }
.article-header h1 { font-size: 2rem; margin-bottom: .75rem; }
.article-meta { display: flex; gap: 1.5rem; color: var(--text-muted); font-size: .9rem; }
.article-meta i { margin-right: .3rem; color: var(--primary); }
.article-hero-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.article-hero-image img { width: 100%; max-height: 450px; object-fit: cover; }
.article-body { font-size: 1rem; line-height: 1.9; color: var(--text-light); white-space: pre-wrap; }
.related-articles { margin-top: 3rem; }
.related-articles h2 { margin-bottom: 1.5rem; }

/* --- WISHLIST STYLES --- */
.wishlist-card { position: relative; }
.wishlist-remove-btn { position: absolute; top: .5rem; right: .5rem; z-index: 2; }
.btn-wishlist-remove {
    background: rgba(255,255,255,.9); border: none; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; color: var(--accent); font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.btn-wishlist-remove:hover { background: var(--accent); color: #fff; }

.wishlist-heart-form { position: absolute; top: .5rem; right: .5rem; z-index: 2; }
.btn-wishlist-heart {
    background: rgba(255,255,255,.9); border: none; width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer; color: var(--text-muted); font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.btn-wishlist-heart:hover { color: var(--accent); }
.btn-wishlist-heart.wishlisted { color: var(--accent); background: rgba(255,255,255,.95); }

/* --- PRODUCT RATING MINI (shop cards) --- */
.product-rating-mini { display: flex; align-items: center; gap: .3rem; margin: .2rem 0; }
.product-rating-mini .stars-display { font-size: .72rem; color: #f5a623; }
.product-rating-mini .rating-count { font-size: .72rem; color: var(--text-muted); }

/* --- SEARCH STYLES --- */
.search-page-form { margin-bottom: 1rem; }
.search-bar-lg { display: flex; align-items: center; gap: .75rem; background: var(--card-bg); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: .5rem .5rem .5rem 1.25rem; transition: border-color var(--transition); }
.search-bar-lg:focus-within { border-color: var(--primary); }
.search-bar-icon { color: var(--text-muted); font-size: 1.1rem; }
.search-input-lg { border: none !important; font-size: 1.05rem; flex: 1; background: transparent !important; padding: .6rem .5rem !important; }
.search-input-lg:focus { outline: none; }

.search-section { margin-bottom: 2rem; }
.search-section-title { font-size: 1.15rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.search-count { font-size: .8rem; font-weight: 400; color: var(--text-muted); font-family: var(--font-body); }

.search-results { display: flex; flex-direction: column; gap: .5rem; }
.search-result-item {
    display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius);
    text-decoration: none; color: var(--text); transition: all var(--transition);
}
.search-result-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); color: var(--text); }
.search-result-image { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.search-result-image img { width: 100%; height: 100%; object-fit: cover; }
.search-result-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: var(--cream); color: var(--border); font-size: 1.5rem; border-radius: var(--radius-sm);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-info h3 { font-size: .95rem; margin-bottom: .25rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.search-result-info p { font-size: .85rem; color: var(--text-light); margin-bottom: .3rem; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { display: flex; gap: .75rem; font-size: .78rem; color: var(--text-muted); align-items: center; }
.search-result-info mark { background: var(--gold-light); color: var(--gold); padding: .05rem .15rem; border-radius: 2px; }

/* --- PROFILE DIRECTORY --- */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.profile-directory-card {
    position: relative;
    min-height: 220px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .8rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.profile-directory-card:hover {
    color: var(--text);
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.profile-directory-card > .tier-badge { position: absolute; top: 1rem; right: 1rem; }
.profile-directory-avatar {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}
.profile-directory-body h3 { padding-right: 4.5rem; font-size: 1.05rem; }
.profile-directory-body > p { color: var(--text-light); font-size: .86rem; line-height: 1.55; }
.profile-directory-username { color: var(--text-muted) !important; margin-bottom: .45rem; }
.profile-directory-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .75rem;
    margin-top: .8rem;
    color: var(--text-muted);
    font-size: .75rem;
}
.profile-directory-meta i { color: var(--gold); }

/* --- EXCHANGE BOARD --- */
.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.exchange-card {
    min-height: 220px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.exchange-card-top,
.exchange-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.exchange-card h2 { margin: .9rem 0 .55rem; font-size: 1.05rem; }
.exchange-card h2 a { color: var(--text); }
.exchange-card h2 a:hover { color: var(--primary); }
.exchange-card > p { color: var(--text-light); font-size: .87rem; line-height: 1.6; }
.exchange-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* --- PHASE 3 COMMUNITIES --- */
.community-directory, .exchange-directory, .exchange-detail-page { padding-top: 1.5rem; }
.community-filter-bar, .exchange-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(160px, .65fr) auto;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.community-search-field, .exchange-search-field { position: relative; }
.community-search-field > i, .exchange-search-field > i {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); z-index: 1;
}
.community-search-field .form-input, .exchange-search-field .form-input { padding-left: 2.4rem; }
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.community-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.community-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.community-card-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 144px;
    overflow: hidden;
    color: #fff;
    background: #2f6870;
}
.community-card-media img { width: 100%; height: 100%; object-fit: cover; }
.community-card-fallback { background: linear-gradient(135deg, #2f6870, #8a6b4c); }
.community-card-fallback > i { font-size: 2.4rem; opacity: .9; }
.community-visibility {
    position: absolute; right: .75rem; top: .75rem; display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .55rem; border-radius: 6px; color: #fff; background: rgba(20,25,28,.76); font-size: .72rem; font-weight: 600;
}
.community-card-body { padding: 1.1rem 1.15rem .8rem; flex: 1; }
.community-card-body h2 { font-size: 1.1rem; margin: .35rem 0 .45rem; color: var(--text); }
.community-card-body > p { color: var(--text-light); font-size: .86rem; line-height: 1.55; }
.community-parent-link { color: var(--primary); font-size: .72rem; font-weight: 600; }
.community-card-meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .85rem; color: var(--text-muted); font-size: .74rem; }
.community-card-meta i { color: var(--gold); }
.community-card-footer { min-height: 56px; padding: .75rem 1.15rem; border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.community-category, .member-role {
    display: inline-flex; align-items: center; min-height: 24px; padding: .2rem .5rem; border-radius: 6px;
    background: var(--secondary-light); color: var(--secondary); font-size: .7rem; font-weight: 600;
}
.membership-state, .exchange-status, .exchange-type {
    display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: .22rem .55rem;
    border-radius: 6px; font-size: .7rem; line-height: 1; font-weight: 700; white-space: nowrap;
}
.state-active, .state-public, .status-open, .status-accepted { color: #24633c; background: #e4f3e8; }
.state-requested, .state-invited, .status-in_progress, .status-pending { color: #8b5b08; background: #fff1cd; }
.state-blocked, .state-private, .status-cancelled, .status-declined, .status-expired { color: #9c3434; background: #fde5e5; }
.status-completed { color: #315b87; background: #e4eef9; }
.type-offer { color: #245f62; background: #dff1f0; }
.type-request { color: #8e3c54; background: #f8e3ea; }
.type-trade { color: #67518e; background: #eee8f8; }
.type-volunteer { color: #78572c; background: #f5ead8; }

.community-hero { position: relative; min-height: 340px; background-size: cover; background-position: center; color: #fff; }
.community-hero-fallback { background: linear-gradient(135deg, #254e55, #6b5365 52%, #8a6b4c); }
.community-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,25,27,.9), rgba(18,25,27,.55)); }
.community-hero-content { position: relative; z-index: 1; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.community-breadcrumb { display: inline-flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.8); margin-bottom: 2rem; font-size: .85rem; }
.community-breadcrumb:hover { color: #fff; }
.community-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.community-title-row h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); margin: .5rem 0 .7rem; letter-spacing: 0; }
.community-title-row p { color: rgba(255,255,255,.84); max-width: 760px; line-height: 1.65; }
.community-title-flags, .community-hero-meta { display: flex; flex-wrap: wrap; gap: .55rem 1rem; }
.community-title-flags span { padding: .25rem .55rem; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; background: rgba(255,255,255,.08); font-size: .72rem; font-weight: 600; }
.community-hero-meta { margin-top: 1rem; color: rgba(255,255,255,.8); font-size: .8rem; }
.community-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; min-width: 180px; }
.community-hero-actions .community-edit-button { color: #fff; border-color: rgba(255,255,255,.55); }
.community-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.5rem; padding-top: 1.5rem; }
.community-main, .community-sidebar { min-width: 0; }
.community-section { margin-bottom: 1.5rem; }
.community-post-list { display: flex; flex-direction: column; gap: .8rem; }
.subcommunity-list, .profile-community-list, .community-gift-list { display: flex; flex-direction: column; gap: .5rem; }
.subcommunity-list a, .profile-community-list a, .community-gift-list a {
    display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: .75rem;
    padding: .85rem 1rem; color: var(--text); text-decoration: none; background: var(--card-bg);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.subcommunity-list a:hover, .profile-community-list a:hover, .community-gift-list a:hover { border-color: var(--primary); color: var(--text); }
.subcommunity-list > a > i:first-child, .profile-community-list > a > i:first-child, .community-gift-list > a > i:first-child { color: var(--primary); text-align: center; }
.subcommunity-list small, .profile-community-list small, .community-gift-list small { display: block; margin-top: .15rem; color: var(--text-muted); font-size: .74rem; }
.community-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.community-member-list { display: flex; flex-direction: column; }
.community-member {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: .65rem;
    padding: .7rem 0; color: var(--text); border-bottom: 1px solid var(--border-light);
}
.community-member:last-child { border-bottom: none; }
.community-member:hover { color: var(--primary); }
.community-member-avatar, .mini-avatar {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex: 0 0 38px;
    overflow: hidden; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700;
}
.community-member-avatar img, .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.community-member small { display: block; margin-top: .1rem; color: var(--text-muted); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.community-admin-panel h2 { font-size: 1.1rem; margin: .15rem 0 1rem; }
.compact-form { margin-bottom: 1rem; }
.compact-form label, .exchange-status-form label { display: block; margin-bottom: .4rem; font-size: .8rem; font-weight: 600; }
.inline-control { display: flex; gap: .4rem; }
.inline-control .form-input { min-width: 0; }
.pending-member-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--border-light); }
.pending-member-row small { display: block; color: var(--text-muted); font-size: .7rem; }
.pending-member-row form { display: flex; gap: .35rem; }
.panel-divider { border: 0; border-top: 1px solid var(--border-light); margin: 1.5rem 0; }
.member-management-list { display: flex; flex-direction: column; gap: .5rem; }
.member-management-row { display: grid; grid-template-columns: minmax(140px, 1fr) auto minmax(260px, auto); align-items: center; gap: .7rem; padding: .8rem; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.member-management-row small { display: block; color: var(--text-muted); font-size: .72rem; }
.member-management-row form { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; }
.compact-select { width: 112px; padding: .35rem .45rem; font-size: .75rem; }

/* --- PHASE 3 EXCHANGE --- */
.exchange-filter-panel { grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(150px, 1fr)); }
.toggle-field { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 43px; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-bg); font-size: .8rem; cursor: pointer; }
.toggle-field input { accent-color: var(--primary); }
.form-toggle { align-self: end; margin-bottom: 1rem; }
.exchange-card { min-width: 0; }
.exchange-card-link { display: flex; flex-direction: column; flex: 1; color: var(--text); text-decoration: none; }
.exchange-card-link:hover { color: var(--text); }
.exchange-card h2, .exchange-card h3 { margin: .9rem 0 .55rem; font-size: 1.05rem; color: var(--text); }
.exchange-card-link > p, .exchange-card > p { color: var(--text-light); font-size: .87rem; line-height: 1.6; }
.exchange-related-gift { display: flex; align-items: center; gap: .45rem; margin-top: .75rem; color: var(--primary); font-size: .78rem; font-weight: 600; }
.exchange-card-details { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin: .8rem 0; color: var(--text-muted); font-size: .72rem; }
.exchange-card-details i { color: var(--gold); }
.exchange-owner { display: flex; align-items: center; gap: .45rem; min-width: 0; color: var(--text); font-size: .78rem; font-weight: 600; }
.exchange-owner .mini-avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: .7rem; }
.exchange-community-link { display: block; padding-top: .65rem; margin-top: .65rem; border-top: 1px solid var(--border-light); color: var(--primary); font-size: .75rem; font-weight: 600; }
.exchange-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; }
.exchange-detail-card, .exchange-response-card {
    padding: 1.5rem; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.exchange-detail-header h1 { font-size: 2rem; margin: .8rem 0; letter-spacing: 0; }
.exchange-detail-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--text-muted); font-size: .78rem; }
.exchange-description { margin: 1.5rem 0; color: var(--text-light); line-height: 1.8; }
.exchange-need-box { display: flex; align-items: center; gap: .8rem; padding: 1rem; margin: 1rem 0; background: var(--gold-light); border: 1px solid rgba(173,130,58,.25); border-radius: var(--radius-sm); color: var(--gold); }
.exchange-need-box span, .exchange-owner-card small, .exchange-gift-card small, .exchange-community-banner small { display: block; color: var(--text-muted); font-size: .7rem; }
.exchange-gift-card, .exchange-community-banner, .message-exchange-context {
    display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: .8rem;
    margin-top: 1rem; padding: .85rem; color: var(--text); border: 1px solid var(--border-light); border-radius: var(--radius-sm); text-decoration: none;
}
.exchange-gift-card:hover, .exchange-community-banner:hover, .message-exchange-context:hover { color: var(--text); border-color: var(--primary); }
.exchange-gift-card > div { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; color: #fff; background: var(--primary); }
.exchange-gift-card img { width: 100%; height: 100%; object-fit: cover; }
.exchange-gift-card p { color: var(--text-muted); font-size: .75rem; }
.exchange-community-banner { grid-template-columns: 36px minmax(0, 1fr) auto; background: var(--secondary-light); }
.exchange-community-banner > i:first-child { color: var(--secondary); text-align: center; }
.exchange-detail-sidebar { position: sticky; top: 88px; align-self: start; }
.exchange-owner-card { display: flex; align-items: center; gap: .8rem; color: var(--text); }
.exchange-owner-card:hover { color: var(--primary); }
.exchange-owner-avatar { width: 62px; height: 62px; flex: 0 0 62px; margin: 0; font-size: 1.4rem; }
.exchange-owner-card p { color: var(--text-muted); font-size: .75rem; }
.exchange-status-form { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border-light); }
.exchange-status-form .form-input { margin-bottom: .6rem; }
.exchange-responses { margin-top: 1.5rem; }
.exchange-response-card { margin-bottom: .75rem; }
.exchange-response-person { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.exchange-response-person small { display: block; color: var(--text-muted); font-size: .72rem; }
.exchange-response-card > p { margin: 1rem 0; color: var(--text-light); line-height: 1.65; }
.exchange-response-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.exchange-response-actions form { display: flex; gap: .4rem; }
.response-state-note { margin: .7rem 0; color: var(--text-muted); text-align: center; font-size: .78rem; }
.btn-text { background: transparent; color: var(--text-muted); border: 0; }
.btn-text:hover { color: var(--accent); }
.profile-community-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.profile-community-card {
    display: flex; flex-direction: column; min-height: 180px; padding: 1rem; color: var(--text);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--card-bg);
}
.profile-community-card:hover { color: var(--text); border-color: var(--primary); }
.profile-community-card h3 { margin: .7rem 0 .4rem; }
.profile-community-card p { color: var(--text-light); font-size: .82rem; line-height: 1.5; }
.profile-community-card > div { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding-top: .8rem; color: var(--text-muted); font-size: .75rem; }
.profile-exchange-heading { margin-top: 2rem; }
.message-exchange-context { grid-template-columns: 28px minmax(0, 1fr) auto; margin: 0; border-width: 0 0 1px; border-radius: 0; background: var(--secondary-light); }
.message-exchange-context > i:first-child { color: var(--secondary); }
.message-context-label { display: block; margin-bottom: .35rem; color: inherit; opacity: .72; font-size: .68rem; font-weight: 600; }

/* --- NEWSLETTER SECTION --- */
.newsletter-section {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    padding: 3rem 0; margin-top: 3rem;
}
.newsletter-content {
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem; flex-wrap: wrap;
}
.newsletter-text h2 { color: #fff; font-size: 1.5rem; margin-bottom: .3rem; }
.newsletter-text p { color: rgba(255,255,255,.8); font-size: .95rem; }
.newsletter-form { display: flex; gap: .5rem; flex: 1; max-width: 450px; }
.newsletter-input {
    flex: 1; background: rgba(255,255,255,.15) !important;
    border-color: rgba(255,255,255,.3) !important; color: #fff !important;
}
.newsletter-input::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form .btn-primary { background: #fff; color: var(--primary); white-space: nowrap; }
.newsletter-form .btn-primary:hover { background: var(--cream); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--card-bg); padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 100; }
    .nav-links.open { display: flex; }
    .mobile-toggle { display: block; }
    .hero { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
    .hero-visual { display: none; }
    .hero-title { font-size: 2.6rem; }
    .features-grid { grid-template-columns: 1fr; }
    .community-layout { grid-template-columns: 1fr; }
    .sidebar { order: -1; }
    .pattern-detail-header { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .profile-layout { grid-template-columns: 1fr; }
    .messages-layout { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-report-grid { grid-template-columns: 1fr; }
    .admin-tabs { flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cart-item { flex-wrap: wrap; }
    .cart-item-actions { width: 100%; justify-content: flex-end; }
    .feed-header { flex-direction: column; align-items: flex-start; }
    .feed-actions { width: 100%; }
    .search-input { flex: 1; }
    .blog-card-featured { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .newsletter-content { flex-direction: column; text-align: center; }
    .newsletter-form { max-width: 100%; }
    .search-bar-lg { flex-wrap: wrap; }
    .article-detail { padding: 1.5rem; }
    .article-header h1 { font-size: 1.5rem; }
    .profiles-grid, .exchange-grid { grid-template-columns: 1fr; }
    .community-grid { grid-template-columns: 1fr; }
    .community-filter-bar, .exchange-filter-panel { grid-template-columns: 1fr 1fr; }
    .community-search-field, .exchange-search-field { grid-column: 1 / -1; }
    .community-title-row, .community-detail-layout, .exchange-detail-layout { grid-template-columns: 1fr; }
    .community-hero-actions { justify-content: flex-start; }
    .community-sidebar, .exchange-detail-sidebar { position: static; }
    .member-management-row { grid-template-columns: 1fr auto; }
    .member-management-row form { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
    .profile-showcase-main { grid-template-columns: auto 1fr; }
    .profile-showcase-facts { grid-column: 1 / -1; padding-top: 0; flex-direction: row; flex-wrap: wrap; }
    .profile-metric-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid, .public-profile-layout, .gift-detail-layout { grid-template-columns: 1fr; }
    .public-profile-sidebar, .gift-creator-sidebar { position: static; }
    .public-profile-header { grid-template-columns: auto 1fr; }
    .public-profile-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .gift-filter-panel { grid-template-columns: 1fr 1fr; }
    .gift-filter-panel .gift-search-field { grid-column: 1 / -1; }
    .gift-detail-hero { grid-template-columns: 1fr; }
    .gift-detail-media, .gift-detail-media img, .gift-detail-placeholder { min-height: 300px; height: 300px; }
    .featured-gift-card { grid-template-columns: 1fr; }
    .featured-gift-media, .featured-gift-media img { min-height: 210px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.1rem; }
    .hero-actions { flex-direction: column; }
    .hero-stats { gap: 1.5rem; }
    .patterns-grid, .products-grid { grid-template-columns: 1fr; }
    .posts-preview-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .stitch-grid { grid-template-columns: 1fr; }
    .badges-grid { grid-template-columns: repeat(2, 1fr); }
    .pattern-actions { flex-direction: column; }
    .star-rating-input { flex-direction: column; align-items: flex-start; }
    .page-header-actions { width: 100%; justify-content: stretch; }
    .page-header-actions .btn { flex: 1; }
    .profile-showcase-main { grid-template-columns: 1fr; text-align: center; }
    .profile-showcase-avatar { margin: -48px auto 0; }
    .profile-identity-line, .profile-showcase-facts { justify-content: center; }
    .profile-showcase-copy .tag-list { justify-content: center; }
    .profile-metric-grid { grid-template-columns: repeat(2, 1fr); }
    .readiness-list, .profile-post-grid, .gift-detail-specs { grid-template-columns: 1fr; }
    .public-profile-cover { height: 180px; }
    .public-profile-header { grid-template-columns: 1fr; text-align: center; }
    .public-profile-avatar { width: 116px; height: 116px; margin: -54px auto 0; }
    .public-profile-identity { padding-top: 0; }
    .public-profile-identity .profile-identity-line, .public-profile-meta, .public-profile-actions { justify-content: center; }
    .public-profile-actions { flex-direction: column; align-items: stretch; }
    .public-profile-actions form, .public-profile-actions .btn { width: 100%; }
    .gift-filter-panel { grid-template-columns: 1fr; }
    .gift-filter-panel .gift-search-field { grid-column: auto; }
    .gift-grid, .gift-grid-directory { grid-template-columns: 1fr; }
    .gift-detail-hero { padding: 1rem; gap: 1rem; }
    .gift-detail-intro h1 { font-size: 1.75rem; }
    .gift-detail-actions { flex-direction: column; align-items: stretch; }
    .gift-detail-actions form, .gift-detail-actions .btn { width: 100%; }
    .gift-detail-actions .btn-icon { width: 100%; }
    .community-filter-bar, .exchange-filter-panel { grid-template-columns: 1fr; }
    .community-search-field, .exchange-search-field { grid-column: auto; }
    .community-hero { min-height: 400px; }
    .community-title-row h1, .exchange-detail-header h1 { font-size: 1.8rem; }
    .community-hero-actions, .community-hero-actions form, .community-hero-actions .btn { width: 100%; }
    .exchange-gift-card { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .exchange-gift-card > div { width: 48px; height: 48px; }
    .exchange-response-actions, .exchange-response-actions form { align-items: stretch; flex-direction: column; }
    .exchange-response-actions .btn { width: 100%; }
    .member-management-row { grid-template-columns: 1fr; }
    .member-management-row form { grid-column: auto; }
}

@media (max-width: 1050px) {
    .app-shell { grid-template-columns: 1fr; padding-top: 1rem; }
    .app-sidebar {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: .4rem;
        scrollbar-width: thin;
    }
    .app-sidebar-heading { display: none; }
    .app-sidebar-card {
        min-width: 152px;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        flex: 0 0 auto;
    }
}

/* Phase 4 marketplace, safety, and accessibility */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}
.marketplace-search { display: flex; gap: .75rem; margin: 0 0 1.25rem; }
.marketplace-search .form-input { flex: 1; }
.product-seller { color: var(--text-muted); font-size: .82rem; margin: -.2rem 0 .45rem; }
.product-card-flags, .marketplace-item-meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.marketplace-item-meta { margin: .6rem 0 1rem; }
.marketplace-item-meta span, .listing-status {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .25rem .55rem;
    color: var(--text-light);
    font-size: .76rem;
}
.listing-status.status-published { color: var(--sage); }
.listing-status.status-draft, .listing-status.status-paused { color: var(--gold); }
.marketplace-editor { max-width: 980px; margin: 0 auto; }
.marketplace-checks { align-items: center; margin-bottom: 1rem; }
.marketplace-checks label, .checkbox-row { display: flex; gap: .5rem; align-items: center; cursor: pointer; }
.checkbox-row { margin: .75rem 0 1.25rem; }
.marketplace-policy-note, .checkout-notice {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}
.marketplace-policy-note i, .checkout-notice i { color: var(--sage); margin-top: .15rem; }
.marketplace-policy-note p, .checkout-notice p { margin: 0; color: var(--text-light); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.marketplace-seller-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.marketplace-seller-card h2 { margin: .2rem 0; }
.reputation-summary { display: flex; align-items: center; gap: .4rem; color: var(--text-light); }
.reputation-summary i { color: var(--gold); }
.report-panel { margin-top: 1rem; }
.report-panel summary { cursor: pointer; font-weight: 600; }
.report-panel form { display: grid; gap: .6rem; margin-top: .8rem; }
.seller-order-list { display: grid; gap: 1rem; }
.seller-order-card p { color: var(--text-light); }
.seller-fulfillment-form { border-top: 1px solid var(--border-light); padding-top: 1rem; margin-top: 1rem; }
.order-line-detail { padding: .65rem 0; border-bottom: 1px solid var(--border-light); }
.order-line-detail small { color: var(--text-muted); }
.order-line-detail p { margin: .35rem 0 0; color: var(--text-light); }
.checkout-item small { display: block; color: var(--text-muted); margin-top: .15rem; }
.safety-menu { position: relative; }
.safety-menu summary { list-style: none; cursor: pointer; }
.safety-menu summary::-webkit-details-marker { display: none; }
.safety-menu-panel {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + .4rem);
    width: 260px;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
}
.safety-menu-panel form { margin: .35rem 0; }
.safety-menu-panel .form-input { margin-bottom: .4rem; }
.report-resolution-form { display: grid; gap: .35rem; min-width: 190px; }
.info-page { max-width: 900px; }
.info-hero { padding: 2.5rem 0 1rem; }
.info-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: .4rem 0; }
.info-hero p { color: var(--text-light); font-size: 1.1rem; max-width: 720px; }
.info-page .content-panel { margin: 1rem 0; }

@media (max-width: 760px) {
    .marketplace-search, .marketplace-seller-card { align-items: stretch; flex-direction: column; }
    .safety-menu-panel { left: 0; right: auto; }
    .marketplace-editor .form-row { grid-template-columns: 1fr; }
}
