/* ==========================================================================
   Compra Borges — Main Stylesheet
   Redisseny UX/UI complet: paleta blau petroli + taronja terracota
   MODE IAIA: Dissenyat per a gent gran. Tot GRAN, clar i accessible.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. Custom Properties — Nova Paleta
   -------------------------------------------------------------------------- */
:root {
  /* --- Paleta principal --- */
  --cb-primary:    #0E4D64;
  --cb-primary-light: #1A6B8A;
  --cb-primary-dark: #093A4B;
  --cb-accent:     #F4A340;
  --cb-accent-light: #F7BC6E;
  --cb-accent-dark: #D88A2A;
  --cb-secondary:  #C73E3E;
  --cb-bg:         #FAF7F2;
  --cb-card:       #FFFFFF;
  --cb-text:       #1A2332;
  --cb-muted:      #5B6772;
  --cb-border:     #E8E2D5;
  --cb-success:    #2A9D5F;
  --cb-error:      #C73E3E;

  /* --- Tipografia --- */
  --font-display:  'Fraunces', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Mides base (MODE IAIA: 18px base!) --- */
  --text-xs:    0.778rem;   /* ~14px */
  --text-sm:    0.889rem;   /* ~16px */
  --text-base:  1rem;       /* 18px */
  --text-lg:    1.222rem;   /* ~22px */
  --text-xl:    1.444rem;   /* ~26px */
  --text-2xl:   1.778rem;   /* ~32px */
  --text-3xl:   2.222rem;   /* ~40px */
  --text-4xl:   3.111rem;   /* ~56px */

  /* --- Espaiats --- */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-section: 5rem;

  /* --- Radius --- */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* --- Ombres --- */
  --shadow-sm:   0 1px 3px rgba(26,35,50,0.06);
  --shadow-md:   0 4px 12px rgba(26,35,50,0.08);
  --shadow-lg:   0 10px 30px rgba(26,35,50,0.10);
  --shadow-xl:   0 20px 50px rgba(26,35,50,0.12);
  --shadow-accent: 0 4px 20px rgba(244,163,64,0.30);

  /* --- Transicions --- */
  --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* --- Layout --- */
  --container-max:  1200px;
  --header-height:  72px;
  --bottom-nav-h:   68px;
}

/* Mode lletra gran */
.large-text {
  font-size: 23.4px; /* 18 * 1.3 */
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--cb-text);
  background: var(--cb-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--cb-primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--cb-accent-dark); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--cb-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}

/* --------------------------------------------------------------------------
   3. Utilitats
   -------------------------------------------------------------------------- */
.container {
  width: 86%;
  max-width: var(--container-max);
  margin-inline: auto;
}
@media (min-width: 768px) { .container { width: 92%; } }

.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--cb-primary); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-md);
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 4px;
  background: var(--cb-accent);
  border-radius: 2px;
  margin: var(--space-md) auto 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --------------------------------------------------------------------------
   4. Botons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  min-height: 56px;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
}
.btn svg { flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid var(--cb-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--cb-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--cb-accent-dark);
  color: #fff;
  box-shadow: 0 6px 24px rgba(244,163,64,0.4);
}

.btn-secondary {
  background: var(--cb-primary);
  color: #fff;
}
.btn-secondary:hover { background: var(--cb-primary-light); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--cb-primary);
  color: var(--cb-primary);
}
.btn-outline:hover {
  background: var(--cb-primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--cb-primary);
  padding: 10px 20px;
  min-height: auto;
}
.btn-ghost:hover { background: rgba(14,77,100,0.06); }

.btn-white {
  background: #fff;
  color: var(--cb-primary);
}
.btn-white:hover { background: var(--cb-bg); color: var(--cb-primary); }

.btn-huge {
  padding: 18px 40px;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
  min-height: 64px;
}

