/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f0f2f7;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1a202c;
  --muted: #64748b;
  --xs: #94a3b8;
  --radius: 16px;
  --radius-sm: 10px;
  --admin: #6366f1;
  --admin-light: #eef2ff;
  --admin-border: #c7d2fe;
  --customer: #f97316;
  --customer-light: #fff7ed;
  --customer-border: #fed7aa;
  --green: #10b981;
  --red: #ef4444;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── View Toggle Header ────────────────────────────────── */
.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.topbar-logo { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.topbar-logo span { color: var(--admin); }
.view-switcher {
  margin-left: auto;
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.view-btn {
  border: none;
  background: transparent;
  border-radius: 7px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-btn.active-admin    { background: var(--admin); color: #fff; }
.view-btn.active-customer { background: var(--customer); color: #fff; }
.view-btn:not(.active-admin):not(.active-customer):hover { background: var(--border); color: var(--text); }

/* ── Views ─────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ════════════════════════════════════════════════════════
   ADMIN SIDE
════════════════════════════════════════════════════════ */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  min-height: calc(100vh - 60px);
}
@media (max-width: 1100px) { .admin-layout { grid-template-columns: 220px 1fr; } }
@media (max-width: 780px)  { .admin-layout { grid-template-columns: 1fr; } }

/* Sidebar */
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-section {
  padding: 6px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--xs);
  margin-top: 8px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 0;
  transition: all 0.12s;
  border-left: 3px solid transparent;
}
.sidebar-item:hover { background: #f8fafc; color: var(--text); }
.sidebar-item.active { background: var(--admin-light); color: var(--admin); border-left-color: var(--admin); }
.sidebar-item .s-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-badge {
  margin-left: auto;
  background: var(--admin);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

/* Main editor area */
.admin-main {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-toolbar h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.toolbar-actions { margin-left: auto; display: flex; gap: 8px; }

/* Editor card */
.editor-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.editor-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}
.editor-card-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.field label .req { color: var(--red); }
.field-input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafafa;
  color: var(--text);
  resize: none;
}
.field-input:focus { border-color: var(--admin); background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.field-input.title-input { font-size: 18px; font-weight: 700; }

/* Rich text toolbar */
.rte-toolbar {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: #f8fafc;
  padding: 8px 12px;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: center;
}
.rte-btn {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.12s, color 0.12s;
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}
.rte-btn:hover { background: var(--border); color: var(--text); }
.rte-btn.active { background: var(--admin-light); color: var(--admin); }
.rte-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.rte-body {
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 160px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  background: #fff;
  color: var(--text);
}
.rte-body:focus { border-color: var(--admin); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

/* Photo upload */
.photo-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}
.photo-drop:hover, .photo-drop.drag-over { border-color: var(--admin); background: var(--admin-light); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon { font-size: 32px; margin-bottom: 8px; }
.drop-title { font-size: 14px; font-weight: 700; color: var(--text); }
.drop-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }
.drop-link  { color: var(--admin); text-decoration: underline; cursor: pointer; }

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.preview-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.13s;
}
.preview-thumb.cover-selected { border-color: var(--admin); }
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-thumb .thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 9px; font-weight: 700;
  text-align: center; padding: 3px;
  opacity: 0; transition: opacity 0.15s;
}
.preview-thumb:hover .thumb-label { opacity: 1; }
.preview-thumb.cover-selected .thumb-label { opacity: 1; background: var(--admin); }
.preview-thumb .thumb-rm {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,0.6); color: #fff;
  border-radius: 50%; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.preview-thumb:hover .thumb-rm { opacity: 1; }

/* Category + tags */
.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.13s;
  background: #f8fafc;
  color: var(--muted);
}
.tag-pill.selected { background: var(--admin-light); border-color: var(--admin); color: var(--admin); }
.tag-pill:hover:not(.selected) { border-color: #94a3b8; color: var(--text); }

/* Post list (right panel) */
.admin-posts-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.posts-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.posts-panel-header h3 { font-size: 14px; font-weight: 700; }
.panel-search {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  outline: none;
  width: 100%;
  background: #f8fafc;
  margin-top: 10px;
  transition: border-color 0.15s;
}
.panel-search:focus { border-color: var(--admin); background: #fff; }

.post-list { overflow-y: auto; flex: 1; }
.post-list-item {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  align-items: flex-start;
}
.post-list-item:hover { background: #fafafa; }
.post-list-item.active { background: var(--admin-light); }
.pli-thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.pli-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pli-info { flex: 1; min-width: 0; }
.pli-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-meta  { font-size: 11px; color: var(--muted); margin-top: 3px; }
.pli-status {
  font-size: 9px; font-weight: 800;
  padding: 2px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
  flex-shrink: 0; align-self: flex-start; margin-top: 2px;
}
.status-published { background: #d1fae5; color: #065f46; }
.status-draft     { background: #fef9c3; color: #92400e; }
.status-scheduled { background: var(--admin-light); color: var(--admin); }

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.97); }
.btn-primary  { background: var(--admin); color: #fff; }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--muted); }
.btn-outline:hover { border-color: #94a3b8; color: var(--text); background: #f8fafc; }
.btn-success  { background: var(--green); color: #fff; }
.btn-sm       { padding: 6px 12px; font-size: 11px; border-radius: 6px; }
.btn-danger   { background: var(--red); color: #fff; }

/* Settings toggles */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-label { font-size: 13px; font-weight: 600; }
.toggle-desc  { font-size: 11px; color: var(--muted); }
.toggle-switch {
  width: 40px; height: 22px;
  background: #e2e8f0;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--admin); }
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.toggle-switch.on::after { transform: translateX(18px); }

/* Stats bar */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-val { font-size: 24px; font-weight: 800; }
.stat-lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.stat-delta { font-size: 10px; font-weight: 700; }
.delta-up { color: var(--green); }
.delta-dn { color: var(--red); }

/* SEO score bar */
.seo-bar-wrap { display: flex; flex-direction: column; gap: 6px; }
.seo-label-row { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; }
.seo-bar-track { height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; }
.seo-bar-fill  { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.seo-good   .seo-bar-fill { background: var(--green); }
.seo-mid    .seo-bar-fill { background: #f59e0b; }
.seo-poor   .seo-bar-fill { background: var(--red); }

/* Tile style picker */
.tile-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile-style-opt {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.13s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.tile-style-opt:hover { border-color: #94a3b8; color: var(--text); }
.tile-style-opt.selected { border-color: var(--admin); background: var(--admin-light); color: var(--admin); }
.tile-mini { width: 100%; height: 44px; border-radius: 6px; background: #f1f5f9; overflow: hidden; position: relative; }

/* ════════════════════════════════════════════════════════
   CUSTOMER SIDE
════════════════════════════════════════════════════════ */
.customer-wrap { background: var(--bg); }

/* Customer Hero */
.blog-hero {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 60%, #4a5568 100%);
  color: #fff;
  padding: 154px 40px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-blur-1 {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(99,102,241,0.25); top: -80px; right: -60px; filter: blur(80px);
}
.hero-blur-2 {
  position: absolute; width: 240px; height: 240px; border-radius: 50%;
  background: rgba(249,115,22,0.2); bottom: -60px; left: -40px; filter: blur(70px);
}
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title { font-size: 42px; font-weight: 900; letter-spacing: -1px; line-height: 1.1; max-width: 600px; margin: 0 auto 14px; }
.hero-sub   { font-size: 16px; opacity: 0.7; max-width: 480px; margin: 0 auto 28px; line-height: 1.6; }
.hero-search {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.hero-search input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 12px 16px; font-size: 14px; color: #fff;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.5); }
.hero-search button {
  border: none; background: var(--customer); color: #fff;
  padding: 10px 20px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s;
}
.hero-search button:hover { opacity: 0.88; }

/* Filter bar */
.blog-filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  position: sticky;
  top: 60px;
  z-index: 90;
}
.filter-tab {
  border: none; background: transparent;
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { color: var(--customer); border-bottom-color: var(--customer); }

/* Featured post */
.blog-content { max-width: 1200px; margin: 0 auto; padding: 40px 28px 80px; }

.featured-post {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.featured-post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@media (max-width: 860px) { .featured-post { grid-template-columns: 1fr; } }

.featured-img {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.featured-post:hover .featured-img img { transform: scale(1.04); }
.featured-badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--customer); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 1px;
}

.featured-body {
  padding: 36px 32px;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.post-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--customer);
}
.category-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--customer); }
.featured-title { font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -0.3px; }
.featured-excerpt { font-size: 14px; color: var(--muted); line-height: 1.7; }
.post-meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-author { display: flex; align-items: center; gap: 8px; }
.author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--admin-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--admin); flex-shrink: 0;
}
.author-name { font-size: 12px; font-weight: 700; }
.author-date { font-size: 11px; color: var(--muted); }
.post-stats { margin-left: auto; display: flex; gap: 10px; }
.post-stat-item { font-size: 11px; color: var(--muted); font-weight: 600; }
.read-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--text); border-radius: 10px;
  padding: 10px 20px; font-size: 13px; font-weight: 700;
  cursor: pointer; background: transparent; color: var(--text);
  transition: all 0.15s; align-self: flex-start;
}
.read-more-btn:hover { background: var(--text); color: #fff; }

/* Blog grid */
.blog-grid-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.blog-grid-title { font-size: 18px; font-weight: 800; }
.grid-view-toggle { display: flex; gap: 4px; background: #f1f5f9; padding: 3px; border-radius: 8px; }
.grid-view-btn {
  border: none; background: transparent; border-radius: 6px;
  padding: 5px 10px; cursor: pointer; font-size: 14px; color: var(--muted);
  transition: all 0.12s;
}
.grid-view-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* Tile grid */
.tiles-grid {
  display: grid;
  gap: 20px;
}
.tiles-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.tiles-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.tiles-grid.grid-1 { grid-template-columns: 1fr; }
@media (max-width: 900px) { .tiles-grid.grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tiles-grid.grid-3, .tiles-grid.grid-2 { grid-template-columns: 1fr; } }

/* ── Tile styles ──────────────────────────────────────── */
.blog-tile {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1.5px solid transparent;
  position: relative;
}
.blog-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--border); }

/* Style: Classic */
.tile-classic .tile-img { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.tile-classic .tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tile-classic:hover .tile-img img { transform: scale(1.06); }
.tile-classic .tile-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }

/* Style: Card with overlay */
.tile-overlay {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.tile-overlay img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tile-overlay:hover img { transform: scale(1.08); }
.tile-overlay .overlay-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}
.tile-overlay .overlay-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px; color: #fff;
  display: flex; flex-direction: column; gap: 8px;
}
.tile-overlay .overlay-cat { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
.tile-overlay .overlay-title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.tile-overlay .overlay-meta { font-size: 11px; opacity: 0.65; }

/* Style: Minimal horizontal */
.tile-minimal {
  display: flex; gap: 0; align-items: stretch;
}
.tile-minimal .tile-img {
  width: 140px; min-width: 140px; overflow: hidden;
}
.tile-minimal .tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tile-minimal:hover .tile-img img { transform: scale(1.06); }
.tile-minimal .tile-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }

/* Style: Magazine */
.tile-magazine { display: flex; flex-direction: column; }
.tile-magazine .tile-img { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.tile-magazine .tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tile-magazine:hover .tile-img img { transform: scale(1.05); }
.tile-magazine .tile-body {
  padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px;
  border-top: 3px solid var(--customer);
}

/* Shared tile body elements */
.tile-cat { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--customer); }
.tile-title { font-size: 15px; font-weight: 800; line-height: 1.3; }
.tile-excerpt { font-size: 12px; color: var(--muted); line-height: 1.6; }
.tile-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; flex-wrap: wrap; gap: 6px;
}
.tile-author-mini { font-size: 11px; color: var(--muted); font-weight: 600; }
.tile-date { font-size: 11px; color: var(--xs); }
.tile-tag-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.tile-tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  background: #f1f5f9; color: var(--muted);
}

/* Like / save buttons */
.tile-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transition: opacity 0.15s;
}
.blog-tile:hover .tile-actions { opacity: 1; }
.tile-action-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.12s, background 0.12s;
}
.tile-action-btn:hover { transform: scale(1.15); background: #fff; }
.tile-action-btn.liked { color: #ef4444; }
.tile-action-btn.saved { color: var(--admin); }

/* Read time badge */
.read-time-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.06);
  padding: 3px 8px; border-radius: 10px;
  color: var(--muted);
}

/* Newsletter */
.newsletter-strip {
  background: linear-gradient(135deg, var(--admin) 0%, #818cf8 100%);
  border-radius: 20px;
  padding: 40px 36px;
  display: flex;
  align-items: center;
  gap: 32px;
  color: #fff;
  margin-top: 48px;
  flex-wrap: wrap;
}
.nl-text h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.nl-text p  { font-size: 14px; opacity: 0.8; }
.nl-form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.nl-input {
  flex: 1; border: none; border-radius: 10px;
  padding: 12px 16px; font-size: 14px; outline: none;
  background: rgba(255,255,255,0.15);
  color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
}
.nl-input::placeholder { color: rgba(255,255,255,0.5); }
.nl-btn {
  border: none; background: #fff; color: var(--admin);
  border-radius: 10px; padding: 12px 20px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  transition: opacity 0.15s; white-space: nowrap;
}
.nl-btn:hover { opacity: 0.88; }

/* ── Article Modal ────────────────────────────────────── */
.article-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.article-modal-overlay.open { opacity: 1; pointer-events: all; }

.article-modal {
  background: var(--surface);
  border-radius: 24px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), opacity 0.22s;
  opacity: 0;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
}
.article-modal-overlay.open .article-modal { transform: translateY(0) scale(1); opacity: 1; }

.article-hero-img { width: 100%; height: 260px; object-fit: cover; }
.article-modal-body { padding: 32px 36px 40px; }
.article-cat { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--customer); margin-bottom: 10px; }
.article-title { font-size: 28px; font-weight: 900; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 14px; }
.article-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.article-author { display: flex; align-items: center; gap: 8px; }
.article-content { font-size: 15px; line-height: 1.8; color: #374151; }
.article-content p { margin-bottom: 16px; }
.article-content h3 { font-size: 18px; font-weight: 800; margin: 24px 0 10px; }
.article-content blockquote {
  border-left: 4px solid var(--customer); margin: 20px 0;
  padding: 12px 20px; background: var(--customer-light); border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--muted);
}
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 24px; }
.article-tag {
  border: 1.5px solid var(--border); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; font-weight: 700; color: var(--muted);
}
.article-actions {
  display: flex; gap: 10px; margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.article-action-btn {
  flex: 1; min-width: 100px; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--muted);
  transition: all 0.13s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.article-action-btn:hover { background: #f8fafc; color: var(--text); border-color: #94a3b8; }
.article-action-btn.primary { background: var(--customer); color: #fff; border-color: var(--customer); }
.article-action-btn.primary:hover { opacity: 0.88; }
.modal-close-btn {
  position: fixed;
  top: 32px; right: 32px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: none; cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: background 0.13s, transform 0.13s;
  z-index: 501;
}
.modal-close-btn:hover { background: #fff; transform: scale(1.1); }

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: #1a202c; color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 12px 20px; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 9999; opacity: 0; transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }