/*
Theme Name: AFC App Store
Theme URI: https://your-site.com
Author: AFC
Description: Google Play inspired white app review theme for AFC affiliate sites. Clean, modern, light UI.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: afc-app-store
Tags: app-review, affiliate, google-play, white, responsive, custom-menu
*/

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

/* ===== CSS VARIABLES (Google Play light palette) ===== */
:root {
  --bg:           #ffffff;
  --bg2:          #f8f9fa;
  --bg3:          #f1f3f4;
  --surface:      #ffffff;
  --border:       #e8eaed;
  --border2:      #dadce0;

  --text:         #202124;
  --text2:        #3c4043;
  --text3:        #5f6368;
  --text4:        #80868b;

  --green:        #01875f;        /* Google Play green */
  --green-light:  #e6f4ea;
  --blue:         #1a73e8;
  --blue-light:   #e8f0fe;
  --red:          #d93025;
  --red-light:    #fce8e6;
  --yellow:       #f9ab00;
  --orange:       #fa7b17;
  --purple:       #7c4dff;

  --pill-bg:      #f1f3f4;
  --pill-active-bg: #e6f4ea;
  --pill-active-color: #01875f;
  --pill-active-border: #01875f;

  --radius-xs:    4px;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-full:  9999px;

  --shadow-xs:    0 1px 2px rgba(60,64,67,.1);
  --shadow-sm:    0 1px 3px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.1);
  --shadow-md:    0 2px 6px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.1);
  --shadow-lg:    0 4px 16px rgba(60,64,67,.15), 0 2px 4px rgba(60,64,67,.08);
  --shadow-hover: 0 6px 20px rgba(60,64,67,.2);

  --font-head: 'Google Sans', 'Product Sans', 'DM Sans', sans-serif;
  --font-body: 'Roboto', 'DM Sans', sans-serif;
  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.25; color: var(--text); }
button { font-family: var(--font-body); cursor: pointer; }

/* ===== LAYOUT ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Full-width — no left column */
.site-wrap  { display: block; min-height: 100vh; }
#site-nav   { display: none !important; }           /* hide old vertical nav */

/* ===== MAIN AREA ===== */
#main-area {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HORIZONTAL TOP NAV ===== */
.top-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.top-nav::-webkit-scrollbar { display: none; }

.top-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  max-width: 1280px;
  margin: 0 auto;
  white-space: nowrap;
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text3);
  border-bottom: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.top-nav-item:hover { color: var(--text); background: var(--bg3); }

.top-nav-item.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}

.top-nav-item .nav-icon { font-size: 1rem; }

/* ===== TOP HEADER ===== */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
}

.header-logo-mobile {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

/* Search bar — centered, Google-style */
.header-search {
  flex: 1;
  max-width: 600px;
}

.header-search form {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 100%;
  height: 44px;
  background: var(--bg3);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 0 48px 0 20px;
  font-size: .9rem;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.header-search input:focus {
  background: var(--bg);
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.header-search input::placeholder { color: var(--text4); }

.header-search .search-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
}

.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 18px;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg3); }

/* ===== DEVICE FILTER TABS ===== */
.device-tabs {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 0 24px;
}

.device-tabs-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.device-tabs-inner::-webkit-scrollbar { display: none; }

.device-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text3);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.device-tab:hover { color: var(--text); background: var(--bg3); }

.device-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}

/* ===== CATEGORY CHIP STRIP ===== */
.chip-strip {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.chip-strip-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.chip-strip-inner::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border2);
  background: var(--bg);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.chip:hover { background: var(--bg3); border-color: var(--text4); }

.chip.active {
  background: var(--pill-active-bg);
  border-color: var(--pill-active-border);
  color: var(--pill-active-color);
  font-weight: 700;
}

/* ===== PAGE CONTENT ===== */
#page-content {
  flex: 1;
  padding: 24px;
  overflow: hidden;
}

/* ===== HERO BANNER SLIDER (Google Play style) ===== */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  height: 340px;
}

.hero-slides {
  display: flex;
  height: 100%;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide-bg-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.65) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}

.hero-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.hero-slide-app {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-slide-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  object-fit: cover;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.hero-slide-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: 4px;
}