.btn-gold {
  background: var(--cb-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-gold:hover { background: var(--cb-accent-dark); color: #fff; }

.btn-accent { background: var(--cb-accent); color: #fff; }
.btn-accent:hover { background: var(--cb-accent-dark); color: #fff; }

.btn-large { padding: 16px 32px; font-size: var(--text-base); min-height: 56px; }

/* --------------------------------------------------------------------------
   5. Header — Sticky, modern, blanc
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cb-border);
  height: var(--header-height);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-lg);
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon { width: 40px; height: 40px; }
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--cb-primary);
  line-height: 1.1;
}
.logo-text strong { font-weight: 700; display: block; }

/* Nav principal desktop */
.main-nav {
  display: none;
  gap: var(--space-xs);
}
@media (min-width: 900px) {
  .main-nav { display: flex; }
}
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--cb-muted);
  font-weight: 500;
  font-size: var(--text-sm);
  position: relative;
  transition: var(--transition-fast);
}
.nav-link svg { width: 20px; height: 20px; }
.nav-link:hover { color: var(--cb-primary); background: rgba(14,77,100,0.04); }
.nav-link.active {
  color: var(--cb-primary); font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 16px; right: 16px;
  height: 3px;
  background: var(--cb-accent);
  border-radius: 3px;
}

/* Accions dreta */
.header-actions {
  display: flex; align-items: center; gap: var(--space-sm);
}
/* Selector idioma CA/ES */
.btn-lang {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: rgba(14,77,100,0.08);
  color: var(--cb-primary);
  font-weight: 700;
  font-size: var(--text-xs);
  text-decoration: none;
  transition: var(--transition-fast);
  letter-spacing: 0.03em;
}
.btn-lang:hover { background: var(--cb-primary); color: #fff; }

.btn-text-size {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--cb-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: var(--transition-fast);
}
.btn-text-size:hover { background: rgba(14,77,100,0.04); color: var(--cb-primary); }
.btn-text-size svg { width: 22px; height: 22px; }
.btn-text-size-label { display: none; }
@media (min-width: 900px) { .btn-text-size-label { display: inline; } }

.btn-enter {
  background: var(--cb-primary);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  min-height: auto;
  display: none;
}
@media (min-width: 900px) { .btn-enter { display: inline-flex; } }
.btn-enter:hover { background: var(--cb-primary-light); transform: translateY(-1px); }
.btn-enter svg { width: 20px; height: 20px; }

/* Hamburger */
.hamburger {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  color: var(--cb-text);
  transition: var(--transition-fast);
}
.hamburger:hover { background: rgba(14,77,100,0.06); }
.hamburger svg { width: 28px; height: 28px; }
@media (min-width: 900px) { .hamburger { display: none; } }

/* Menú mòbil desplegable */
.mobile-menu {
  position: fixed;
  top: var(--header-height); left: 0; right: 0; bottom: 0;
  background: rgba(26,35,50,0.4);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu nav {
  background: #fff;
  padding: var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-xs);
  box-shadow: var(--shadow-xl);
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}
.mobile-menu-link {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  color: var(--cb-text);
  font-weight: 500;
  font-size: var(--text-base);
  transition: var(--transition-fast);
}
.mobile-menu-link:hover { background: var(--cb-bg); color: var(--cb-primary); }
.mobile-menu-link--cta {
  background: var(--cb-primary);
  color: #fff !important;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  margin-top: var(--space-sm);
}
.mobile-menu-link--cta:hover { background: var(--cb-primary-light); }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 100px 0 80px;
  background: linear-gradient(170deg, var(--cb-bg) 0%, #fff 100%);
  overflow: hidden;
}
@media (min-width: 768px) { .hero { padding: 160px 0 120px; } }

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(244,163,64,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(14,77,100,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-title {
  font-size: var(--text-3xl);
  color: var(--cb-primary);
  margin-bottom: var(--space-lg);
  font-weight: 700;
}
@media (min-width: 768px) {
  .hero-title { font-size: var(--text-4xl); }
}
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--cb-muted);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-inline: auto;
}
.hero-cta {
  display: inline-flex;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* --------------------------------------------------------------------------
   7. Secció "Com funciona" — 3 passos
   -------------------------------------------------------------------------- */
.how-it-works { padding: var(--space-section) 0; }
.steps {
  display: grid;
  gap: var(--space-2xl);
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--cb-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cb-border);
  transition: var(--transition);
  position: relative;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.step-number {
  position: absolute;
  top: 16px; left: 20px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--cb-border);
  line-height: 1;
  opacity: 0.5;
}
.step-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 80px; height: 80px;
  border-radius: var(--radius-xl);
  background: rgba(244,163,64,0.1);
  margin-bottom: var(--space-lg);
}
.step-icon svg { width: 40px; height: 40px; stroke: var(--cb-accent); }
.step-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  color: var(--cb-primary);
}
.step-text { color: var(--cb-muted); }

/* --------------------------------------------------------------------------
   8. Card Grid
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* --------------------------------------------------------------------------
   9. Shop Card
   -------------------------------------------------------------------------- */
.shop-card {
  background: var(--cb-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cb-border);
  overflow: hidden;
  transition: var(--transition);
}
.shop-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.shop-card-cover {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14,77,100,0.08), rgba(244,163,64,0.08));
}
.shop-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.shop-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.shop-card-placeholder svg { stroke: var(--cb-primary); opacity: 0.3; }
.shop-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--cb-primary);
}
.shop-card-body {
  padding: var(--space-lg);
}
.shop-card-logo {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: var(--space-sm);
}
.shop-card-name {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
  color: var(--cb-primary);
  font-family: var(--font-display);
}
.shop-card-category {
  font-size: var(--text-sm);
  color: var(--cb-muted);
  margin-bottom: var(--space-lg);
}
.shop-card-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   10. Promo Card
   -------------------------------------------------------------------------- */
