/* ============================================
   DESSERT MAISON — Estilos principales
   ============================================ */

:root {
  --cream: #FDF5EF;
  --rose: #C45C70;
  --rosedark: #7A2535;
  --caramel: #A0622A;
  --caramellight: #FFF0E4;
  --mint: #3D8C72;
  --mintlight: #E6F4EF;
  --text: #1A0A06;
  --textmuted: #6B4035;
  --label: #5A2020;
  --shadow: rgba(122,37,53,0.10);
  --card-radius: 18px;
  --btn-radius: 50px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── FONDO DECORATIVO ── */
.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.deco-icon {
  position: absolute;
  user-select: none;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-10px) rotate(4deg); }
}

/* ── HEADER ── */
.app-header {
  background: linear-gradient(135deg, #E8B4B8 0%, #F5DFC0 55%, #C8DFD4 100%);
  padding: 18px 20px 0;
  text-align: center;
  border-bottom: 2px solid #C9848C;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(122,37,53,0.12);
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--rosedark);
  letter-spacing: 1px;
}
.logo-sub {
  font-size: 10px;
  color: #5A2020;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 600;
}

/* ── TABS ── */
.nav-tabs {
  display: flex;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
  padding: 0 4px;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: none;
  padding: 9px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #4A1A22;
  background: rgba(90,32,32,0.14);
  border: 1.5px solid rgba(122,37,53,0.25);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tab-btn.active  { background: var(--rosedark); color: #FFE8EB; border-color: var(--rosedark); }
.tab-btn:hover:not(.active) { background: rgba(90,32,32,0.24); color: var(--rosedark); }

/* ── COTIZACIONES ── */
.currency-banner {
  background: linear-gradient(90deg, #3D0F1A, #7A2535);
  color: white;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 9;
  flex-wrap: wrap;
  gap: 6px;
}
.currency-rates { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.rate-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4AE89A;
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.rate-val  { color: #FFD4A8; }
.rate-time { opacity: 0.55; font-size: 10px; }

/* ── BODY ── */
.app-body {
  padding: 18px 16px;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}
.section { display: none; }
.section.active { display: block; }

/* ── CARDS ── */
.card {
  background: rgba(255,255,255,0.96);
  border-radius: var(--card-radius);
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 3px 18px var(--shadow);
  border: 1px solid rgba(196,92,112,0.18);
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--rosedark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #F0D0D4;
  padding-bottom: 10px;
}

/* ── CARD OSCURA ── */
.card-dark {
  background: linear-gradient(135deg, #5A1A28, #3D0F1A);
  border-radius: var(--card-radius);
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 3px 20px rgba(61,15,26,0.38);
}
.card-dark .card-title { color: #FFD4D8; border-bottom-color: rgba(255,200,200,0.2); }
.card-dark .fg label   { color: #FFB8C0; font-weight: 700; }
.card-dark .fg input,
.card-dark .fg select  { background: #2A0A12; border-color: #8B4A5A; color: #FFE8EC; font-weight: 600; }
.card-dark .fg input::placeholder { color: #8B5A62; }
.card-dark .fg input:focus,
.card-dark .fg select:focus { border-color: #E8849A; box-shadow: 0 0 0 3px rgba(232,132,154,0.2); }
.card-dark .fg select option { background: #2A0A12; color: #FFE8EC; }

/* ── FORM ── */
.form-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-end; flex-wrap: wrap; }
.fg { flex: 1; min-width: 80px; }
.fg label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--label);
  margin-bottom: 5px;
}
.fg input, .fg select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #C9908A;
  border-radius: 11px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  background: #fff;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.fg input::placeholder { color: #B08888; font-weight: 400; }
.fg input:focus, .fg select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(196,92,112,0.12);
}
.moneda-hint { font-size: 11px; color: var(--mint); font-weight: 700; margin-top: 4px; min-height: 15px; }

/* ── INGREDIENTES ── */
.ing-form-box {
  background: #FFF6F2;
  border: 1.5px dashed #D99AA0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.ingredient-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #FFF5EC, #FFF0F2);
  border-radius: 12px;
  margin-bottom: 6px;
  border: 1px solid #F0D0C0;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateY(-6px);} to{opacity:1;transform:translateY(0);} }
.ing-info { flex: 1; }
.ing-name   { font-size: 13px; font-weight: 700; color: var(--text); }
.ing-detail { font-size: 11px; color: var(--textmuted); font-weight: 500; }
.ing-price  { font-size: 14px; font-weight: 700; color: var(--caramel); white-space: nowrap; }
.btn-rm {
  background: #FFE8EA; border: none; cursor: pointer;
  color: var(--rose); font-size: 13px; padding: 4px 7px;
  border-radius: 8px; margin-left: 4px;
}
.ing-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; background: var(--rosedark); border-radius: 10px; margin-top: 4px;
}
.ing-total-lbl { font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 600; }
.ing-total-val { font-size: 15px; font-weight: 700; color: white; }

/* ── BOTONES ── */
.btn-calcular {
  width: 100%; padding: 14px 22px;
  background: linear-gradient(135deg, #C45C70, #7A2535);
  color: #FFF; border: none; border-radius: var(--btn-radius);
  font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; box-shadow: 0 4px 18px rgba(122,37,53,0.38);
}
.btn-calcular:hover  { opacity: 0.88; }
.btn-calcular:active { transform: scale(0.97); }
.btn-add {
  background: #FFF0E4; color: var(--caramel);
  border: 1.5px solid #E8C09A; border-radius: var(--btn-radius);
  padding: 10px 18px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-add:hover { background: #FFE4CA; }
.btn-secondary {
  background: var(--caramellight); color: var(--caramel);
  border: 1.5px solid #E8C09A; border-radius: var(--btn-radius);
  padding: 10px 20px; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ── RESULTADO ── */
.result-box {
  background: linear-gradient(135deg, #7A2535, #3D0F1A);
  border-radius: 16px; padding: 20px; color: white; margin-top: 14px;
}
.result-row {
  display: flex; justify-content: space-between;
  padding: 7px 0; font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.result-lbl { opacity: 0.78; }
.result-val { font-weight: 700; }
.result-total {
  display: flex; justify-content: space-between;
  padding-top: 12px; margin-top: 6px;
  font-size: 19px; font-weight: 700;
  font-family: 'Playfair Display', serif;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.porcion-badge { text-align: center; margin-top: 12px; padding: 12px; background: rgba(255,255,255,0.11); border-radius: 10px; }
.porcion-price { font-size: 28px; font-weight: 700; font-family: 'Playfair Display', serif; }
.porcion-lbl   { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.conv-box      { margin-top: 12px; background: rgba(0,0,0,0.18); border-radius: 10px; padding: 12px; }
.conv-title    { font-size: 10px; opacity: 0.65; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 700; }
.conv-grid     { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.conv-row      { display: flex; justify-content: space-between; font-size: 12px; padding: 2px 0; }
.conv-lbl      { opacity: 0.72; }
.conv-val      { font-weight: 700; color: #FFD4A8; }
.result-btns   { display: flex; gap: 10px; margin-top: 14px; }

/* ── RECETARIOS ── */
.recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.recipe-card {
  background: white; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid rgba(196,92,112,0.18); position: relative;
}
.recipe-thumb { height: 88px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.recipe-info  { padding: 10px; }
.recipe-name  { font-family: 'Playfair Display', serif; font-size: 13px; color: var(--rosedark); font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.recipe-price { font-size: 12px; font-weight: 700; color: var(--caramel); }
.recipe-free-c { color: var(--mint); }
.lock-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(26,10,6,0.72); color: white;
  border-radius: 20px; padding: 3px 8px; font-size: 11px;
  display: flex; align-items: center; gap: 3px; font-weight: 600;
}
.btn-download {
  width: 100%; margin-top: 6px; padding: 8px; border-radius: 10px;
  font-size: 12px; font-weight: 700; cursor: pointer; border: none;
  font-family: 'DM Sans', sans-serif; transition: all 0.2s;
}
.btn-download.free { background: var(--mintlight); color: var(--mint); border: 1px solid #A8D8C8; }
.btn-download.paid { background: #FFF0E4; color: var(--caramel); border: 1px solid #E8C09A; }

/* ── PANEL SEPARADO ── */
.admin-notice {
  background: linear-gradient(135deg, #3D0F1A, #7A2535);
  border-radius: var(--card-radius); padding: 28px 22px;
  text-align: center; color: white;
}
.admin-notice-icon  { font-size: 52px; margin-bottom: 12px; }
.admin-notice-title { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 8px; }
.admin-notice-text  { font-size: 13px; opacity: 0.8; line-height: 1.6; margin-bottom: 20px; }
.admin-url-box {
  background: rgba(255,255,255,0.1); border-radius: 12px;
  padding: 12px 16px; font-size: 13px; font-weight: 700;
  color: #FFD4A8; letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.2); margin-bottom: 16px;
}
.admin-features      { text-align: left; background: rgba(0,0,0,0.2); border-radius: 12px; padding: 14px 16px; }
.admin-feature-item  {
  font-size: 13px; padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 8px;
}
.admin-feature-item:last-child { border: none; }

/* ── MODAL ── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(26,10,6,0.6); z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-bg.open { display: flex; }
.modal {
  background: white; border-radius: 22px; padding: 26px 22px;
  width: 100%; max-width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 19px; color: var(--rosedark); margin-bottom: 5px; }
.modal-sub   { font-size: 13px; color: var(--textmuted); margin-bottom: 18px; font-weight: 500; }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.payment-btn {
  padding: 10px 8px; border-radius: 12px;
  border: 1.5px solid #E0B0B8; background: var(--cream);
  cursor: pointer; font-size: 12px; font-family: 'DM Sans', sans-serif;
  font-weight: 700; color: var(--textmuted); text-align: center;
  transition: all 0.2s; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.payment-btn span { font-size: 20px; }
.payment-btn.selected,
.payment-btn:hover { border-color: var(--rose); color: var(--rosedark); background: #FFF0F2; }
.modal-close { color: var(--textmuted); font-size: 13px; text-align: center; margin-top: 12px; cursor: pointer; font-weight: 600; }
.modal-close:hover { color: var(--rose); }

/* ── TAGS ── */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.tag-rose { background: #FFE8EB; color: var(--rosedark); border: 1px solid #F0B0BA; }
.tag-mint { background: var(--mintlight); color: var(--mint); border: 1px solid #A8D8C8; }

/* ── PDF (para cuando se imprima) ── */
@media print {
  .app-header, .currency-banner, .nav-tabs, .bg-deco,
  .card-dark .btn-calcular, .result-btns { display: none !important; }
  .result-box { color: black !important; background: white !important; border: 1px solid #ccc !important; }
}
