/* Deal-hub pages (/promoties/**). Builds on styles.css design tokens. */

.deals-main { padding: calc(var(--header-h) + 32px) 0 72px; }

.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; color: var(--muted-2); }

.deals-head { max-width: 760px; margin-bottom: 36px; }
.deals-head h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.deals-head .lead { margin-top: 14px; }
.deals-updated { font-size: 0.82rem; color: var(--muted-2); margin-top: 12px; }

/* ---------- hub index tiles ---------- */
.hub-h2 { font-size: 1.25rem; margin: 36px 0 16px; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.hub-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.hub-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.hub-tile__label { font-weight: 700; }
.hub-tile__count { font-size: 0.82rem; color: var(--muted); }

/* ---------- deal grid ---------- */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.deal {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.deal:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.deal__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.deal__media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.deal__noimg { width: 100%; height: 100%; background: var(--tint); }
.deal__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: -0.01em;
}
.deal__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.deal__retailer {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-700);
}
.deal__title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.deal__price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.deal__price .now { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.deal__price .was { font-size: 0.85rem; color: var(--muted-2); text-decoration: line-through; }
.deal__unit { font-size: 0.78rem; color: var(--muted); }
.deal__ends { font-size: 0.76rem; color: var(--muted-2); }

.deals-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.deals-teaser span { color: var(--secondary); font-size: 0.95rem; font-weight: 500; }
.deals-teaser .btn { white-space: nowrap; }

.deals-empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius-md);
}

/* ---------- app cta ---------- */
.deals-appcta {
  margin-top: 56px;
  padding: 40px 32px;
  text-align: center;
  background: var(--grad-soft);
  border-radius: var(--radius-lg);
}
.deals-appcta h2 { font-size: 1.5rem; }
.deals-appcta p { max-width: 520px; margin: 12px auto 22px; color: var(--secondary); }

@media (max-width: 520px) {
  .deal-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .deal__title { font-size: 0.85rem; }
}

/* ---------- brands page (/merken) ---------- */
.brands-loading { padding: 40px; text-align: center; color: var(--muted); }

.brand-cat { margin-bottom: 40px; }
.brand-cat__title { font-size: 1.15rem; margin: 0 0 16px; }

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.brand-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.brand-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.brand-tile__media {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tint);
  padding: 12px;
}
.brand-tile__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-tile__initial {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-soft);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 800;
}
.brand-tile__name {
  padding: 10px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .brand-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .brand-tile__name { font-size: 0.8rem; }
}

/* ---------- recipes page (/recepten) ---------- */
/* Text-led cards by design: we show only the recipe title, source attribution and
   our own match stats, and link out to the source — never a scraped image, the
   ingredient list or the method. So no media box here, unlike .deal. */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.recipe {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.recipe:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.recipe__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recipe__source {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.recipe__match {
  display: inline-flex;
  align-items: baseline;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--grad-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.recipe__match strong { font-size: 0.98rem; font-weight: 800; }
.recipe__title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.recipe__retailer { font-size: 0.85rem; color: var(--secondary); margin: 0 0 auto; }
.recipe__retailer strong { color: var(--teal-700); font-weight: 700; }
.recipe__go { font-size: 0.82rem; font-weight: 700; color: var(--primary); padding-top: 4px; }

.recipes-note {
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--muted-2);
}
.recipes-note a { color: var(--muted); font-weight: 600; }
.recipes-note a:hover { color: var(--primary); }

@media (max-width: 520px) {
  .recipe-grid { grid-template-columns: 1fr; }
}

/* ---------- download modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.modal__card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
  text-align: center;
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--tint);
  border-radius: 50%;
  cursor: pointer;
  color: var(--secondary);
}
.modal__close:hover { background: var(--line); }
.modal__close svg { width: 18px; height: 18px; }
.modal__media {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tint);
  border-radius: var(--radius-md);
  padding: 10px;
}
.modal__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal__card h3 { font-size: 1.3rem; margin: 0 0 8px; }
.modal__card p { color: var(--secondary); font-size: 0.95rem; margin: 0 0 20px; }
.modal__card .btn { width: 100%; }
.modal__card .store-badges { margin-top: 16px; justify-content: center; }