.promo-card {
  background: var(--cb-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cb-border);
  overflow: hidden;
  transition: var(--transition);
}
.promo-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.promo-card-visual {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244,163,64,0.1), rgba(199,62,62,0.05));
}
.promo-card-img { width: 100%; height: 100%; object-fit: cover; }
.promo-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.promo-card-placeholder svg { stroke: var(--cb-accent); opacity: 0.3; }
.promo-card-discount {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--cb-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-accent);
}
.promo-card-discount-value {
  display: block;
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.1;
}
.promo-card-discount-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.promo-card-body { padding: var(--space-lg); }
.promo-card-merchant {
  font-size: var(--text-xs);
  color: var(--cb-accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-xs);
}
.promo-card-title {
  font-size: var(--text-lg);
  color: var(--cb-primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
}
.promo-card-desc {
  color: var(--cb-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}
.promo-card-validity {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--text-xs);
  color: var(--cb-muted);
  margin-bottom: var(--space-lg);
}
.promo-card-validity svg { width: 16px; height: 16px; flex-shrink: 0; }
.promo-card-btn { width: 100%; justify-content: center; }

/* --------------------------------------------------------------------------
   11. Reward Card
   -------------------------------------------------------------------------- */
.reward-card {
  background: var(--cb-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cb-border);
  overflow: hidden;
  transition: var(--transition);
}
.reward-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.reward-card-visual {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244,163,64,0.1), rgba(14,77,100,0.05));
}
.reward-card-img { width: 100%; height: 100%; object-fit: cover; }
.reward-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.reward-card-placeholder svg { stroke: var(--cb-accent); opacity: 0.3; }
.reward-card-points {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--cb-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  text-align: center;
}
.reward-card-points-num {
  display: block;
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.1;
}
.reward-card-points-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.reward-card-body { padding: var(--space-lg); }
.reward-card-merchant {
  font-size: var(--text-xs);
  color: var(--cb-accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}
.reward-card-title {
  font-size: var(--text-lg);
  color: var(--cb-primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
}
.reward-card-desc {
  color: var(--cb-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
}
.reward-card-btn { width: 100%; justify-content: center; }

/* --------------------------------------------------------------------------
   12. Seccions de la Home
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-section) 0;
}
@media (min-width: 768px) {
  .section { padding: 120px 0; }
}

/* Botigues destacades / Promos */
.featured-shops, .daily-promos { background: var(--cb-bg); }
.section-more {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* Empty state */
.empty-warm {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--cb-muted);
}
.empty-warm svg { margin: 0 auto var(--space-lg); opacity: 0.3; }
.empty-warm p { font-size: var(--text-lg); }

/* Per què comprar — 4 raons */
.why-local { background: #fff; }
.reasons {
  display: grid;
  gap: var(--space-xl);
}
@media (min-width: 768px) { .reasons { grid-template-columns: repeat(2, 1fr); } }

.reason {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.reason-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 80px; height: 80px;
  border-radius: var(--radius-xl);
  background: rgba(244,163,64,0.1);
  margin-bottom: var(--space-lg);
}
.reason-icon svg { width: 40px; height: 40px; stroke: var(--cb-accent); }
.reason-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  color: var(--cb-primary);
}
.reason-text { color: var(--cb-muted); }

/* Sorteig actiu */
.lottery-section {
  background: var(--cb-primary);
  padding: var(--space-section) 0;
}
@media (min-width: 768px) { .lottery-section { padding: 100px 0; } }
.lottery-card {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.lottery-icon {
  display: inline-flex;
  margin-bottom: var(--space-lg);
}
.lottery-icon svg { stroke: var(--cb-accent); }
.lottery-title {
  font-size: var(--text-2xl);
  color: #fff;
  margin-bottom: var(--space-lg);
}
@media (min-width: 768px) { .lottery-title { font-size: var(--text-3xl); } }
.lottery-prize {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: var(--text-xl);
  color: var(--cb-accent-light);
  font-weight: 600;
  margin-bottom: var(--space-md);
}
.lottery-prize svg { stroke: var(--cb-accent-light); }
.lottery-date {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-md);
}
.lottery-date svg { stroke: rgba(255,255,255,0.6); }
.lottery-how {
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-2xl);
  font-size: var(--text-base);
}
.lottery-cta {
  background: var(--cb-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.lottery-cta:hover { background: var(--cb-accent-dark); color: #fff; }

/* CTA final */
.cta-final {
  background: var(--cb-bg);
  padding: var(--space-section) 0;
}
@media (min-width: 768px) { .cta-final { padding: 120px 0; } }
.cta-final-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.cta-final-icon { margin: 0 auto var(--space-lg); }
.cta-final-icon svg { stroke: var(--cb-accent); }
.cta-final-title {
  font-size: var(--text-2xl);
  color: var(--cb-primary);
  margin-bottom: var(--space-md);
}
@media (min-width: 768px) { .cta-final-title { font-size: var(--text-3xl); } }
.cta-final-subtitle {
  color: var(--cb-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2xl);
}
.cta-final-btn {
  background: var(--cb-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.cta-final-btn:hover { background: var(--cb-accent-dark); color: #fff; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--cb-primary-dark);
  color: rgba(255,255,255,0.85);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer-grid {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand { }
.footer-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}
.footer-logo svg { width: 36px; height: 36px; }
.footer-desc {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  max-width: 360px;
  line-height: 1.6;
}
.footer-heading {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
}
.footer-nav {
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.footer-nav a {
  color: rgba(255,255,255,0.65);
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}
.footer-nav a:hover { color: var(--cb-accent); }

.footer-contact { }
.footer-phone {
  display: flex; align-items: center; gap: 10px;
  color: #fff;
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  transition: var(--transition-fast);
}
.footer-phone:hover { color: var(--cb-accent); }
.footer-phone svg { width: 28px; height: 28px; flex-shrink: 0; }
.footer-whatsapp {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.65);
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}
.footer-whatsapp:hover { color: #25D366; }
.footer-whatsapp svg { width: 20px; height: 20px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
}
.footer-credit, .footer-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}
.footer-credit a { color: rgba(255,255,255,0.6); }
.footer-credit a:hover { color: var(--cb-accent); }

/* --------------------------------------------------------------------------
   14. Nav Mobile (barra inferior fixa)
   -------------------------------------------------------------------------- */
.nav-mobile {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: #fff;
  border-top: 1px solid var(--cb-border);
  z-index: 90;
  padding: 0 var(--space-sm);
}
@media (min-width: 900px) { .nav-mobile { display: none; } }

.nav-mobile-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1;
  gap: 3px;
  color: var(--cb-muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  padding: 8px 0;
}
.nav-mobile-item svg { width: 24px; height: 24px; }
.nav-mobile-item.active {
  color: var(--cb-primary);
}
.nav-mobile-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 3px;
  background: var(--cb-accent);
  border-radius: 0 0 3px 3px;
}

/* Espai pel nav-mobile al body */
body { padding-bottom: var(--bottom-nav-h); }
@media (min-width: 900px) { body { padding-bottom: 0; } }

/* --------------------------------------------------------------------------
   15. Botó flotant ajuda
   -------------------------------------------------------------------------- */
.help-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  right: 16px;
  width: 64px; height: 64px;
  border-radius: var(--radius-full);
  background: var(--cb-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-accent), var(--shadow-lg);
  z-index: 80;
  transition: var(--transition);
}
.help-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(244,163,64,0.45);
}
.help-fab svg { width: 28px; height: 28px; }
.help-fab-label { display: none; }
@media (min-width: 900px) {
  .help-fab { bottom: 24px; }
}

/* Help popup */
.help-popup {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.help-popup[hidden] { display: none; }
.help-popup-backdrop {
  position: absolute; inset: 0;
  background: rgba(26,35,50,0.4);
}
.help-popup-content {
  position: relative;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-2xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}
@media (min-width: 600px) {
  .help-popup-content {
    border-radius: var(--radius-xl);
    margin: var(--space-xl);
    margin-bottom: calc(var(--bottom-nav-h) + 80px);
  }
}
@media (min-width: 900px) {
  .help-popup-content { margin-bottom: 100px; }
}
.help-popup-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  color: var(--cb-muted);
  transition: var(--transition-fast);
}
.help-popup-close:hover { background: var(--cb-bg); color: var(--cb-text); }
.help-popup-body { text-align: center; }
.help-popup-body svg { margin: 0 auto var(--space-md); }
.help-popup-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-lg);
  color: var(--cb-primary);
}
.help-popup-phone {
  width: 100%;
  justify-content: center;
  margin-bottom: var(--space-md);
}
.help-popup-sub {
  font-size: var(--text-sm);
  color: var(--cb-muted);
}

/* --------------------------------------------------------------------------
   16. Back to top
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 16px;
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: var(--cb-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--cb-primary-light);
  transform: translateY(-2px);
}
.back-to-top svg { width: 24px; height: 24px; }
@media (min-width: 900px) {
  .back-to-top { bottom: 24px; }
}

/* --------------------------------------------------------------------------
   17. Pàgina de comerços
   -------------------------------------------------------------------------- */
.page-hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  background: linear-gradient(170deg, var(--cb-bg) 0%, #fff 100%);
}
.page-hero h1 { margin-bottom: var(--space-sm); }
.page-hero p { color: var(--cb-muted); font-size: var(--text-lg); }

.search-bar {
  max-width: 500px;
  margin: var(--space-xl) auto 0;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 2px solid var(--cb-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--cb-card);
  color: var(--cb-text);
  transition: var(--transition-fast);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--cb-primary);
  box-shadow: 0 0 0 3px rgba(14,77,100,0.1);
}
.search-bar input::placeholder { color: var(--cb-muted); }
.search-bar svg {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  stroke: var(--cb-muted);
  pointer-events: none;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-xl) 0;
}
.category-filter-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--cb-border);
  background: var(--cb-card);
  color: var(--cb-muted);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}
