/* TrailBlazeSurvival - Cinematic Survival Theme */
/* Color Palette: Cold desaturated blues/greys + warm amber accent */

:root {
    --bg-dark: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #1f2231;
    --bg-secondary: #151821;
    --border: #2a2d3a;
    --border-light: #353848;
    --text-primary: #e2e8f0;
    --text-secondary: #8892a4;
    --text-muted: #5a6378;
    --accent: #d4a017;
    --accent-hover: #e8b52a;
    --accent-dim: rgba(212, 160, 23, 0.15);
    --accent-glow: rgba(212, 160, 23, 0.3);
    --fog-blue: rgba(91, 123, 154, 0.1);
    --olive: #6b7c3f;
    --danger: #c45a5a;
    --success: #4a8c5c;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
    --transition: 0.3s ease;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-dark); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* Utility */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-accent { color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; border: 1px solid transparent; cursor: pointer; transition: all var(--transition); text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--bg-dark); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--bg-dark); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.alert { padding: 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.875rem; }
.alert-error { background: rgba(196,90,90,0.15); border: 1px solid rgba(196,90,90,0.3); color: #e88; }
.alert-success { background: rgba(74,140,92,0.15); border: 1px solid rgba(74,140,92,0.3); color: #6cc; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid var(--border); background: rgba(15,17,23,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-primary); }
.logo-img { width: 36px; height: 36px; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; }
.logo-tagline { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-top: -2px; }
.main-nav { display: flex; gap: 0.25rem; }
.nav-link { padding: 0.5rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); transition: all var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--accent); }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text-secondary); transition: all var(--transition); border-radius: 1px; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-image { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,17,23,0.7), rgba(15,17,23,0.4), rgba(15,17,23,1)); }
.hero-overlay::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(15,17,23,0.6), transparent, rgba(15,17,23,0.6)); }
.hero-particles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.particle { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: rgba(212,160,23,0.4); animation: floatUp linear infinite; }
@keyframes floatUp { 0%,100% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 0.6; } 90% { opacity: 0.2; } 100% { transform: translateY(-100vh) translateX(20px); opacity: 0; } }
.hero-glow { position: absolute; bottom: 25%; left: 50%; transform: translateX(-50%); z-index: 1; width: 256px; height: 256px; border-radius: 50%; background: rgba(212,160,23,0.12); animation: glowPulse 4s ease-in-out infinite; pointer-events: none; }
@keyframes glowPulse { 0%,100% { opacity: 0.6; filter: blur(40px); } 50% { opacity: 0.9; filter: blur(50px); } }
.hero-content { position: relative; z-index: 10; text-align: center; padding-top: 80px; max-width: 800px; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--accent-glow); background: var(--accent-dim); margin-bottom: 2rem; font-size: 0.875rem; font-weight: 500; color: var(--accent); }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-subtitle { font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 1.75rem; font-weight: 900; color: var(--accent); }
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-secondary); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-badge { display: inline-block; padding: 0.375rem 0.875rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.75rem; }
.section-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.section-desc { color: var(--text-secondary); max-width: 600px; margin: 0 auto; font-size: 0.9375rem; }
.section-cta { text-align: center; margin-top: 2rem; }

/* Tags Cloud */
.tags-section { padding-bottom: 0; }
.tags-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.tag-pill { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); transition: all var(--transition); cursor: pointer; text-decoration: none; }
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }
.tag-pill.active { background: var(--accent); color: var(--bg-dark); border-color: var(--accent); }
.tag-small { padding: 0.25rem 0.625rem; font-size: 0.6875rem; }
.tag-count { background: rgba(255,255,255,0.1); padding: 0.125rem 0.375rem; border-radius: 999px; font-size: 0.6875rem; }
.tag-pill.active .tag-count { background: rgba(0,0,0,0.2); }

