/* =====================================================================
   Carta tipo libro — Premium · Piel y oro
   ===================================================================== */

/* --- Escenario --- */
.carta-stage{padding:calc(var(--header-h) + 1.5rem) 0 3rem;min-height:100svh;
  display:flex;flex-direction:column;align-items:center;
  background:
    radial-gradient(ellipse at 50% 30%,rgba(201,160,58,.06),transparent 60%),
    radial-gradient(ellipse at 80% 70%,rgba(212,132,58,.04),transparent 50%),
    var(--bg)}
.carta-toolbar{width:min(1000px,92%);display:flex;justify-content:space-between;align-items:center;
  gap:1rem;margin-bottom:1.2rem;flex-wrap:wrap}
.carta-hint{color:var(--text-soft);font-size:.88rem;display:flex;align-items:center;gap:.5rem;
  font-style:italic;letter-spacing:.3px}
.carta-hint i{color:var(--c-gold);animation:pulseHint 1.8s ease-in-out infinite}
@keyframes pulseHint{0%,100%{transform:translateX(0)}50%{transform:translateX(-6px)}}
.btn-sm{padding:.55rem 1.1rem;font-size:.85rem}

/* --- Marco del libro con sombra dorada --- */
.book-viewport{width:min(1000px,94vw);display:flex;justify-content:center;perspective:2200px;
  filter:drop-shadow(0 20px 50px rgba(0,0,0,.35))}
.book{width:100%;max-width:960px}