.category-filter-btn:hover {
  border-color: var(--cb-primary);
  color: var(--cb-primary);
}
.category-filter-btn.is-active,
.category-filter-btn.active {
  background: var(--cb-primary);
  border-color: var(--cb-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   18. Shop detail
   -------------------------------------------------------------------------- */
.shop-detail { }
.shop-detail-cover {
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14,77,100,0.1), rgba(244,163,64,0.05));
}
@media (min-width: 768px) { .shop-detail-cover { height: 360px; } }
.shop-detail-cover-img { width: 100%; height: 100%; object-fit: cover; }
.shop-detail-cover-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.shop-detail-cover-placeholder svg { stroke: #fff; opacity: 0.4; }

.shop-detail-header {
  text-align: center;
  padding: var(--space-2xl) 0;
  margin-top: -40px;
  position: relative;
}
.shop-detail-logo {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
  margin: 0 auto var(--space-md);
}
.shop-detail-name {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}
@media (min-width: 768px) { .shop-detail-name { font-size: var(--text-3xl); } }
.shop-detail-category {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(14,77,100,0.06);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--cb-primary);
  font-weight: 500;
}

.shop-detail-grid {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
@media (min-width: 768px) {
  .shop-detail-grid { grid-template-columns: 2fr 1fr; }
}
.shop-detail-main { }
.shop-detail-desc { margin-bottom: var(--space-2xl); }
.shop-detail-desc p { line-height: 1.8; color: var(--cb-text); }

.shop-detail-section {
  margin-bottom: var(--space-2xl);
}
.shop-detail-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-xl);
  margin-bottom: var(--space-lg);
  color: var(--cb-primary);
}
.shop-detail-section-title svg { width: 28px; height: 28px; stroke: var(--cb-accent); flex-shrink: 0; }

