/* ===================================================================
   KIMBINO — DESIGN SYSTEM v2
   =================================================================== */

/* Chrome PWA mini-infobar — push to bottom */
#install-prompt-mini-infobar,
.mini-infobar,
[data-role="mini-infobar"] {
  top: auto !important;
  bottom: 0 !important;
  position: fixed !important;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: #f1f5f9;
  min-height: 100vh;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ---- TOKENS ---- */
:root {
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-light:  #eff6ff;
  --black:        #0f172a;
  --white:        #fff;
  --surface:      #ffffff;
  --surface2:     #f8fafc;
  --border:       #e2e8f0;
  --border2:      #cbd5e1;
  --text:         #0f172a;
  --text2:        #475569;
  --text3:        #94a3b8;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow-xs:    0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:    0 2px 8px rgba(0,0,0,.07);
  --shadow:       0 4px 16px rgba(0,0,0,.09);
  --shadow-md:    0 6px 20px rgba(0,0,0,.11);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.13);
  --transition:   0.16s ease;
  --logo-size:    64px;
  --card-gap:     16px;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ====================================================================
   HEADER
   ==================================================================== */
.header {
  background: #0f172a;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 24px;
  max-width: 1380px;
  margin: 0 auto;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}
.logo-icon { font-size: 1.7rem; line-height: 1; }
.logo-text { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.logo-text span { color: #60a5fa; }

/* Search */
.search-bar {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 26px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.search-bar:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,.2);
  background: rgba(255,255,255,.16);
}
.search-bar .search-icon {
  padding: 0 12px 0 16px;
  color: rgba(255,255,255,.5);
  font-size: 1rem;
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 9px 4px;
  font-size: 0.9rem;
  color: #fff;
}
.search-bar input::placeholder { color: rgba(255,255,255,.45); }
.search-bar .search-btn {
  background: var(--brand);
  border: none;
  color: var(--white);
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-bar .search-btn:hover { background: var(--brand-dark); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.icon-btn {
  background: none;
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.icon-btn:hover { border-color: #60a5fa; color: #fff; }
.icon-btn.active { border-color: #60a5fa; color: #60a5fa; background: rgba(96,165,250,.15); }

/* Loading screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text3);
}
.loading-squirrel {
  font-size: 3.5rem;
  animation: spin 1.5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================================================================
   MAIN NAV
   ==================================================================== */
.main-nav {
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,.07);
}
.nav-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
  user-select: none;
}
.nav-item:hover { color: #fff; }
.nav-item.active { color: #60a5fa; border-bottom-color: #60a5fa; }
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  color: currentColor;
}
.nav-item:hover .nav-icon { color: #fff; }
.nav-item.active .nav-icon { color: #60a5fa; }

/* ====================================================================
   CATEGORY PILLS (home page)
   ==================================================================== */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.cat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  user-select: none;
}
.cat-pill:hover {
  border-color: var(--cat-color, var(--brand));
  box-shadow: 0 2px 12px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.cat-pill-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cat-color, var(--brand));
}
.cat-pill-icon svg {
  width: 22px;
  height: 22px;
}
.cat-pill-name {
  line-height: 1.2;
}

/* ====================================================================
   LAYOUT
   ==================================================================== */
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
}
.page { display: none; min-height: 60vh; }
.page.active { display: block; }

/* ====================================================================
   HOME STORE CIRCLES BAR (below nav, stories-style)
   ==================================================================== */
.stores-circles-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.stores-circles-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 24px;
  scrollbar-width: none;
  max-width: 1380px;
  margin: 0 auto;
}
.stores-circles-scroll::-webkit-scrollbar { display: none; }
.stores-circles-scroll .store-circle { width: 68px; }
.stores-circles-scroll .circle-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.stores-circles-scroll .store-circle:hover .circle-logo {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.stores-circles-scroll .circle-name {
  font-size: 0.62rem;
  color: var(--text2);
  text-align: center;
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  display: block;
}

/* Category page title */
.cat-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  padding: 18px 0 16px;
  line-height: 1.3;
}

/* Cats section title (home) */
.cats-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  padding: 20px 0 12px;
}

/* ====================================================================
   STORE CIRCLES (horizontal scroll)
   ==================================================================== */
.circles-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.circles-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 24px;
  scrollbar-width: none;
  max-width: 1380px;
  margin: 0 auto;
}
.circles-scroll::-webkit-scrollbar { display: none; }
.store-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: pointer;
  width: 72px;
}
.circle-logo {
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.circle-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.circle-logo .logo-abbr {
  font-size: 0.52rem;
  font-weight: 800;
  text-align: center;
  padding: 4px;
  line-height: 1.2;
  word-break: break-word;
}
.store-circle:hover .circle-logo {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.store-circle.active .circle-logo { border-color: var(--brand); }
.store-circle.active .circle-name { color: var(--brand); font-weight: 600; }
.circle-name {
  font-size: 0.68rem;
  color: var(--text2);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

/* ====================================================================
   SECTION TITLES
   ==================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 16px;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title-icon { font-size: 1.2rem; }
.see-all {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: opacity var(--transition);
}
.see-all:hover { opacity: 0.75; }

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  padding: 24px 0 4px;
}
.page-subtitle {
  font-size: 0.9rem;
  color: var(--text2);
  margin-bottom: 4px;
}

/* ====================================================================
   BREADCRUMB
   ==================================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text3);
  padding: 14px 0 0;
  flex-wrap: wrap;
}
.breadcrumb a, .breadcrumb span { cursor: pointer; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--border2); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ====================================================================
   AD / LEAFLET CARDS
   ==================================================================== */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: var(--card-gap);
  margin-bottom: 8px;
}
.ads-grid-expired .ad-card {
  opacity: 0.55;
  filter: grayscale(40%);
}
.ads-grid-expired .ad-card:hover {
  opacity: 0.85;
  filter: grayscale(0%);
}

a.ad-card, a.top-store-card, a.store-circle, a.store-tile {
  text-decoration: none;
  color: inherit;
}

.ad-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.ad-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: transparent;
  z-index: 1;
}

/* Thumbnail */
.ad-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.ad-thumb-bg {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  font-size: 5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -2px;
  pointer-events: none;
  color: currentColor;
}
.ad-thumb-logo {
  position: relative;
  z-index: 1;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
  padding: 8px;
  line-height: 1.2;
  max-width: 90%;
}
.ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.ad-thumb-cover {
  background: #f0f0f0;
  position: relative;
}
.ad-thumb-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  position: absolute;
  inset: 0;
  display: block;
}

/* Badge */
.ad-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  z-index: 2;
  color: var(--white);
}
.badge-new         { background: #16a34a; }
.badge-special     { background: #2563eb; }
.badge-fathers-day { background: #7c3aed; }
.badge-sale        { background: #dc2626; }

/* Save button */
.save-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.88);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.ad-card:hover .save-btn { opacity: 1; }
.save-btn.saved { opacity: 1; background: var(--brand-light); }

/* Card body */
.ad-body {
  padding: 10px 12px 13px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ad-dates { font-size: 0.72rem; color: var(--text3); }
.ad-store {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  color: var(--text2);
  margin-top: auto;
}
.ad-store-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ====================================================================
   STORE LOGO TILES (category header)
   ==================================================================== */
.store-tiles-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 900px) {
  .store-tiles-wrap { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 600px) {
  .store-tiles-wrap { grid-template-columns: repeat(3, 1fr); }
}
.store-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px 8px;
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: box-shadow var(--transition), transform var(--transition);
}
.store-tile:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.store-tile-logo {
  width: 100%;
  height: 80px;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  overflow: hidden;
}
.store-tile-logo img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  object-position: center;
}
.store-tile-logo .logo-abbr {
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
  color: #333;
}
.store-tile-name { font-size: 0.78rem; font-weight: 500; color: var(--text2); text-align: center; padding: 0 4px; margin-top: 6px; }

/* ====================================================================
   TOP STORES GRID
   ==================================================================== */
.top-stores-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.top-store-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 8px 10px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.top-store-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  transform: translateY(-2px);
}
.top-store-card .card-logo {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  padding: 0 8px;
}
.top-store-card .card-logo img {
  width: 124px;
  height: 50px;
  object-fit: contain;
}
.top-store-card .card-logo .logo-abbr {
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
  color: #555;
}
.top-store-card .card-name {
  font-size: 0.78rem;
  color: var(--text2);
  text-align: center;
  font-weight: 500;
  padding: 0 4px;
  margin-top: 6px;
  line-height: 1.3;
}

/* ====================================================================
   TAGS / PRODUCT PILLS
   ==================================================================== */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 4px;
}
.tag {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  user-select: none;
}
.tag:hover, .tag.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* ====================================================================
   ALPHA FILTER BAR
   ==================================================================== */