.hero-slide-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 2px;
}

.hero-slide-developer {
  font-size: .82rem;
  color: rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-slide-action {
  flex-shrink: 0;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 24px;
  font-size: .875rem;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: .01em;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(1,135,95,.35);
  text-decoration: none;
}

.btn-install:hover {
  background: #017a55;
  box-shadow: 0 4px 16px rgba(1,135,95,.45);
  transform: translateY(-1px);
}

.btn-install.paid {
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(26,115,232,.35);
}

.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 3px;
}

/* Banner arrow */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.hero-arrow:hover { background: #fff; box-shadow: var(--shadow-hover); }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }

/* ===== SECTION HEADERS ===== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text);
}

.section-more {
  font-size: .82rem;
  font-weight: 500;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
}
.section-more:hover { color: #017a55; }

/* ===== APP CARD - Google Play tile style ===== */
.apps-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  margin: 0 -4px;
}
.apps-scroll::-webkit-scrollbar { display: none; }

.apps-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.apps-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.apps-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Compact tile card (homepage) */
.app-tile {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  min-width: 160px;
  text-decoration: none;
  color: inherit;
}

.app-tile:hover {
  background: var(--bg3);
}

.app-tile-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  background: var(--bg3);
}

.app-tile-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.app-tile-name {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.app-tile-cat {
  font-size: .78rem;
  color: var(--text3);
  margin-bottom: 3px;
}

.app-tile-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .78rem;
  color: var(--text3);
}

.app-tile-rating .stars {
  color: var(--text3);
  font-size: .68rem;
}

/* Wide banner card (featured) */
.featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.featured-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: block;
}

.featured-card-body {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.featured-card-app {
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg3);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

/* ===== TOP CHART ROW ===== */
.chart-section { margin-bottom: 32px; }

.chart-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.chart-tab {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border2);
  background: var(--bg);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: var(--transition);
}

.chart-tab.active {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.chart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  margin: -1px 0 0 -1px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.chart-item:first-child { border-radius: var(--radius-sm) 0 0 0; }
.chart-item:nth-child(3) { border-radius: 0 var(--radius-sm) 0 0; }
.chart-item:nth-last-child(3) { border-radius: 0 0 0 var(--radius-sm); }
.chart-item:last-child { border-radius: 0 0 var(--radius-sm) 0; }

.chart-item:hover { background: var(--bg3); z-index: 1; }

.chart-rank {
  font-size: .9rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text4);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.rank-gold   { color: #f9ab00 !important; }
.rank-silver { color: #80868b !important; }
.rank-bronze { color: #c27b2c !important; }

.chart-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg3);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.chart-info { flex: 1; min-width: 0; }
.chart-name { font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-meta { font-size: .75rem; color: var(--text3); margin-top: 1px; }

.chart-price {
  font-size: .78rem;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}
.chart-price.paid { color: var(--text2); }

/* ===== CATEGORY SECTIONS ===== */
.section-block { margin-bottom: 36px; }

/* ===== FULL APP GRID PAGE ===== */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px;
}

/* ===== SINGLE APP PAGE ===== */
.app-detail-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.app-detail-icon {
  width: 120px;
  height: 120px;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  flex-shrink: 0;
}

.app-detail-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.02em;
}

.app-detail-dev {
  font-size: .9rem;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 10px;
}

.app-stat-strip {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
  width: fit-content;
}

.app-stat-cell {
  padding: 10px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.app-stat-cell:last-child { border-right: none; }

.app-stat-val {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.app-stat-val .star-icon { color: var(--text3); font-size: .8rem; }

.app-stat-lbl {
  font-size: .7rem;
  color: var(--text4);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.app-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.btn-install-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 32px;
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--font-head);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(1,135,95,.3);
  text-decoration: none;
}
.btn-install-lg:hover { background: #017a55; transform: translateY(-1px); }
.btn-install-lg.blue { background: var(--blue); box-shadow: 0 2px 8px rgba(26,115,232,.3); }
.btn-install-lg.blue:hover { background: #1558b0; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius-full);
  padding: 11px 24px;
  font-size: .875rem;
  font-weight: 700;
  font-family: var(--font-head);
  transition: var(--transition);
  text-decoration: none;
}
.btn-outline:hover { background: var(--green-light); }

/* Screenshots */
.screenshots-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  scrollbar-width: none;
}
.screenshots-row::-webkit-scrollbar { display: none; }

.screenshot-thumb {
  height: 240px;
  width: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.screenshot-thumb:hover { box-shadow: var(--shadow-hover); }

/* Rating section */
.rating-block {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg2);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.rating-big-num {
  font-size: 3.5rem;
  font-weight: 300;
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1;
}

.rating-stars-row {
  color: var(--text3);
  font-size: .9rem;
  letter-spacing: 2px;
  margin: 4px 0;
}

.rating-count-sm { font-size: .78rem; color: var(--text3); }

.rating-bars { flex: 1; }

.rbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rbar-label { font-size: .78rem; color: var(--text3); width: 14px; text-align: right; }

.rbar-track {
  flex: 1;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  overflow: hidden;
}

.rbar-fill {
  height: 100%;
  background: var(--text3);
  border-radius: 2px;
}

/* Pros & Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.pc-box {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.pc-box.pros { border-left: 3px solid var(--green); background: var(--green-light); }
.pc-box.cons { border-left: 3px solid var(--red); background: var(--red-light); }

.pc-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.pros .pc-title { color: var(--green); }
.cons .pc-title { color: var(--red); }

.pc-list { list-style: none; }
.pc-list li {
  font-size: .85rem;
  color: var(--text2);
  padding: 3px 0 3px 16px;
  position: relative;
}
.pc-list li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.pros .pc-list li::before { content: '+'; color: var(--green); }
.cons .pc-list li::before { content: '−'; color: var(--red); }

/* AFC Score */
.afc-score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--green);
  background: var(--green-light);
}

.afc-score-num {
  font-size: 1.4rem;
  font-weight: 900;
  font-family: var(--font-head);
  color: var(--green);
  line-height: 1;
}

.afc-score-lbl {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--green);
}

/* App info table */
.info-table {
  width: 100%;
  border-collapse: collapse;
}
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 10px 0; font-size: .875rem; }
.info-table td:first-child { color: var(--text3); width: 140px; }
.info-table td:last-child { font-weight: 500; color: var(--text); }