.hours-table { }
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--cb-border);
  font-size: var(--text-sm);
}
.hours-day { font-weight: 600; color: var(--cb-text); }
.hours-time { color: var(--cb-muted); }

.shop-detail-address {
  font-size: var(--text-base);
  color: var(--cb-text);
  margin-bottom: var(--space-md);
}
.shop-detail-map-btn { margin-top: var(--space-sm); }

.shop-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.shop-detail-call {
  background: var(--cb-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.shop-detail-call:hover { background: var(--cb-accent-dark); color: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-img {
  border-radius: var(--radius-md);
  width: 100%; height: 200px;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   19. Help / FAQ page
   -------------------------------------------------------------------------- */
.faq-section { padding: var(--space-section) 0; }
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--cb-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  background: var(--cb-card);
}
.faq-item summary,
.faq__question {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-lg);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--cb-primary);
  cursor: pointer;
  list-style: none;
  transition: var(--transition-fast);
}
.faq-item summary:hover,
.faq__question:hover { background: var(--cb-bg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-answer,
.faq__answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--cb-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   20. Points display & Level badge
   -------------------------------------------------------------------------- */
.points-display {
  text-align: center;
  padding: var(--space-2xl);
}
.points-icon { margin: 0 auto var(--space-md); }
.points-icon svg { stroke: var(--cb-accent); }
.points-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--cb-accent);
  line-height: 1;
}
.points-label {
  font-size: var(--text-lg);
  color: var(--cb-muted);
  margin-top: var(--space-xs);
}

.level-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
}
.level-badge--bronze { background: #F5E6D0; color: #8B6914; }
.level-badge--plata  { background: #E8ECF0; color: #5B6772; }
.level-badge--or     { background: #FFF0D0; color: #A67C00; }
.level-badge--diamant { background: #E0F0FF; color: #1A6B8A; }

/* --------------------------------------------------------------------------
   21. Panel layouts (user, merchant, board)
   -------------------------------------------------------------------------- */
.layout-panel {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}
.panel-sidebar {
  display: none;
  width: 260px;
  background: var(--cb-card);
  border-right: 1px solid var(--cb-border);
  padding: var(--space-lg) 0;
  flex-shrink: 0;
}
@media (min-width: 1024px) { .panel-sidebar { display: block; } }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--cb-muted);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}
.sidebar-link svg { width: 24px; height: 24px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--cb-bg); color: var(--cb-primary); }
.sidebar-link.active {
  background: rgba(14,77,100,0.06);
  color: var(--cb-primary);
  font-weight: 600;
}
.panel-content {
  flex: 1;
  padding: var(--space-2xl);
  min-width: 0;
}

/* --------------------------------------------------------------------------
   22. Forms
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--cb-text);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--cb-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--cb-text);
  background: var(--cb-card);
  transition: var(--transition-fast);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--cb-primary);
  box-shadow: 0 0 0 3px rgba(14,77,100,0.1);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* --------------------------------------------------------------------------
   23. Animations — scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   24. Focus & Accessibility
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--cb-accent);
  outline-offset: 2px;
}
::selection {
  background: rgba(244,163,64,0.2);
  color: var(--cb-text);
}

/* --------------------------------------------------------------------------
   25. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-mobile,
  .help-fab, .help-popup, .back-to-top { display: none !important; }
  body { padding-bottom: 0; background: #fff; }
  .hero { padding: 40px 0; }
}

/* --------------------------------------------------------------------------
   26. Error pages
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}
.error-page h1 {
  font-size: var(--text-3xl);
  color: var(--cb-primary);
  margin: var(--space-lg) 0;
}
.error-page p {
  font-size: var(--text-lg);
  color: var(--cb-muted);
  margin-bottom: var(--space-2xl);
  max-width: 500px;
}