.alpha-bar {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 20px;
}
.alpha-btn {
  background: none;
  border: none;
  padding: 4px 9px;
  font-size: 0.83rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--text2);
  transition: background var(--transition), color var(--transition);
}
.alpha-btn:hover, .alpha-btn.active {
  background: var(--brand);
  color: var(--white);
}

/* ====================================================================
   STORE DETAIL PAGE
   ==================================================================== */
.store-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  box-shadow: var(--shadow-xs);
}
.store-hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.store-hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.store-hero-info { flex: 1; }
.store-hero-info h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.store-hero-info p { font-size: 0.88rem; color: var(--text2); line-height: 1.6; }
.store-hero-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.store-hero-meta span {
  font-size: 0.8rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Subscribe box */
.subscribe-box {
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 240px;
  flex-shrink: 0;
}
.subscribe-box h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.sub-form { display: flex; flex-direction: column; gap: 8px; }
.sub-form input {
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.85rem;
  outline: none;
  width: 100%;
}
.sub-form button {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background var(--transition);
}
.sub-form button:hover { background: #333; }
.sub-note { font-size: 0.68rem; opacity: .8; margin-top: 6px; }

/* ====================================================================
   AD VIEWER
   ==================================================================== */
.ad-viewer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow-xs);
}
.ad-viewer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.ad-viewer-title { font-size: 1.4rem; font-weight: 800; }
.ad-viewer-dates { font-size: 0.85rem; color: var(--text2); margin-top: 3px; }
.save-ad-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}
.save-ad-btn:hover { border-color: var(--brand); }
.save-ad-btn.saved { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.ad-flyer-cover {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  text-align: center;
  background: #f0f0f0;
  max-width: 600px;
  margin: 0 auto;
}
.ad-flyer-cover img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
}
.ad-flyer-cover .view-on-kimbino {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ==== FLYER VIEWER — pagination ==== */
.flyer-pager {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.flyer-pager-img-wrap {
  background: #111;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flyer-pager-img-wrap img {
  width: 100%;
  max-width: 680px;
  height: auto;
  display: block;
}
.flyer-pager-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.flyer-nav-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  min-width: 90px;
}
.flyer-nav-btn:hover:not(:disabled) { background: var(--brand-dark); }
.flyer-nav-btn:disabled {
  background: var(--border2);
  color: var(--text3);
  cursor: not-allowed;
}
.flyer-pager-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  text-align: center;
}
.flyer-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  background: #f4f5f7;
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
}
.flyer-thumb {
  width: 52px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s;
}
.flyer-thumb:hover { opacity: 0.9; }
.flyer-thumb.active {
  border-color: var(--brand);
  opacity: 1;
}

