/* ═══════════════════════════════════════════
   A1Recipe — components.css  v2.0
   All component styles
═══════════════════════════════════════════ */

/* ─── Tags / Pills ─── */
.tag {
  display: inline-block; padding: 0.2rem 0.5rem;
  border-radius: 4px; font-size: 0.7rem; font-weight: 500;
  background: var(--bg2); color: var(--text2); margin: 0.1rem;
}
.tag.cuisine    { background: #e3f2fd; color: #1565c0; }
.tag.vegan      { background: #e8f5e9; color: #1b5e20; }
.tag.vegetarian { background: #f1f8e9; color: #33691e; }
.tag.healthy    { background: #e0f7fa; color: #006064; }
.tag.quick      { background: #fce4ec; color: #880e4f; }
.tag.gluten-free{ background: #fff8e1; color: #f57f17; }

/* ─── Category Strip ─── */
.cat-strip { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.75rem 1rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; min-width: 90px; transition: all var(--transition); flex-shrink: 0;
}
.cat-chip:hover, .cat-chip.active { background: var(--p); color: var(--white); border-color: var(--p); }
.cat-chip .ce { font-size: 1.5rem; }
.cat-chip .cl { font-size: 0.72rem; font-weight: 500; white-space: nowrap; }

/* ─── Recipe Grid ─── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.recipe-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.recipe-img {
  width: 100%; height: 190px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; overflow: hidden;
}
.recipe-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recipe-body { padding: 1rem 1.1rem 1.1rem; }
.recipe-meta { display: flex; gap: 1rem; font-size: 0.74rem; color: var(--text3); margin-bottom: 0.5rem; }
.recipe-meta span { display: flex; align-items: center; gap: 3px; }
.recipe-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; line-height: 1.3;
}
.recipe-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
.rating { color: var(--g); font-size: 0.8rem; }
.rating .count { color: var(--text3); }

/* ─── Recipe Hero Image ─── */
.recipe-hero-img {
  width: 100%; height: 340px; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  font-size: 7rem; margin-bottom: 1.5rem; overflow: hidden;
}
.recipe-hero-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xl); }
.recipe-detail { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ─── Cuisine Grid ─── */
.cuisine-search {
  width: 100%; max-width: 440px; padding: 0.65rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: 0.875rem; margin-bottom: 1.5rem;
  font-family: 'DM Sans', sans-serif; color: var(--text);
  background: var(--bg); transition: border-color var(--transition); display: block;
}
.cuisine-search:focus { outline: none; border-color: var(--p); }
.cuisine-count { font-size: 0.85rem; color: var(--text3); }
.region-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.rtab {
  padding: 0.35rem 0.9rem; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all var(--transition);
}
.rtab:hover, .rtab.active { background: var(--p); color: #fff; border-color: var(--p); }
.cuisine-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 0.75rem;
}
.cuisine-grid-home {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 0.75rem;
}
.cuisine-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0.875rem 0.5rem; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.cuisine-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--p); }
.cuisine-card .flag { font-size: 2rem; margin-bottom: 0.35rem; }
.cuisine-card .cn { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.cuisine-card .count { font-size: 0.7rem; color: var(--text3); margin-top: 0.2rem; }

/* ─── Article Grid ─── */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.25rem; }
.article-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: all var(--transition);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-img {
  height: 160px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  font-size: 4.5rem;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 1rem 1.1rem 1.1rem; }
.article-cat { font-size: 0.68rem; font-weight: 700; color: var(--p); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.35rem; }
.article-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 0.35rem; }
.article-meta { font-size: 0.74rem; color: var(--text3); }

/* ─── Meal Plan Table ─── */
.meal-plan-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 600px; }
.meal-plan-table th { background: var(--s); color: #fff; padding: 0.65rem 0.875rem; text-align: left; font-weight: 600; }
.meal-plan-table td { padding: 0.65rem 0.875rem; border-bottom: 1px solid var(--border); color: var(--text2); }
.meal-plan-table tr:last-child td { border-bottom: none; }
.meal-plan-table tr:hover td { background: var(--bg2); }

/* ─── Planner ─── */
.planner-wrap { max-width: 900px; margin: 0 auto; }
.planner-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.8125rem; font-weight: 600; color: var(--text2); display: block; margin-bottom: 0.3rem; }
.form-group input, .form-group select {
  width: 100%; padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: 0.875rem; font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--bg);
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--p); }
.plan-result { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; }
.macro-bar { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; }
.macro-item { background: var(--bg2); border-radius: var(--radius-md); padding: 1rem; text-align: center; border: 1px solid var(--border); }
.macro-val { font-size: 1.6rem; font-weight: 700; color: var(--p); }
.macro-lbl { font-size: 0.75rem; color: var(--text3); margin-top: 0.25rem; line-height: 1.4; }