/* Post Cards */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.post-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); overflow: hidden; cursor: pointer; transition: all 0.4s ease; }
.post-card:hover { border-color: var(--accent-glow); box-shadow: var(--shadow), 0 0 30px var(--accent-dim); transform: translateY(-2px); }
.post-card-featured { grid-column: span 2; }
.post-card-image { position: relative; height: 220px; overflow: hidden; }
.post-card-featured .post-card-image { height: 300px; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .post-card-image img { transform: scale(1.05); }
.post-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%); }
.post-card-tags { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.375rem; z-index: 2; }
.featured-badge { position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 999px; background: var(--accent-dim); border: 1px solid var(--accent-glow); font-size: 0.6875rem; font-weight: 700; color: var(--accent); z-index: 2; }
.post-card-body { padding: 1.25rem 1.5rem; }
.post-card-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; transition: color var(--transition); }
.post-card:hover .post-card-title { color: var(--accent); }
.post-card-excerpt { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.post-card-footer { display: flex; justify-content: space-between; align-items: center; }
.post-date { font-size: 0.75rem; color: var(--text-muted); }
.post-read-more { font-size: 0.75rem; color: var(--accent); font-weight: 600; }

/* Post Detail */
.post-detail { padding-top: 64px; }
.post-detail-hero { position: relative; height: 400px; overflow: hidden; }
.post-detail-image { width: 100%; height: 100%; object-fit: cover; }
.post-detail-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-dark), rgba(15,17,23,0.3), rgba(15,17,23,0.5)); }
.post-detail-content { max-width: 800px; margin: -120px auto 0; position: relative; z-index: 10; padding: 0 1.5rem 4rem; }
.back-link { display: inline-block; color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1rem; padding: 0.5rem 0; }
.back-link:hover { color: var(--accent); }
.post-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.post-detail-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 900; line-height: 1.2; margin-bottom: 1rem; }
.post-detail-excerpt { font-size: 1.125rem; color: var(--text-secondary); border-left: 3px solid var(--accent); padding-left: 1rem; margin-bottom: 2rem; line-height: 1.7; }