/* ===== AFFILIATE DISCLAIMER ===== */
.afc-disclaimer {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .78rem;
  color: #795548;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
}
.afc-disclaimer i { color: var(--yellow); margin-top: 1px; flex-shrink: 0; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  color: var(--text3);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--green); text-decoration: underline; }
.breadcrumb span.sep { color: var(--border2); }

/* ===== SIDEBAR (right, for single pages) ===== */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.right-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-widget-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.sidebar-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.sidebar-app-row:last-child { border-bottom: none; }
.sidebar-app-row:hover { background: var(--bg3); }

.sidebar-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg3);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.sidebar-app-name { font-size: .875rem; font-weight: 500; }
.sidebar-app-meta { font-size: .75rem; color: var(--text3); }

/* ===== TAGS / BADGES ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.badge-free { background: var(--green-light); color: var(--green); }
.badge-paid { background: var(--blue-light); color: var(--blue); }
.badge-new  { background: #e8eaed; color: var(--text3); }
.badge-editors { background: #fce8e6; color: var(--red); }

/* ===== FOOTER ===== */
#colophon {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 40px 24px 24px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-desc { font-size: .85rem; color: var(--text3); line-height: 1.7; margin-bottom: 16px; }

.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 15px;
  transition: var(--transition);
}
.footer-social a:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }

.footer-col-h {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
  margin-bottom: 14px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: .875rem; color: var(--text2); transition: var(--transition); }
.footer-links a:hover { color: var(--green); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .78rem;
  color: var(--text4);
}

.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text4); transition: var(--transition); }
.footer-bottom-links a:hover { color: var(--text2); }

/* ===== PAGINATION ===== */
.afc-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 32px 0;
}

.afc-pagination .page-numbers {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition);
}