/* ==== FLYER VIEWER — header ==== */
.flyer-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 12px;
  flex-wrap: wrap;
}
.flyer-viewer-store {
  display: flex;
  align-items: center;
  gap: 14px;
}
.flyer-store-logo-wrap {
  width: 64px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.flyer-store-logo-wrap img {
  max-width: 64px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.flyer-viewer-title { font-size: 1.2rem; font-weight: 800; }
.flyer-viewer-dates { font-size: 0.82rem; color: var(--text2); margin-top: 2px; }

.flyer-pages {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.flyer-page {
  display: block;
  line-height: 0;
}
.flyer-page img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #f0f0f0;
}
.flyer-page:last-of-type img {
  border-bottom: none;
}
.flyer-pages-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border-top: 1px solid var(--border);
}
.flyer-page-count {
  font-size: 0.82rem;
  color: var(--text3);
  font-weight: 600;
}

.ad-mock {
  border-radius: var(--radius);
  padding: 40px 20px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  border: 2px dashed var(--border2);
}
.ad-mock-store-name { font-size: 2.2rem; font-weight: 900; }
.ad-mock-label { font-size: 0.9rem; color: var(--text2); font-weight: 600; }
.ad-mock-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.ad-mock-tag {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.8rem;
  box-shadow: var(--shadow-xs);
}
.view-on-kimbino {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 16px;
  transition: background var(--transition);
  text-decoration: none;
}
.view-on-kimbino:hover { background: var(--brand-dark); }

/* ====================================================================
   CAROUSEL
   ==================================================================== */
.carousel-outer { overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.carousel-outer::-webkit-scrollbar { display: none; }
.carousel-inner { display: flex; gap: var(--card-gap); width: max-content; }
.carousel-inner .ad-card { width: 185px; flex-shrink: 0; }

/* ====================================================================
   STORE PAGE — LEAFLET CARDS (kif kimbino)
   ==================================================================== */
.store-carousel-outer {
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -4px;
  padding: 4px 4px 12px;
}
.store-carousel-outer::-webkit-scrollbar { display: none; }
.store-carousel-inner {
  display: flex;
  gap: 16px;
  width: max-content;
}
.store-carousel-expired .store-leaf-card {
  opacity: 0.55;
  filter: grayscale(40%);
}
.store-carousel-expired .store-leaf-card:hover {
  opacity: 0.85;
  filter: grayscale(0%);
}
.store-leaf-card {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow var(--transition), transform var(--transition);
}
.store-leaf-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.store-leaf-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f0f0f0;
}
.store-leaf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.store-leaf-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.store-leaf-cover .save-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.store-leaf-info {
  padding: 10px 12px 12px;
}
.store-leaf-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.store-leaf-dates {
  font-size: 0.78rem;
  color: var(--text3);
}

/* ====================================================================
   DEALS PAGE
   ==================================================================== */
.deals-hero {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.deals-hero-icon { font-size: 3rem; }
.deals-hero h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.deals-hero p { font-size: 0.9rem; opacity: .85; }

/* ====================================================================
   CATEGORY BANNER
   ==================================================================== */
.cat-banner {
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 16px 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}
.cat-banner-icon { font-size: 2.4rem; display:flex; align-items:center; }
.cat-banner-svg { display:flex; align-items:center; justify-content:center; }
.cat-banner-svg svg { width: 42px; height: 42px; color: #fff; }
.cat-banner h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 2px; }
.cat-banner p { font-size: 0.85rem; opacity: .85; }

/* ====================================================================
   MAGAZINE
   ==================================================================== */
.magazine-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
  margin-top: 20px;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-xs);
}
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.article-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
}
.article-body { padding: 14px 16px; }
.article-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brand);
  margin-bottom: 5px;
}
.article-title { font-size: 0.92rem; font-weight: 700; line-height: 1.4; margin-bottom: 6px; color: var(--text); }
.article-date { font-size: 0.74rem; color: var(--text3); margin-bottom: 8px; }
.article-excerpt { font-size: 0.8rem; color: var(--text2); line-height: 1.55; }
.recent-posts-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 80px;
}
.recent-posts-box h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 14px; }
.recent-post {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.45;
  transition: color var(--transition);
}
.recent-post:last-child { border-bottom: none; }
.recent-post:hover { color: var(--brand); }