/* Prose (Markdown Content) */
.prose { line-height: 1.8; color: var(--text-primary); }
.prose h2 { color: var(--accent); font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.prose h3 { color: var(--accent); opacity: 0.85; font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
.prose h4 { color: var(--accent); opacity: 0.7; font-size: 1.1rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.prose p { margin-bottom: 1rem; }
.prose strong { color: var(--accent); font-weight: 700; }
.prose ul, .prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.375rem; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--text-secondary); font-style: italic; }
.prose code { background: var(--bg-secondary); padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.875em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.warning-box { padding: 1rem; border-radius: var(--radius-sm); border: 1px solid rgba(196,90,90,0.3); background: rgba(196,90,90,0.1); color: #e88; margin-bottom: 1rem; }

.post-subscribe { margin-top: 3rem; padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.post-subscribe h3 { font-size: 1.25rem; margin-bottom: 1rem; }

/* Post Gallery */
.post-gallery { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.post-gallery-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text-primary); }
.post-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.post-gallery-item { border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; background: var(--bg-card); transition: all var(--transition); }
.post-gallery-item:hover { border-color: var(--accent-glow); box-shadow: var(--shadow); }
.post-gallery-item img { width: 100%; height: 180px; object-fit: cover; cursor: pointer; transition: transform 0.4s ease; }
.post-gallery-item:hover img { transform: scale(1.03); }
.post-gallery-caption { padding: 0.5rem 0.75rem; font-size: 0.75rem; color: var(--text-secondary); text-align: center; }
img.gallery-fullscreen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; object-fit: contain; background: rgba(0,0,0,0.95); z-index: 1000; cursor: zoom-out; padding: 2rem; }

/* Products */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.products-grid-full { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.product-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); overflow: hidden; transition: all 0.4s ease; display: flex; flex-direction: column; }
.product-card:hover { border-color: var(--accent-glow); box-shadow: var(--shadow); }
.product-card-image { position: relative; height: 180px; overflow: hidden; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-badge-top { position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 999px; background: var(--accent-dim); border: 1px solid var(--accent-glow); font-size: 0.6875rem; font-weight: 700; color: var(--accent); }
.product-card-body { padding: 1rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-card-title { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; transition: color var(--transition); }
.product-card:hover .product-card-title { color: var(--accent); }
.product-card-desc { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0.75rem; flex: 1; }
.product-rating { display: flex; align-items: center; gap: 2px; margin-bottom: 0.75rem; }
.star { color: var(--text-muted); font-size: 0.875rem; }
.star-filled { color: var(--accent); }
.rating-value { font-size: 0.75rem; color: var(--text-muted); margin-left: 4px; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.product-price { font-size: 1.125rem; font-weight: 900; color: var(--accent); }

/* Subscribe */
.subscribe-section { background: var(--bg-secondary); }
.subscribe-box { max-width: 600px; margin: 0 auto; text-align: center; padding: 3rem 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.subscribe-icon { font-size: 3rem; margin-bottom: 1rem; }
.subscribe-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.subscribe-desc { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9375rem; }
.subscribe-form { display: flex; gap: 0.75rem; max-width: 480px; margin: 0 auto; }
.subscribe-input { flex: 1; padding: 0.75rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-dark); color: var(--text-primary); outline: none; transition: border-color var(--transition); }
.subscribe-input:focus { border-color: var(--accent); }
.subscribe-input::placeholder { color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: rgba(26,29,39,0.5); backdrop-filter: blur(10px); margin-top: auto; padding: 3rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { margin-bottom: 1rem; }
.footer-desc { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.6; }
.footer-col h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 1rem; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a, .footer-links span { font-size: 0.8125rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-affiliate { border-top: 1px solid var(--border); padding: 1.25rem 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.6; }
.footer-affiliate strong { color: var(--text-primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0; font-size: 0.75rem; color: var(--text-muted); }
.footer-motto { display: flex; align-items: center; gap: 0.25rem; }

/* Cookie Consent */
.cookie-consent { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; padding: 1rem; transform: translateY(100%); transition: transform 0.5s ease; }
.cookie-consent.visible { transform: translateY(0); }
.cookie-content { max-width: 900px; margin: 0 auto; padding: 1.25rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(26,29,39,0.95); backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cookie-icon { font-size: 1.5rem; flex-shrink: 0; }
.cookie-text { flex: 1; min-width: 200px; }
.cookie-text h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.25rem; }
.cookie-text p { font-size: 0.75rem; color: var(--text-secondary); }
.cookie-text a { color: var(--accent); }
.cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* Empty */
.empty-message { text-align: center; color: var(--text-muted); padding: 3rem 0; font-size: 0.9375rem; }

/* Installer */
.install-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-dark); padding: 2rem; }
.install-container { max-width: 560px; width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; }
.install-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.install-logo .logo-img { width: 48px; height: 48px; }
.install-title h1 { font-size: 1.5rem; font-weight: 800; }
.install-subtitle { font-size: 0.8125rem; color: var(--text-muted); }
.form-section { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.form-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.375rem; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.625rem 0.875rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-dark); color: var(--text-primary); outline: none; transition: border-color var(--transition); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; font-family: monospace; font-size: 0.8125rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-info { font-size: 0.8125rem; color: var(--text-secondary); }
.form-info code { background: var(--bg-dark); padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.75rem; }
.install-success { text-align: center; padding: 2rem 0; }
.success-icon { font-size: 3rem; width: 60px; height: 60px; border-radius: 50%; background: rgba(74,140,92,0.15); border: 2px solid var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: var(--success); }
.install-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.admin-sidebar { width: 240px; background: var(--bg-card); border-right: 1px solid var(--border); padding: 1.5rem 0; position: fixed; top: 64px; bottom: 0; overflow-y: auto; }
.admin-nav-item { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 1.25rem; color: var(--text-secondary); font-size: 0.875rem; transition: all var(--transition); text-decoration: none; }
.admin-nav-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.admin-nav-item.active { color: var(--accent); background: var(--accent-dim); border-right: 2px solid var(--accent); }
.admin-content { flex: 1; margin-left: 240px; padding: 2rem; min-height: calc(100vh - 64px); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-size: 1.5rem; font-weight: 800; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.admin-table tr:hover td { background: var(--bg-secondary); }
.admin-actions { display: flex; gap: 0.375rem; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 600; border: 1px solid; }
.badge-published { border-color: var(--success); color: var(--success); background: rgba(74,140,92,0.1); }
.badge-draft { border-color: var(--text-muted); color: var(--text-muted); background: rgba(90,99,120,0.1); }
.badge-featured { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.admin-form { max-width: 800px; }
.admin-form .form-group { margin-bottom: 1.25rem; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border); border-radius: 12px; transition: var(--transition); cursor: pointer; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: white; bottom: 3px; left: 3px; transition: var(--transition); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch-label { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.75rem; font-size: 0.875rem; }

/* Responsive */
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(15,17,23,0.98); backdrop-filter: blur(20px); padding: 1rem; border-bottom: 1px solid var(--border); flex-direction: column; }
    .main-nav.open { display: flex; }
    .menu-toggle { display: flex; }
    .hero-title { font-size: 2.25rem; }
    .hero-stats { gap: 1.5rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .post-card-featured { grid-column: span 1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .subscribe-form { flex-direction: column; }
    .cookie-content { flex-direction: column; text-align: center; }
    .admin-sidebar { display: none; }
    .admin-content { margin-left: 0; }
    .post-detail-hero { height: 250px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
}

/* Language Switcher */
.lang-switcher { position: relative; display: inline-flex; align-items: center; }
.lang-switcher-btn { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 0.8125rem; font-weight: 500; transition: all var(--transition); }
.lang-switcher-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-flag { font-size: 1rem; line-height: 1; }
.lang-code { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; }
.lang-arrow { font-size: 0.625rem; margin-left: 0.125rem; }
.lang-dropdown { position: absolute; top: calc(100% + 4px); right: 0; min-width: 140px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 200; display: none; overflow: hidden; }
.lang-dropdown.show { display: block; }
.lang-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; font-size: 0.8125rem; color: var(--text-secondary); text-decoration: none; transition: all var(--transition); }
.lang-option:hover { background: var(--bg-secondary); color: var(--text-primary); }
.lang-option.lang-active { color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.lang-option .lang-flag { font-size: 1.125rem; }

/* Product Card with Gallery (home page) */
.product-card-gallery .product-card-image { position: relative; }
.product-card-thumbs {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 2;
}
.product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.7;
}
.product-thumb:hover {
    border-color: var(--accent);
    opacity: 1;
}

/* Product Ficha Cards (equipo page) */
.product-ficha-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.product-ficha {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}
.product-ficha:hover {
    border-color: var(--accent-glow);
    box-shadow: var(--shadow), 0 0 40px var(--accent-dim);
}
.product-ficha-gallery {
    position: relative;
    background: var(--bg-secondary);
}
.product-ficha-main-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}
.product-ficha-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.product-ficha:hover .product-ficha-main-image img {
    transform: scale(1.03);
}
.product-ficha-main-image .zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.product-ficha:hover .zoom-hint { opacity: 1; }
.product-ficha-featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg-dark);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 12px var(--accent-glow);
}
.product-ficha-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(15,17,23,0.8);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}
.product-ficha-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.product-ficha-thumbs::-webkit-scrollbar { height: 4px; }
.product-ficha-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.product-ficha-thumb {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.6;
}
.product-ficha-thumb:hover,
.product-ficha-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}
.product-ficha-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-ficha-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-ficha-title {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    transition: color var(--transition);
}
.product-ficha:hover .product-ficha-title { color: var(--accent); }
.product-ficha-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex: 1;
}
.product-ficha-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.product-ficha-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
}
.product-ficha-rating {
    display: flex;
    align-items: center;
    gap: 3px;
}
.product-ficha-rating .star { font-size: 1.1rem; }
.product-ficha-rating .rating-value {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 4px;
}
.product-ficha-cta {
    margin-left: auto;
}
.product-ficha-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
}