/* --- Papel interior: tono marfil cálido con textura sutil --- */
.page{background:
  linear-gradient(135deg,#faf3e6 0%,#f5ecda 30%,#faf5e8 70%,#f3e8d2 100%);
  color:#2c2014;overflow:hidden;
  box-shadow:inset 0 0 60px rgba(140,100,40,.08)}
.page-content{height:100%;padding:clamp(1.4rem,3vw,2.6rem);display:flex;flex-direction:column;
  background-image:
    repeating-linear-gradient(0deg,transparent,transparent 31px,rgba(160,120,60,.035) 32px),
    linear-gradient(90deg,rgba(140,100,40,.05),transparent 6%),
    linear-gradient(-90deg,rgba(140,100,40,.05),transparent 6%)}

/* =====================
   PORTADA · Piel negra + oro
   ===================== */
.page-cover{background:
  linear-gradient(160deg,#0d0a06 0%,#1a1108 25%,#23180d 50%,#1a1108 75%,#0a0704 100%);
  color:#f5edd8;
  border:1.5px solid rgba(180,130,50,.35);
  /* Textura de piel */
  background-size:100% 100%, 4px 4px;
  background-image:
    linear-gradient(160deg,#0d0a06 0%,#1a1108 25%,#23180d 50%,#1a1108 75%,#0a0704 100%),
    repeating-linear-gradient(45deg,transparent,transparent 2px,rgba(255,255,255,.008) 3px,rgba(255,255,255,.008) 4px)}
.page-cover-bottom{background:
  linear-gradient(200deg,#0a0704 0%,#1a1108 30%,#23180d 55%,#1a1108 80%,#0d0a06 100%);
  color:#f5edd8;
  border:1.5px solid rgba(180,130,50,.35)}

/* Marco interior dorado grabado */
.cover-inner{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;gap:1rem;padding:2.4rem;margin:.9rem;
  border:2.5px solid rgba(200,155,60,.5);
  outline:1px solid rgba(200,155,60,.2);outline-offset:4px;
  border-radius:4px;
  position:relative}
/* Esquinas doradas */
.cover-inner::before,.cover-inner::after{content:'';position:absolute;
  width:36px;height:36px;border-color:rgba(200,155,60,.55);border-style:solid;pointer-events:none}
.cover-inner::before{top:-2px;left:-2px;border-width:3px 0 0 3px;border-radius:3px 0 0 0}
.cover-inner::after{bottom:-2px;right:-2px;border-width:0 3px 3px 0;border-radius:0 0 3px 0}

.cover-logo{max-width:42%;max-height:30%;object-fit:contain;
  filter:drop-shadow(0 4px 16px rgba(0,0,0,.5)) brightness(1.1)}
.cover-title{font-family:var(--font-display);font-size:clamp(2.2rem,6vw,3.6rem);font-weight:700;
  letter-spacing:1px;
  background:linear-gradient(180deg,#f7d98c 20%,#c8943e 50%,#a67824 80%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  text-shadow:none;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.4))}
.cover-sub{font-family:var(--font-display);font-style:italic;font-size:1.15rem;font-weight:400;
  color:#d4c5a0;letter-spacing:.8px;max-width:80%}
.cover-flourish{font-size:2.6rem;color:rgba(200,155,60,.7);opacity:.9;line-height:1}
.cover-cta{letter-spacing:.6em;text-transform:uppercase;font-size:.78rem;
  color:rgba(200,155,60,.8);margin-top:.4rem;font-weight:500}
.cover-contact{color:#d4c5a0;font-size:.95rem;display:flex;align-items:center;gap:.5rem}
.cover-contact i{color:rgba(200,155,60,.8)}
.cover-contact a{color:rgba(200,155,60,.9)}
.cover-contact a:hover{color:#f7d98c}

/* =====================
   INTERIOR · Páginas de la carta
   ===================== */

/* Encabezado de categoría */
.page-cat-head{display:flex;align-items:center;gap:.8rem;
  border-bottom:2px solid rgba(160,110,35,.35);
  padding-bottom:.8rem;margin-bottom:.2rem}
.page-cat-head::after{content:'❧';font-size:1.2rem;color:rgba(176,122,40,.5);margin-left:auto;
  font-family:serif}
.page-cat-head i{color:#b07a28;font-size:1.35rem;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.08))}
.page-cat-title{font-family:var(--font-display);font-size:clamp(1.5rem,3.5vw,2.1rem);
  color:#3a2210;letter-spacing:.3px;font-weight:700}
.page-cat-title small{font-size:.55em;color:#b07a28;font-style:italic;font-weight:400}

/* Línea ornamental tras cabecera de categoría */
.menu-items::before{content:'';display:block;height:1px;
  background:linear-gradient(90deg,transparent,rgba(176,122,40,.3) 20%,rgba(176,122,40,.3) 80%,transparent);
  margin-bottom:.3rem}

/* Índice */
.indice{display:flex;flex-direction:column;gap:.85rem;margin-top:1.4rem}
.indice li{display:flex;align-items:center;gap:.9rem;font-family:var(--font-display);
  font-size:1.3rem;padding-bottom:.6rem;
  border-bottom:1px solid rgba(160,110,35,.15)}
.indice li:last-child{border-bottom:1px solid rgba(160,110,35,.3)}
.indice i{color:#b07a28;width:28px;text-align:center;font-size:1rem}
.indice span{letter-spacing:.3px}

/* --- Lista de platos premium --- */
.menu-items{display:flex;flex-direction:column;gap:0;flex:1;overflow:hidden}
.menu-item{display:flex;gap:.85rem;align-items:flex-start;padding:1rem 0;
  border-bottom:1px solid rgba(160,120,60,.12)}
.menu-item:last-child{border-bottom:none}
.mi-thumb{width:58px;height:58px;border-radius:6px;overflow:hidden;flex-shrink:0;
  box-shadow:0 3px 10px rgba(80,50,20,.22);border:2px solid rgba(255,248,240,.6);
  transition:transform .3s var(--ease)}
.mi-thumb:hover{transform:scale(1.08)}
.mi-thumb img{width:100%;height:100%;object-fit:cover}
.mi-body{flex:1;min-width:0}
.mi-top{display:flex;align-items:baseline;gap:.5rem}
.mi-name{font-family:var(--font-display);font-size:1.22rem;font-weight:600;
  color:#2c2014;line-height:1.1;letter-spacing:.2px}
.mi-name:hover{color:#9a5c10}
.mi-dots{flex:1;border-bottom:2px dotted rgba(160,110,35,.35);min-width:14px;transform:translateY(-4px)}
.mi-price{font-family:var(--font-display);font-weight:700;font-size:1.12rem;
  color:#8b2c0c;white-space:nowrap;letter-spacing:.3px}
.mi-desc{font-size:.85rem;color:#6b5230;margin-top:.2rem;line-height:1.4;font-style:italic;
  letter-spacing:.2px}
.mi-alerg{margin-top:.35rem}
.mi-alerg .alergeno-badge{width:24px;height:24px;background:rgba(176,122,40,.1);
  border-color:rgba(176,122,40,.25);color:#b07a28;border-radius:6px}
.mi-alerg .alergeno-badge svg{width:14px;height:14px}

/* --- Número de página --- */
.page-number{margin-top:auto;text-align:center;font-size:.8rem;color:#b07a28;
  font-style:italic;padding-top:.9rem;letter-spacing:.5px;
  border-top:1px solid rgba(160,110,35,.2);
  position:relative}
.page-number::before{content:'· · ·';position:absolute;top:-8px;left:50%;
  transform:translateX(-50%);font-size:.6rem;letter-spacing:3px;color:rgba(176,122,40,.35);
  background:linear-gradient(135deg,#faf3e6 0%,#f5ecda 50%,#faf5e8 100%);padding:0 .6rem}

/* =====================
   CONTROLES
   ===================== */
.book-controls{display:flex;align-items:center;gap:1.4rem;margin-top:1.8rem}
.book-btn{width:50px;height:50px;border-radius:50%;
  background:var(--grad-gold);color:#0d0b06;

/* ─── Print / PDF export ─── */
@media print {
  .site-header,.carta-toolbar,.book-controls,.back-to-top,.site-footer,.scroll-hint{display:none!important}
  .carta-stage{background:#fff!important;padding:0!important}
  .page{background:#fff!important;box-shadow:none!important;page-break-after:always}
  .page-content{color:#000!important}
  .book-viewport{filter:none!important}
  body{background:#fff}
  @page{margin:1cm;size:A4}
}
  display:grid;place-items:center;font-size:1rem;transition:.3s var(--ease);
  box-shadow:0 8px 24px rgba(247,183,51,.3)}
.book-btn:hover{transform:scale(1.12);box-shadow:0 12px 32px rgba(247,183,51,.45)}
.book-page-indicator{font-family:var(--font-display);font-size:1.15rem;
  color:var(--text-soft);min-width:70px;text-align:center;letter-spacing:.5px}

/* --- Fallback sin librería --- */
.book-fallback{display:flex;flex-direction:column;gap:1rem}
.book-fallback .page{border-radius:var(--radius);min-height:auto}
.book-fallback .page-content{min-height:340px}

/* --- Ajustes por tema --- */
html[data-tema="oscuro"] .carta-stage{background:
  radial-gradient(ellipse at 50% 30%,rgba(247,183,51,.08),transparent 60%),
  radial-gradient(ellipse at 80% 70%,rgba(252,74,26,.05),transparent 50%),
  #0a0a0f}

/* --- Responsive --- */
@media(max-width:820px){
  .carta-stage{padding-top:calc(var(--header-h) + 1rem)}
  .book-viewport{width:96vw}
  .menu-item{gap:.6rem}
  .mi-thumb{width:48px;height:48px}
  .cover-inner{padding:1.8rem;margin:.5rem}
  .cover-inner::before,.cover-inner::after{width:28px;height:28px}
}