/* ====================================================================
   CITIES
   ==================================================================== */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 20px;
  margin: 16px 0 28px;
}
.city-item {
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  padding: 3px 0;
  transition: color var(--transition);
}
.city-item:hover { color: var(--brand); }

/* ====================================================================
   PRODUCTS GRID
   ==================================================================== */
.products-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px 16px;
  margin: 16px 0 28px;
}
.product-link {
  display: block;
  font-size: 0.87rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.product-link:hover { color: var(--brand); }

/* ====================================================================
   SAVED PAGE
   ==================================================================== */
.saved-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text3);
}
.saved-empty-icon { font-size: 4rem; margin-bottom: 16px; }
.saved-empty h3 { font-size: 1.2rem; font-weight: 700; color: var(--text2); margin-bottom: 8px; }
.saved-empty p { font-size: 0.9rem; }

/* ====================================================================
   SEARCH RESULTS
   ==================================================================== */
.search-hero {
  padding: 24px 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
}
.search-hero span { color: var(--brand); }
.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text3);
}
.no-results-icon { font-size: 3rem; margin-bottom: 12px; }

/* ====================================================================
   DESCRIPTION SECTIONS
   ==================================================================== */
.desc-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-xs);
}
.desc-box h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 12px; }
.desc-box h3 { font-size: 0.95rem; font-weight: 700; margin: 14px 0 7px; }
.desc-box p { font-size: 0.86rem; color: var(--text2); line-height: 1.7; margin-bottom: 8px; }
.desc-box ul { padding-left: 18px; margin-bottom: 8px; }
.desc-box li { font-size: 0.85rem; color: var(--text2); margin-bottom: 5px; line-height: 1.6; }


