/* (igual que la versión anterior con badge) */
:root{ --fy-accent:#ff5722; --fy-muted:#6b7280; --fy-bg:#ffffff; --fy-border:#e9e9e9; --fy-soft:#f7f7f8; --fy-radius:14px; }
*{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden;background:#fff}
.foodya{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#111;}
.fy-container{max-width:1100px;margin:0 auto;padding:8px 12px;}
.fy-cats{display:flex;gap:10px;overflow:auto;padding:4px 0 10px;-webkit-overflow-scrolling:touch}
.fy-cat{border:1px solid var(--fy-border);border-radius:999px;padding:8px 14px;white-space:nowrap;cursor:pointer;background:#fff;font-weight:600}
.fy-cat.active{background:var(--fy-accent);color:#fff;border-color:var(--fy-accent)}
.fy-subcats{display:none;overflow-x:auto;white-space:nowrap;padding:6px 0 12px;margin-top:6px;background:transparent;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}
.fy-subcat{display:inline-flex;align-items:center;border:1px solid var(--fy-border);border-radius:999px;padding:8px 14px;margin-right:10px;background:#fff;font-weight:600;cursor:pointer;white-space:nowrap}
.fy-subcat:last-child{margin-right:0}
.fy-subcat.active{background:var(--fy-accent);color:#fff;border-color:var(--fy-accent)}
.fy-list{display:flex;flex-direction:column;gap:12px;padding:2px 0 86px}
.fy-card{display:grid;grid-template-columns:90px 1fr;gap:12px;align-items:center;background:#fff;border:1px solid var(--fy-border);border-radius:var(--fy-radius);padding:12px}
.fy-card img{width:90px;height:90px;object-fit:cover;border-radius:10px;background:#ddd;cursor:pointer}
.fy-title{font-weight:800;font-size:16px;line-height:1.15;margin:0 0 4px;cursor:pointer}
.fy-desc{color:var(--fy-muted);font-size:13px;line-height:1.32;margin:0 0 6px;cursor:pointer}
.fy-buy{display:flex;align-items:center;justify-content:space-between;gap:12px}
.fy-price{font-weight:900;font-size:16px}
.fy-qtybtns{display:flex;align-items:center;justify-content:center;gap:10px}
.fy-qtybtns .fy-count{min-width:26px;height:38px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px}
.fy-qtybtns button{width:38px;height:38px;border-radius:12px;border:1px solid #ddd;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;line-height:1;background:#fafafa;cursor:pointer;transition:all .15s ease-in-out}
.fy-qtybtns .fy-plus{background:var(--fy-accent);color:#fff;border-color:var(--fy-accent)}
@media(max-width:420px){ .fy-card{grid-template-columns:86px 1fr;grid-auto-rows:auto} }
.fy-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.40);z-index:99998;display:none}
.fy-modal{position:fixed;z-index:99999;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,94vw);max-height:85vh;background:#fff;border:1px solid var(--fy-border);border-radius:16px;display:none;display:flex;flex-direction:column;overflow:hidden}
.fy-modal-header{position:sticky;top:0;z-index:2;background:#fff}
.fy-modal-header img{width:100%;height:180px;object-fit:cover}
.fy-close{position:absolute;top:10px;right:10px;width:38px;height:38px;border-radius:999px;background:#fff;color:#111;display:flex;align-items:center;justify-content:center;font-size:22px;line-height:1;border:1px solid rgba(0,0,0,.06);box-shadow:0 6px 20px rgba(0,0,0,.15);cursor:pointer;z-index:3}
.fy-modal-body{padding:12px;display:flex;flex-direction:column;gap:12px;overflow:auto;flex:1;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.fy-modal-title{font-weight:900;font-size:20px;line-height:1.2}
.fy-modal-desc{color:var(--fy-muted);font-size:14px}
.fy-section h4{margin:2px 0 6px;font-size:14px;font-weight:800}
.fy-grid-opts{display:grid;grid-template-columns:1fr;gap:10px}
.fy-opt{border:1px solid var(--fy-border);border-radius:12px;padding:12px;display:flex;align-items:center;gap:10px;background:#fff}
.fy-opt input{width:18px;height:18px;accent-color:var(--fy-accent)}
.fy-opt .r{margin-left:auto;color:#111;font-weight:700}
.fy-modal-qty{display:flex;align-items:center;gap:14px}
.fy-modal-qty .btn{width:42px;height:42px;border-radius:12px;border:1px solid #ddd;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:800;line-height:1;background:#fafafa;cursor:pointer}
.fy-modal-qty .plus{background:var(--fy-accent);border-color:var(--fy-accent);color:#fff}
.fy-modal-qty .v{min-width:28px;height:42px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px}
.fy-guests-label{font-weight:700;margin:4px 0}
.fy-chips{display:flex;flex-wrap:wrap;gap:10px}
.fy-chip{border:1px solid var(--fy-border);background:#f2f3f5;padding:6px 10px;border-radius:999px;cursor:pointer;font-size:14px}
.fy-chip.selected{background:var(--fy-accent);color:#fff;border-color:var(--fy-accent)}
.fy-chip.add{border-style:dashed;margin-left:4px;margin-top:6px}
.fy-modal-footer{position:sticky;bottom:0;background:#fff;padding:12px;border-top:1px solid var(--fy-border);display:flex;justify-content:space-between;align-items:center;box-shadow:0 -10px 24px rgba(0,0,0,.08);padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.fy-modal-footer .fy-price{font-weight:900;font-size:18px}
.fy-modal-footer .fy-add{background:var(--fy-accent);color:#fff;border:0;border-radius:12px;padding:12px 16px;font-weight:800;cursor:pointer}
#foodya-guests-mini-modal-root{position:fixed!important;inset:0;z-index:100000}
.fy-mini-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.35)}
.fy-mini-box{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(360px,92%);background:#fff;border-radius:12px;border:1px solid var(--fy-border);padding:14px;display:flex;flex-direction:column;gap:12px}
.fy-mini-title{font-weight:800}
.fy-mini-row{display:grid;grid-template-columns:80px 1fr;gap:10px;align-items:center}
.fy-mini-input{font-size:16px;-webkit-text-size-adjust:100%;padding:8px;border:1px solid var(--fy-border);border-radius:8px;background:#fff}
.fy-mini-actions{display:flex;gap:10px;justify-content:flex-end}
.fy-mini-btn{border:0;border-radius:8px;padding:8px 12px;cursor:pointer}
.fy-mini-btn.ghost{background:#f2f3f5;color:#333}
.fy-mini-btn.primary{background:var(--fy-accent);color:#fff}
#fy-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.30);z-index:99991;display:none}
#fy-cart{position:fixed;right:0;top:0;bottom:0;width:min(420px,92vw);background:#fff;z-index:99992;border-left:1px solid var(--fy-border);transform:translateX(100%);transition:transform .2s ease;display:flex;flex-direction:column}
#fy-cart.open{transform:translateX(0)}
.fyc-head{padding:12px 14px;border-bottom:1px solid var(--fy-border);display:flex;justify-content:space-between;align-items:center}
.fyc-head button{border:1px solid var(--fy-border);background:var(--fy-soft);border-radius:8px;padding:6px 10px;cursor:pointer}
.fyc-body{padding:10px 12px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:8px}
.fyc-group{border:1px solid var(--fy-border);border-radius:10px;padding:8px 10px;background:#fff}
.fyc-group .t{font-weight:800;margin-bottom:6px;border-bottom:1px solid var(--fy-border);padding-bottom:4px}
.fyc-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}

/* ===== PREVIEW ITEM (PRODUCTO) ===== */
.fyc-item{
  display:block;
  padding:6px 0;
  position:relative;
}
.fy-meta{
  font-size:13px;
  color:var(--fy-muted);
  line-height:1.35;
  margin:2px 0 6px;
}
.fy-meta strong{
  font-weight:600;
  color:#111;
}
.fyc-bottom-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.fyc-item .q{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.fyc-item .q button{width:38px;height:38px;border-radius:10px;border:1px solid #ddd;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:800;background:#fafafa;cursor:pointer}
.fyc-item .q button:last-child{background:var(--fy-accent);color:#fff;border-color:var(--fy-accent)}
.fyc-item .q span{min-width:26px;height:38px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px}
.fyc-item .ln{
  text-align:right;
  min-width:90px;
  font-weight:700;
}

.fyc-sub{text-align:right;font-weight:800;margin-top:6px}
.fyc-foot{border-top:1px solid var(--fy-border);padding:10px 12px;background:#fff}
.fyc-grand{font-weight:900;color:#111;text-align:right;margin-bottom:10px}
.fyc-check{width:100%;background:var(--fy-accent);color:#fff;border:0;border-radius:10px;padding:12px;font-weight:800;cursor:pointer}
.fy-bottom{position:fixed;left:0;right:0;bottom:0;z-index:99980;background:#fff;border-top:1px solid var(--fy-border);color:#111;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.fy-bottom .txt{opacity:.95;font-weight:800}
.fy-bottom .btn{background:var(--fy-accent);color:#fff;border:0;border-radius:12px;padding:12px 16px;font-weight:800;cursor:pointer}
body{padding-bottom:74px}
.fyc-item .opt{font-size:13px;color:var(--fy-muted);line-height:1.3;margin-left:4px;margin-top:2px}
.fyc-item .share{font-size:12px;color:#777;margin-top:2px;line-height:1.3}
.fy-container,.fy-list{width:100vw !important;max-width:100vw !important;margin-left:calc(-50vw + 50%) !important;margin-right:calc(-50vw + 50%) !important;padding-left:6px !important;padding-right:6px !important}
.fy-card{width:100% !important;box-sizing:border-box}
.fy-card img{width: 90px !important;height: 90px !important;object-fit: cover;border-radius: 10px}
.fyc-group{border:1px solid var(--fy-border);border-radius:10px;padding:10px;background:#fff;display:flex;flex-direction:column;gap:8px}
.fy-stock-badge{display:inline-block;align-self:flex-start;background:#e8f7ec;color:#1b7f3b;border:1px solid #c7ecd1;border-radius:999px;padding:4px 10px;font-weight:700;font-size:12px}
.fy-stock-badge.out{background:#f2f2f2;color:#888;border-color:#e0e0e0}
.fy-modal-footer .fy-add.disabled{opacity:.6;cursor:not-allowed}
.fy-card.fy-out{opacity:.6}

/* Productos sin stock: modo "disable" (se muestran en gris, se pueden abrir para ver, pero no añadir) */
.fy-card.fy-out-viewonly{opacity:.45;filter:grayscale(1)}

/* Modal solo lectura cuando no hay stock (modo "disable") */
.fy-oos-modal .fy-modal-body{opacity:.92}
.fy-oos-modal .fy-modal-footer .fy-add{background:#e5e5e5 !important;color:#666 !important;border-color:#e5e5e5 !important}

/* ===== Required groups (customMeta.required) ===== */
.fy-req-tag{ font-size:12px; opacity:.75; font-weight:600; }
.fy-section.fy-missing{ outline:2px solid #ff6b6b; outline-offset:4px; border-radius:12px; }


/* ===== FOODYA Required Options UX ===== */
.fy-req-tag{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  background:#fff3e8;
  color:#c75100;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
}
.fy-section.fy-missing{
  outline:2px solid #ff6b6b;
  outline-offset:4px;
  border-radius:12px;
  background:#fff7f7;
}
.fy-required-alert{
  margin:8px 0 10px;
  padding:10px 12px;
  border-radius:12px;
  background:#fff1f1;
  color:#b00020;
  font-weight:800;
  font-size:13px;
  border:1px solid #ffd0d0;
}