/* ─── Admin Panel ─── */
.admin-shell {
  display: grid; grid-template-columns: 220px 1fr; min-height: 100vh;
  background: var(--bg2);
}
.admin-sidebar {
  background: var(--s2); padding: 1.5rem 0; overflow-y: auto; min-height: 100vh;
  position: sticky; top: 0;
}
.admin-logo { padding: 0 1.25rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.5rem; }
.admin-logo-text { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: #fff; }
.admin-logo-sub { font-size: 0.68rem; color: rgba(255,255,255,0.4); margin-top: 0.1rem; }
.admin-sidebar-section { padding: 0.65rem 1.25rem 0.25rem; font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.35); letter-spacing: 0.1em; text-transform: uppercase; }
.admin-nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.25rem; cursor: pointer; font-size: 0.8125rem;
  color: rgba(255,255,255,0.65); transition: all var(--transition);
}
.admin-nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav-item.active { background: rgba(200,98,42,0.25); color: var(--g); border-left: 3px solid var(--p); }
.admin-content { padding: 1.5rem; overflow-y: auto; }
.admin-pane { display: none; }
.admin-pane.active { display: block; }
.admin-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat-val { font-size: 1.8rem; font-weight: 700; color: var(--p); }
.stat-lbl { font-size: 0.75rem; color: var(--text3); margin-top: 0.15rem; }
.stat-trend { font-size: 0.72rem; color: var(--success); margin-top: 0.2rem; }
.data-table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.data-table th { background: var(--bg2); padding: 0.65rem 1rem; text-align: left; font-weight: 600; border-bottom: 1px solid var(--border); color: var(--text2); font-size: 0.75rem; }
.data-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); color: var(--text2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg2); }

/* ─── SEO Center ─── */
.stab {
  padding: 0.4rem 0.9rem; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  color: var(--text2); transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.stab:hover, .stab.active { background: var(--p); color: #fff; border-color: var(--p); }
.seo-panel { display: none; }
.seo-panel.active { display: block; }
.cms-field { margin-bottom: 0.9rem; }
.cms-label { font-size: 0.78rem; font-weight: 600; color: var(--text2); display: block; margin-bottom: 0.3rem; }
.cms-input {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 0.84rem; font-family: 'DM Sans', sans-serif;
  color: var(--text); background: var(--white); transition: border-color 0.2s;
}
.cms-input:focus { outline: none; border-color: var(--p); }

/* ─── Platform Feature Strip ─── */
.feature-strip {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}
.feature-strip-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 0; justify-content: center; flex-wrap: wrap;
}
.feature-chip {
  text-align: center; cursor: pointer; padding: 0.6rem 1.4rem;
  border-right: 1px solid var(--border); transition: background 0.2s;
  min-width: 120px;
}
.feature-chip:last-child { border-right: none; }
.feature-chip:hover { background: var(--bg2); }
.feature-chip-icon { font-size: 1.5rem; margin-bottom: 0.2rem; }
.feature-chip-label { font-size: 0.72rem; font-weight: 600; color: var(--text2); }
.feature-chip-count { font-size: 0.65rem; color: var(--text3); }

/* ─── Tool Cards ─── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1.25rem; }
.tool-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.tool-card:hover { border-color: var(--p); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tool-card-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.tool-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.tool-card-desc { font-size: 0.78rem; color: var(--text3); line-height: 1.5; }

/* ─── Diet Plan Cards ─── */
.diet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 1.25rem; }
.diet-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; cursor: pointer;
  transition: all 0.2s; border-top: 4px solid var(--p);
}
.diet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.diet-card-emoji { font-size: 2.2rem; margin-bottom: 0.75rem; }
.diet-card-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 0.3rem; }
.diet-card-sub { font-size: 0.78rem; color: var(--text3); margin-bottom: 0.875rem; }

/* ─── Drink Cards ─── */
.drink-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.5rem; }
.drink-benefit { background: var(--success-bg); color: var(--success); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.78rem; display: flex; align-items: center; gap: 0.3rem; }

/* ─── Content Hub ─── */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.5rem; }
.content-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: all 0.2s;
}
.content-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.content-card-img { height: 180px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bg2), var(--bg3)); font-size: 5rem; }
.content-card-body { padding: 1.1rem; }

/* ─── Search Page ─── */
.search-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.search-filter {
  padding: 0.4rem 0.9rem; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 0.8rem; cursor: pointer; transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.search-filter:hover, .search-filter.active { background: var(--p); color: #fff; border-color: var(--p); }
.search-result-type { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.25rem; }

/* ─── Home Teaser Grids ─── */
.home-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 0.75rem; }
.home-tool-chip {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem; text-align: center; cursor: pointer; transition: all 0.2s;
}
.home-tool-chip:hover { background: var(--p); color: #fff; border-color: var(--p); }
.home-tool-emoji { font-size: 1.8rem; margin-bottom: 0.3rem; }
.home-tool-label { font-size: 0.74rem; font-weight: 500; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { min-height: auto; position: static; }
}
@media (max-width: 768px) {
  .header-inner { gap: 0.5rem; }
  .search-bar { max-width: 200px; }
  .main-nav > .nav-btn:not(.mobile-menu-btn) { display: none; }
  .nav-dropdown-wrap { display: none; }
  .lang-dropdown { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-nav { display: flex; }
  .hero { padding: 3rem 1rem; }
  .hero h1 { font-size: 1.75rem; }
  .form-grid { grid-template-columns: 1fr; }
  .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); }
  .nutrition-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .feature-strip-inner { gap: 0; }
  .feature-chip { min-width: 80px; padding: 0.5rem 0.75rem; }
  .nav-mega-drop { min-width: 320px; grid-template-columns: 1fr; }
  .macro-bar { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .search-bar { display: none; }
  .recipe-grid { grid-template-columns: 1fr; }
  .cuisine-grid { grid-template-columns: repeat(3,1fr); }
  .section { padding: 2rem 1rem; }
}

/* ─── RTL Support ─── */
[dir="rtl"] .breadcrumb .sep::before { content: '‹'; }
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .footer-grid { direction: rtl; }

/* ─── Print ─── */
@media print {
  header, footer, .cookie-banner, .pwa-prompt, .ad-slot, .btn, .breadcrumb { display: none !important; }
  .page { display: block !important; }
  .recipe-detail { padding: 0; }
}