/* Product Modal */
.product-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(8px);
}
.product-modal-overlay.active { display: flex; }
.product-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.product-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition);
}
.product-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.product-modal-gallery {
    display: flex;
    flex-direction: column;
}
.product-modal-main-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.product-modal-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-modal-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}
.product-modal-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.6;
}
.product-modal-thumb:hover,
.product-modal-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}
.product-modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-modal-details { padding: 2rem; }
.product-modal-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.product-modal-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.product-modal-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.product-modal-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}
.product-modal-price { font-size: 2rem; font-weight: 900; color: var(--accent); }
.product-modal-rating { display: flex; align-items: center; gap: 3px; }
.product-modal-rating .star { font-size: 1.25rem; }
.product-modal-rating .rating-value { font-size: 1rem; color: var(--text-muted); margin-left: 6px; }
.product-modal-cta { margin-left: auto; }
.product-modal-cta .btn { padding: 0.875rem 2rem; font-size: 1rem; }

/* Responsive product ficha */
@media (max-width: 900px) {
    .product-ficha-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .product-ficha-main-image { height: 280px; }
    .product-ficha-details { padding: 1rem; }
    .product-ficha-title { font-size: 1.125rem; }
    .product-ficha-price { font-size: 1.25rem; }
    .product-ficha-specs { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .product-ficha-cta { margin-left: 0; width: 100%; }
    .product-ficha-cta .btn { width: 100%; justify-content: center; }
    .product-modal-main-image { height: 250px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