.afc-pagination .page-numbers:hover,
.afc-pagination .page-numbers.current {
  background: var(--green-light);
  color: var(--green);
  font-weight: 700;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay img {
  max-height: 90vh;
  max-width: 90vw;
  border-radius: var(--radius-md);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  padding: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .apps-grid-5 { grid-template-columns: repeat(4, 1fr); }
  .chart-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .site-wrap { grid-template-columns: 1fr; }
  #site-nav { display: none; position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 200; box-shadow: var(--shadow-lg); }
  #site-nav.open { display: block; }
  .mobile-menu-toggle { display: flex; }
  .header-logo-mobile { display: flex; }
  .apps-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .hero-banner { height: 240px; }
  .hero-slide-title { font-size: 1.1rem; }
  .apps-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .apps-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
  .page-with-sidebar { grid-template-columns: 1fr; }
  .pros-cons-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-detail-header { flex-wrap: wrap; }
  .app-stat-strip { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  #page-content { padding: 16px; }
  .apps-grid-4, .apps-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .hero-slide-content { padding: 16px; }
  .hero-slide-title { font-size: 1rem; }
  .hero-slide-icon { width: 48px; height: 48px; border-radius: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== HORIZONTAL NAV OVERRIDE FIXES ===== */
#page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  width: 100%;
}

.top-nav-inner,
.chip-strip-inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* Mobile: hide top-nav, show hamburger */
@media (max-width: 860px) {
  .top-nav { display: none; }
  .mobile-menu-toggle { display: flex !important; align-items: center; justify-content: center; width:38px; height:38px; border-radius:50%; background:none; border:none; font-size:20px; color:var(--text2); cursor:pointer; }
}

@media (min-width: 861px) {
  .mobile-menu-toggle { display: none !important; }
  #mobileMenu { display: none !important; }
}

/* ══════════════════════════════════════════════════════
   APPFUNDE-STYLE COMPONENTS
══════════════════════════════════════════════════════ */

/* ── Section Block wrapper ─────────────────────────── */
.af-section-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 24px;
  margin-bottom: 20px;
}

/* ── Section Header ────────────────────────────────── */
.af-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.af-section-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.af-section-icon { font-size: 1.1rem; }

.af-section-more {
  color: var(--green);
  font-size: 1.3rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.af-section-more:hover { color: #017a55; transform: scale(1.1); }

/* ── Category icon grid (appfunde Popular Categories) ── */
.af-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.af-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text2);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.af-cat-item:hover { background: var(--bg3); }

.af-cat-icon {
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg2);
}

.af-cat-label {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.2;
}

/* ── Editor's Choice banner cards (horizontal scroll) ── */
.af-banner-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.af-banner-scroll::-webkit-scrollbar { display: none; }

.af-banner-card {
  flex-shrink: 0;
  width: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  display: block;
}
.af-banner-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.af-banner-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.af-banner-body {
  padding: 10px 12px 12px;
  position: relative;
}

.af-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  margin-top: -28px;
  margin-bottom: 6px;
  display: block;
}

.af-banner-name {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.af-banner-meta {
  font-size: .75rem;
  color: var(--text3);
}

/* ── App icon card (Top Downloads / Trending / etc.) ── */
.af-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 4px;
}

.af-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}
.af-icon-card:hover { background: var(--bg3); }

.af-icon-wrap {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.af-icon-img {
  width: 72px !important;
  height: 72px !important;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(60,64,67,.2);
  display: block;
}

.af-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.af-icon-name {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
  width: 100%;
}

.af-icon-rating {
  font-size: .72rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}

.af-star { color: var(--yellow); font-size: .75rem; }

/* ── Blog post cards grid ──────────────────────────── */
.af-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.af-post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.af-post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.af-post-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.af-post-body { padding: 12px 14px; flex: 1; }

.af-post-cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  display: block;
  margin-bottom: 4px;
}

.af-post-title {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.af-post-meta { font-size: .72rem; color: var(--text4); }

/* ── Responsive tweaks ─────────────────────────────── */
@media (max-width: 640px) {
  .af-cat-grid      { grid-template-columns: repeat(4, 1fr); }
  .af-icon-grid     { grid-template-columns: repeat(4, 1fr); }
  .af-banner-card   { width: 220px; }
  .af-posts-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .af-cat-grid      { grid-template-columns: repeat(3, 1fr); }
  .af-icon-grid     { grid-template-columns: repeat(3, 1fr); }
}