.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 8px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.read-more-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Events grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 8px 0 4px;
}
.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-align: center;
}
.event-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.event-card-emoji { font-size: 2rem; line-height: 1; }
.event-card-name { font-size: .84rem; font-weight: 700; color: var(--text); }
.event-card-month { font-size: .75rem; color: var(--text3); }

/* Product page — where to buy chips */
.product-where-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.product-store-chip {
  display: inline-flex;
  align-items: center;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.product-store-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--white); }

/* Product desc-box collapsed/expanded */
.desc-box--product .desc-content {
  max-height: 200px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* View more button for ads grid */
.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 22px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  margin: 8px auto;
  transition: opacity .2s;
}
.view-more-btn:hover { opacity: .88; }

/* ====================================================================
   COUNTRIES SECTION
   ==================================================================== */
.countries-section { margin: 32px 0; }
.countries-heading {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 14px;
}
.countries-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px 16px;
}
.country-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text2);
  cursor: pointer;
  padding: 3px 0;
  transition: color var(--transition);
}
.country-link:hover { color: var(--brand); }
.flag { font-size: 1rem; }

/* ====================================================================
   FEATURED / PROMO CARD
   ==================================================================== */
.promo-card {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.promo-card-icon { font-size: 1.8rem; }
.promo-card h3 { font-size: 0.88rem; font-weight: 700; line-height: 1.3; }
.promo-card p { font-size: 0.75rem; opacity: .85; }
.promo-card .btn-white {
  background: var(--white);
  color: var(--brand-dark);
  border: none;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
  cursor: pointer;
}

/* ====================================================================
   TOAST
   ==================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a2e;
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.87rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  transform: translateY(60px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ====================================================================
   FOOTER
   ==================================================================== */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 40px 0 20px;
}
.footer-grid {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-tagline { font-size: 0.8rem; color: var(--text3); }
.app-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.app-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition);
  color: var(--text);
}
.app-badge:hover { border-color: var(--brand); }
.socials { display: flex; gap: 8px; margin-top: 12px; }
.social-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text2);
  transition: border-color var(--transition), color var(--transition);
}
.social-btn:hover { border-color: var(--brand); color: var(--brand); }
.footer-col h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 14px; }
.footer-col a {
  display: block;
  font-size: 0.83rem;
  color: var(--text2);
  margin-bottom: 9px;
  cursor: pointer;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  max-width: 1380px;
  margin: 20px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.77rem;
  color: var(--text3);
}
.footer-bottom a { color: var(--text3); cursor: pointer; }
.footer-bottom a:hover { color: var(--brand); }

/* ====================================================================
   DIVIDER
   ==================================================================== */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 1280px) {
  .top-stores-grid { grid-template-columns: repeat(5, 1fr); }
  .store-tiles-wrap { grid-template-columns: repeat(5, 1fr); }
  .countries-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1024px) {
  .top-stores-grid { grid-template-columns: repeat(4, 1fr); }
  .store-tiles-wrap { grid-template-columns: repeat(4, 1fr); }
  .countries-grid { grid-template-columns: repeat(4, 1fr); }
  .magazine-layout { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .cities-grid { grid-template-columns: repeat(4, 1fr); }
  .products-columns { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-top { padding: 10px 16px; gap: 10px; }
  .container { padding: 0 16px; }
  .search-bar { max-width: none; }
  .ads-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .top-stores-grid { grid-template-columns: repeat(3, 1fr); }
  .store-tiles-wrap { grid-template-columns: repeat(3, 1fr); }
  .countries-grid { grid-template-columns: repeat(3, 1fr); }
  .store-hero { flex-direction: column; }
  .subscribe-box { width: 100%; }
  .cities-grid { grid-template-columns: repeat(3, 1fr); }
  .products-columns { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .deals-hero { padding: 20px; }
  .deals-hero h1 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .top-stores-grid { grid-template-columns: repeat(2, 1fr); }
  .store-tiles-wrap { grid-template-columns: repeat(2, 1fr); }
  .countries-grid { grid-template-columns: repeat(2, 1fr); }
  .ads-grid { grid-template-columns: repeat(2, 1fr); }
  .cities-grid { grid-template-columns: repeat(2, 1fr); }
  .products-columns { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: 1fr; }
  :root { --logo-size: 48px; }
}

