/* ═══════════════════════════════════════════════════════
   SALGADOS PREMIUM — CSS
   ═══════════════════════════════════════════════════════ */

:root {
  --c-bg:           #FDF6EE;
  --c-card:         #FFFFFF;
  --c-primary:      #B5341A;
  --c-primary-dark: #8B2614;
  --c-accent:       #E8941A;
  --c-accent-light: #F5B842;
  --c-text:         #1E0E06;
  --c-text2:        #6B4A36;
  --c-text3:        #9E7B65;
  --c-border:       #EDE0D4;
  --c-success:      #27AE60;
  --c-danger:       #C0392B;
  --c-shadow:       rgba(180,80,20,0.10);
  --radius:         18px;
  --radius-sm:      12px;
  --font-d:         'Playfair Display', serif;
  --font-b:         'Nunito', sans-serif;
  --safe-bottom:    env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-b);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── OVERLAYS ─────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.overlay-loading {
  composes: overlay;
  background: linear-gradient(160deg, #7A1E08 0%, #C04218 60%, #E07820 100%);
}

.overlay-expired,
.overlay-noaccess {
  background: rgba(30,14,6,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.loading-content {
  text-align: center; color: #fff;
}
.loading-logo {
  font-size: 64px;
  animation: pulse 1.4s ease-in-out infinite;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 16px auto 12px;
}
.loading-content p {
  font-size: 15px; opacity: 0.85; font-weight: 500;
}

/* Expired card */
.expired-card,
.noaccess-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 28px;
  max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}

.expired-icon, .noaccess-icon {
  font-size: 52px;
  margin-bottom: 16px;
  display: block;
}

.expired-card h2, .noaccess-card h2 {
  font-family: var(--font-d);
  font-size: 22px;
  color: var(--c-text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.expired-card p, .noaccess-card p {
  font-size: 14px;
  color: var(--c-text2);
  line-height: 1.6;
  margin-bottom: 24px;
}

.unlock-form {
  display: flex; flex-direction: column; gap: 10px;
}

.unlock-form input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-b);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
  color: var(--c-text);
  background: #FAFAF8;
}
.unlock-form input:focus {
  border-color: var(--c-accent);
}

.btn-unlock {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-b);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-unlock:active { transform: scale(0.98); opacity: 0.9; }

.btn-whatsapp {
  width: 100%;
  padding: 13px;
  background: #25D366;
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-b);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.2s;
}
.btn-whatsapp:active { opacity: 0.85; }

.unlock-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--c-text3); font-size: 12px; font-weight: 600;
}
.unlock-divider::before,
.unlock-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.unlock-msg {
  font-size: 13px; font-weight: 600;
  min-height: 18px; text-align: center;
}
.unlock-msg.ok  { color: var(--c-success); }
.unlock-msg.err { color: var(--c-danger);  }

.expired-footer small {
  font-size: 12px; color: var(--c-text3);
}

