/* ============================================
   What God Gave You - Complete Stylesheet
   Naturally Beautiful
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
    --primary: #5a8a5c;
    --primary-dark: #3d6b3f;
    --primary-light: #e6f0e6;
    --secondary: #8b7355;
    --secondary-light: #f0ebe3;
    --accent: #c4956a;
    --accent-light: #fdf0e5;
    --sage: #7ca07e;
    --sage-light: #e8f0e8;
    --cream: #faf6f0;
    --warm-white: #fefcf8;
    --gold: #b8943e;
    --gold-light: #fdf5e0;
    --text: #2d3228;
    --text-light: #5f6b58;
    --text-muted: #8a9483;
    --border: #dde5d8;
    --border-light: #edf2ea;
    --bg: #f8fbf6;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(90,108,75,.08);
    --shadow: 0 4px 12px rgba(90,108,75,.1);
    --shadow-lg: 0 8px 30px rgba(90,108,75,.12);
    --shadow-xl: 0 20px 60px rgba(90,108,75,.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: var(--max-width); 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; }

/* --- 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-confirmed { background: var(--sage-light); color: #2e7d32; }
.status-pending { background: var(--gold-light); color: var(--gold); }
.status-shipped { background: #e3f2fd; color: #1565c0; }
.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; }

/* --- 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 { padding-top: 2rem; }
.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 { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; 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: #7db87f;
    --primary-dark: #5a8a5c;
    --primary-light: #1e3020;
    --secondary: #b09878;
    --secondary-light: #2e2a22;
    --accent: #c4956a;
    --accent-light: #3d2a1a;
    --sage: #7ca07e;
    --sage-light: #1e2e1f;
    --cream: #1c2018;
    --warm-white: #181c16;
    --gold: #b8943e;
    --gold-light: #2a2510;
    --text: #e4ede2;
    --text-light: #a3b09e;
    --text-muted: #687560;
    --border: #303a2c;
    --border-light: #262e24;
    --bg: #131813;
    --card-bg: #1c221a;
    --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(30,28,36,.95); border-bottom-color: var(--border); }
html.dark-mode .footer { background: #111015; }
html.dark-mode .flash-success { background: var(--sage-light); color: #8bab8d; }
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, #1e3020, #2e2a22); }
html.dark-mode .newsletter-section { background: linear-gradient(135deg, #2e2a22, #1e3020); }

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; }

/* --- 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; }
}

@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; }
}