/* ── HEADER ────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,246,238,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  max-width: 600px; margin: 0 auto;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-brand {
  display: flex; align-items: center; gap: 10px;
}
.brand-icon { font-size: 28px; }
.brand-text h1 {
  font-family: var(--font-d);
  font-size: 17px; font-weight: 700;
  color: var(--c-text);
  line-height: 1.1;
}
.brand-text span {
  font-size: 11px; color: var(--c-text3); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.header-right {
  display: flex; align-items: center; gap: 10px;
}
.user-greeting {
  font-size: 13px; color: var(--c-text2); font-weight: 600;
  max-width: 120px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.timer-badge {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.timer-badge.warning {
  background: linear-gradient(135deg, #C0392B, #E74C3C);
  animation: timerPulse 1s ease-in-out infinite;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(155deg, #7A1E08 0%, #C04218 55%, #E07820 100%);
  position: relative; overflow: hidden;
  padding: 40px 20px 60px;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 70%);
}
.hero::after {
  content: '🥐🥟🫓🥙🥐🥟';
  position: absolute; bottom: -10px; right: -10px;
  font-size: 80px; opacity: 0.08; line-height: 1;
  pointer-events: none;
}
.hero-content {
  position: relative; max-width: 600px; margin: 0 auto;
}
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-d);
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 12px;
}
.hero-title em {
  font-style: italic;
  color: var(--c-accent-light);
}
.hero-sub {
  font-size: 15px; opacity: 0.88; line-height: 1.6;
  max-width: 320px;
  margin-bottom: 24px;
}
.hero-stats {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.hero-stat {
  text-align: center;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-d);
  font-size: 26px; font-weight: 700;
  color: var(--c-accent-light);
  line-height: 1;
}
.hero-stat span {
  font-size: 11px; opacity: 0.8;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.hero-btn {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  padding: 13px 28px;
  border-radius: 30px;
  font-family: var(--font-b);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.hero-btn:active { transform: scale(0.97); }
.hero-btn:hover { background: rgba(255,255,255,0.26); }

/* ── PROFIT BANNER ──────────────────────────────────────── */
.profit-banner {
  background: linear-gradient(135deg, #1A3A1E, #27AE60);
  padding: 20px;
  color: #fff;
  text-align: center;
}
.profit-banner strong {
  display: block;
  font-family: var(--font-d);
  font-size: 20px; font-weight: 700;
  margin-bottom: 4px;
}
.profit-banner p {
  font-size: 13px; opacity: 0.9; line-height: 1.4;
}
.profit-amount {
  font-size: 28px; font-weight: 800;
  color: #7DFFA8;
  font-family: var(--font-d);
}

/* ── BOTTOM NAV ─────────────────────────────────────────── */
.bottom-nav {
  position: sticky; top: 64px; z-index: 90;
  background: var(--c-card);
  border-bottom: 2px solid var(--c-border);
  display: flex;
}
.nav-tab {
  flex: 1;
  padding: 14px 8px;
  border: none; background: none;
  font-family: var(--font-b);
  font-size: 14px; font-weight: 700;
  color: var(--c-text3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  margin-bottom: -2px;
}
.nav-tab.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
.nav-tab .tab-lock {
  font-size: 12px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
}

/* ── SEARCH ─────────────────────────────────────────────── */
.search-section {
  padding: 16px 16px 8px;
  max-width: 600px; margin: 0 auto;
}
.search-wrapper {
  display: flex; align-items: center;
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: 30px;
  padding: 10px 16px; gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrapper:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(232,148,26,0.12);
}
.search-icon { font-size: 16px; }
.search-wrapper input {
  flex: 1; border: none; outline: none;
  font-family: var(--font-b);
  font-size: 15px; background: transparent;
  color: var(--c-text);
}
.search-wrapper input::placeholder { color: var(--c-text3); }
.search-clear {
  background: none; border: none;
  color: var(--c-text3); cursor: pointer;
  font-size: 16px; padding: 0;
}

/* ── CATEGORY TABS ──────────────────────────────────────── */
.categories-section {
  max-width: 600px; margin: 0 auto;
  padding: 8px 0 0;
}
.section-header {
  padding: 0 16px 8px;
}
.section-header h3 {
  font-family: var(--font-d);
  font-size: 18px; font-weight: 700;
  color: var(--c-text);
}
.categories-tabs {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 0 16px 12px;
  scrollbar-width: none;
}
.categories-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--c-border);
  background: var(--c-card);
  font-family: var(--font-b);
  font-size: 13px; font-weight: 700;
  color: var(--c-text2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

/* ── RECIPE GRID ────────────────────────────────────────── */
.recipes-section {
  max-width: 600px; margin: 0 auto;
  padding: 0 16px 120px;
}
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 500px) {
  .recipes-grid { grid-template-columns: repeat(3, 1fr); }
}

.recipe-card {
  background: var(--c-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--c-shadow);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.recipe-card:active { transform: scale(0.96); box-shadow: 0 1px 6px var(--c-shadow); }

.recipe-card-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.recipe-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.recipe-card-img.no-img {
  background: linear-gradient(135deg, #F5EBE0, #EDD5C0);
}

.recipe-card-body {
  padding: 10px 12px 12px;
}
.recipe-card-cat {
  font-size: 10px; font-weight: 700;
  color: var(--c-accent);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.recipe-card-title {
  font-family: var(--font-d);
  font-size: 14px; font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { color: var(--c-text3); font-size: 15px; font-weight: 500; }

/* ── RECIPE MODAL ───────────────────────────────────────── */
.recipe-modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(30,14,6,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 16px;
  display: flex; align-items: flex-start; justify-content: center;
}
.recipe-modal-inner {
  background: var(--c-card);
  border-radius: var(--radius);
  max-width: 520px; width: 100%;
  overflow: hidden;
  margin-top: 20px;
  animation: slideUp 0.28s ease-out;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,0.4);
  border: none; color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.recipe-modal-img-wrap {
  position: relative;
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #F5EBE0, #EDD5C0);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.recipe-modal-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.modal-category-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--c-primary);
  color: #fff; padding: 4px 12px;
  border-radius: 20px; font-size: 11px; font-weight: 700;
  text-transform: uppercase;
}
.recipe-modal-body { padding: 20px; }
.recipe-modal-body h2 {
  font-family: var(--font-d);
  font-size: 22px; font-weight: 700;
  color: var(--c-text); line-height: 1.3;
  margin-bottom: 10px;
}
.modal-meta { margin-bottom: 20px; }
.meta-item {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--c-bg);
  border-radius: 20px; padding: 4px 12px;
  font-size: 13px; font-weight: 600; color: var(--c-text2);
}
.modal-section { margin-bottom: 20px; }
.modal-section h3 {
  font-family: var(--font-d);
  font-size: 16px; font-weight: 600;
  color: var(--c-text);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--c-border);
}
.modal-section ul {
  list-style: none; display: flex; flex-direction: column; gap: 6px;
}
.modal-section ul li {
  padding: 8px 12px;
  background: var(--c-bg);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--c-text2);
  display: flex; align-items: flex-start; gap: 8px;
}
.modal-section ul li::before { content: '•'; color: var(--c-accent); font-weight: 900; }
.instructions-text {
  font-size: 14px; line-height: 1.75;
  color: var(--c-text2); white-space: pre-wrap;
}

/* ── VIDEOS PAGE ────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

.videos-section {
  max-width: 600px; margin: 0 auto;
  padding: 16px 16px 120px;
}

.video-lock {
  text-align: center;
  padding: 40px 20px;
}
.video-lock-icon { font-size: 56px; margin-bottom: 16px; }
.video-lock h3 {
  font-family: var(--font-d);
  font-size: 22px; font-weight: 700;
  color: var(--c-text); margin-bottom: 10px;
  line-height: 1.3;
}
.video-lock p {
  font-size: 14px; color: var(--c-text2);
  line-height: 1.7; margin-bottom: 28px; max-width: 320px; margin-left: auto; margin-right: auto;
}
.video-lock-perks {
  text-align: left;
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px var(--c-shadow);
}
.video-lock-perks li {
  list-style: none;
  padding: 7px 0;
  font-size: 14px; color: var(--c-text2);
  display: flex; gap: 10px; align-items: flex-start;
  border-bottom: 1px solid var(--c-border);
}
.video-lock-perks li:last-child { border: none; }
.video-lock-perks li span { color: var(--c-success); font-size: 16px; }
.btn-unlock-videos {
  display: block; width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: 16px; font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn-unlock-videos:active { transform: scale(0.98); }

.videos-grid {
  display: flex; flex-direction: column; gap: 14px;
}
.video-card {
  background: var(--c-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--c-shadow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.video-card-thumb {
  position: relative;
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden;
}
.video-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35);
  transition: background 0.2s;
}
.video-play-btn::after {
  content: '▶';
  font-size: 40px; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.video-card:active .video-play-btn { background: rgba(0,0,0,0.5); }
.video-card-body { padding: 12px 14px 14px; }
.video-card-title {
  font-family: var(--font-d);
  font-size: 16px; font-weight: 600;
  color: var(--c-text); margin-bottom: 5px; line-height: 1.3;
}
.video-card-desc {
  font-size: 13px; color: var(--c-text2);
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Video modal */
.video-modal {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.video-modal-inner {
  max-width: 600px; width: 100%;
  animation: slideUp 0.25s ease-out;
}
.video-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  border: none; color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.video-iframe-wrap {
  position: relative; padding-bottom: 56.25%;
  border-radius: var(--radius); overflow: hidden;
}
.video-iframe-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.video-modal-title {
  margin-top: 12px;
  font-family: var(--font-d);
  font-size: 16px; font-weight: 600;
  color: #fff;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease-out; }
