/* ==========================================================================
   TEMPLATE 5 — GOURMET CVV
   Diseño: oscuro + tierra/terracota minimalista
   Scoped under .tpl-template5 to avoid conflicts with other templates.
   Supports: dark mode, brand color customization, responsive.
   ========================================================================== */

.tpl-template5 {
  --t5-purple: #A0522D;
  --t5-purple-dark: #7A3E22;
  --t5-purple-soft: rgba(var(--t5-brand-rgb), 0.14);
  --t5-purple-soft-2: rgba(var(--t5-brand-rgb), 0.08);
  --t5-lime: #E8D5B0;
  --t5-lime-strong: #D4BD96;

  --t5-dark: #1E1A16;
  --t5-dark-2: #25201A;
  --t5-dark-surface: #2B251E;
  --t5-dark-surface-2: #352D24;
  --t5-dark-text: #FFFFFF;
  --t5-dark-muted: rgba(255, 255, 255, 0.62);
  --t5-dark-faint: rgba(255, 255, 255, 0.38);
  --t5-dark-border: rgba(255, 255, 255, 0.12);

  --t5-light-bg: #F5F0E8;
  --t5-light-surface: #FFFFFF;
  --t5-light-text: #1E1A16;
  --t5-light-muted: #7A6F62;
  --t5-light-border: #E8DFD3;

  --t5-orange: #C0602A;
  --t5-orange-glow: rgba(192, 96, 42, 0.35);
  --t5-yellow: #D4A03A;
  --t5-star: #D4A03A;
  --t5-whatsapp: #25D366;
  --t5-danger: #C04848;

  --t5-radius-sm: 12px;
  --t5-radius-md: 18px;
  --t5-radius-lg: 26px;
  --t5-radius-xl: 34px;
  --t5-radius-full: 9999px;

  --t5-shadow-card: 0 10px 30px rgba(0,0,0,0.16);
  --t5-shadow-cta: 0 14px 32px rgba(var(--t5-brand-rgb),0.42);
  --t5-shadow-float: 0 8px 24px rgba(0,0,0,0.25);

  --t5-font-display: var(--font-family-heading, 'Space Grotesk'), 'Outfit', sans-serif;
  --t5-font-body: var(--font-family, 'Inter'), 'Plus Jakarta Sans', sans-serif;
  --t5-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t5-t: 0.32s var(--t5-ease);

  /* Template identity color (terracota) — the FALLBACK visual identity.
     The restaurant's configured brand color (from the global tenant theme
     system, injected as --color-primary by <x-tenant-theme>) takes
     precedence so admin color changes are reflected on the site. */
  --t5-brand: var(--color-primary, #A0522D);
  --t5-brand-hover: var(--color-primary-hover, #7A3E22);
  --t5-brand-rgb: var(--color-primary-rgb, 160, 82, 45);
  --t5-accent: #E8D5B0;
  --t5-button-text: var(--color-button-text, #FFFFFF);

  /* Aliases kept for backwards compatibility */
  --t5-restaurant-accent: var(--t5-brand);
  --t5-restaurant-accent-hover: var(--t5-brand-hover);
  --t5-restaurant-accent-rgb: var(--t5-brand-rgb);
  --t5-restaurant-accent-text: var(--t5-button-text);
}

/* ---- Theme-aware variable resolution ---- */
/* Light mode (default): light surfaces everywhere except the hero screen */
.tpl-template5 {
  --t5-bg: var(--t5-light-bg);
  --t5-bg-surface: var(--t5-light-surface);
  --t5-bg-surface-2: #EFE8DB;
  --t5-text: var(--t5-light-text);
  --t5-text-muted: var(--t5-light-muted);
  --t5-text-faint: rgba(30, 26, 22, 0.45);
  --t5-border: var(--t5-light-border);
  --t5-sheet-bg: var(--t5-light-surface);
  --t5-sheet-text: var(--t5-light-text);
  --t5-sheet-muted: var(--t5-light-muted);
  --t5-sheet-border: var(--t5-light-border);
  --t5-sheet-input-bg: var(--t5-light-bg);
  --t5-frame-bg: var(--t5-light-bg);
  --t5-header-fade: rgba(245, 240, 232, 0.95);
}

/* Dark mode: everything dark */
[data-theme="dark"] .tpl-template5,
.tpl-template5.dark-mode {
  --t5-bg: var(--t5-dark);
  --t5-bg-surface: var(--t5-dark-surface);
  --t5-bg-surface-2: var(--t5-dark-surface-2);
  --t5-text: #FFFFFF;
  --t5-text-muted: var(--t5-dark-muted);
  --t5-text-faint: var(--t5-dark-faint);
  --t5-border: var(--t5-dark-border);
  --t5-sheet-bg: var(--t5-dark-surface);
  --t5-sheet-text: #FFFFFF;
  --t5-sheet-muted: var(--t5-dark-muted);
  --t5-sheet-border: var(--t5-dark-border);
  --t5-sheet-input-bg: var(--t5-dark-2);
  --t5-frame-bg: var(--t5-dark);
  --t5-header-fade: rgba(30, 26, 22, 0.95);
}

/* ---- Reset (scoped) ---- */
.tpl-template5 *, .tpl-template5 *::before, .tpl-template5 *::after {
  box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent;
}
.tpl-template5 { font-family: var(--t5-font-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tpl-template5 button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.tpl-template5 input { font-family: inherit; color: inherit; border: none; outline: none; background: none; }
.tpl-template5 textarea { font-family: inherit; }
.tpl-template5 img { display: block; max-width: 100%; }
.tpl-template5 a { color: inherit; text-decoration: none; }
.tpl-template5 .t5-hidden { display: none !important; }
.tpl-template5 .t5-accent-text { color: var(--t5-lime); }

/* ---- Layout ---- */
.tpl-template5 .t5-app-layout { width: 100%; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 0; background: var(--t5-light-bg); }
.tpl-template5 .t5-app-container { position: relative; width: 100%; max-width: 440px; height: 100dvh; background: var(--t5-frame-bg); overflow: hidden; margin: 0 auto; }

[data-theme="dark"] .tpl-template5 .t5-app-layout,
.tpl-template5.dark-mode .t5-app-layout { background: var(--t5-dark); }

/* ---- Small phones ---- */
@media (max-width: 360px) {
  .tpl-template5 .t5-hero-actions { padding: 18px; }
  .tpl-template5 .t5-detail-sheet { padding: 22px 18px; }
}

/* ---- Landscape ---- */
@media (max-height: 600px) and (orientation: landscape) {
  .tpl-template5 .t5-detail-visual { height: 38%; min-height: 180px; }
  .tpl-template5 .t5-detail-sheet { padding-top: 18px; }
}

/* ---- Toasts ---- */
.tpl-template5 .t5-toast-container { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: max-content; max-width: 92vw; }
.tpl-template5 .t5-toast { background: var(--t5-dark); color: #fff; padding: 12px 18px; border-radius: var(--t5-radius-full); font-size: 13px; font-weight: 600; box-shadow: var(--t5-shadow-float); display: flex; align-items: center; gap: 8px; animation: t5toastIn 0.28s var(--t5-ease); }
.tpl-template5 .t5-toast i { color: var(--t5-lime); }
@keyframes t5toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Icon buttons ---- */
.tpl-template5 .t5-icon-btn { width: 42px; height: 42px; border-radius: var(--t5-radius-full); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; transition: var(--t5-t); }
.tpl-template5 .t5-icon-btn i { pointer-events: none; }
.tpl-template5 .t5-icon-btn.ghost { background: rgba(30,26,22,0.06); color: var(--t5-text); backdrop-filter: blur(8px); border: 1px solid var(--t5-border); }
[data-theme="dark"] .tpl-template5 .t5-icon-btn.ghost,
.tpl-template5.dark-mode .t5-icon-btn.ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.1); }
/* Ghost buttons over permanently-dark surfaces (hero, detail visual) keep light styling */
.tpl-template5 #t5-screen-hero .t5-icon-btn.ghost,
.tpl-template5 .t5-detail-header .t5-icon-btn.ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.1); }
.tpl-template5 .t5-icon-btn.ghost:active { transform: scale(0.9); }
.tpl-template5 .t5-icon-btn.dark { background: rgba(0,0,0,0.08); color: var(--t5-sheet-text); }
.tpl-template5 .t5-icon-btn.purple { background: var(--t5-purple-soft); color: var(--t5-purple); }
.tpl-template5 .t5-icon-btn.active-fav i { color: var(--t5-orange); font-weight: 900; }

/* ---- Main button ---- */
.tpl-template5 .t5-btn-main { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 22px; border-radius: var(--t5-radius-full); background: var(--t5-brand); color: #fff; font-family: var(--t5-font-display); font-size: 15px; font-weight: 600; box-shadow: var(--t5-shadow-cta); transition: var(--t5-t); }
.tpl-template5 .t5-btn-main:active { transform: scale(0.97); }
.tpl-template5 .t5-btn-main-icon { width: 30px; height: 30px; border-radius: var(--t5-radius-full); background: var(--t5-lime); color: var(--t5-brand); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.tpl-template5 .t5-btn-main.dark { background: var(--t5-dark); color: #fff; box-shadow: none; border: 1px solid var(--t5-border); }
.tpl-template5 .t5-btn-main.dark .t5-btn-main-icon { background: var(--t5-lime); color: var(--t5-dark); }
.tpl-template5 .t5-btn-main.whatsapp { background: var(--t5-whatsapp); box-shadow: 0 12px 28px rgba(37,211,102,0.4); }
.tpl-template5 .t5-btn-main.whatsapp .t5-btn-main-icon { background: #fff; color: var(--t5-whatsapp); }

/* ---- Screens / routing ---- */
.tpl-template5 .t5-screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; visibility: hidden; opacity: 0; transform: translateX(100%); transition: transform 0.36s var(--t5-ease), opacity 0.36s var(--t5-ease), visibility 0s linear 0.36s; z-index: 1; }
.tpl-template5 .t5-screen.active { visibility: visible; opacity: 1; transform: translateX(0); transition: transform 0.36s var(--t5-ease), opacity 0.36s var(--t5-ease), visibility 0s; z-index: 2; }
.tpl-template5 .t5-screen.exit-left { transform: translateX(-30%); opacity: 0.55; }

/* ========================= PANTALLA 1: HERO ========================= */
.tpl-template5 #t5-screen-hero { background: var(--t5-dark); color: #fff; overflow: hidden !important; overflow-y: hidden !important; }
.tpl-template5 .t5-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; filter: brightness(0.55) saturate(1.05); transform: scale(1.05); }
.tpl-template5 .t5-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.tpl-template5 .t5-hero-video.is-ready { opacity: 1; }
.tpl-template5 .t5-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,26,34,0.70) 0%, rgba(27,26,34,0.45) 40%, rgba(27,26,34,0.90) 80%, var(--t5-dark) 100%); }

.tpl-template5 .t5-hero-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; padding-top: max(14px, env(safe-area-inset-top)); }
.tpl-template5 .t5-brand { display: flex; align-items: center; gap: 8px; }
.tpl-template5 .t5-brand-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--t5-brand); display: flex; align-items: center; justify-content: center; color: var(--t5-lime); font-size: 16px; box-shadow: 0 6px 16px rgba(var(--t5-brand-rgb),0.45); overflow: hidden; flex-shrink: 0; }
.tpl-template5 .t5-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.tpl-template5 .t5-brand-name { font-family: var(--t5-font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: #fff; }

@keyframes t5floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.tpl-template5 .t5-hero-actions { position: relative; z-index: 3; padding: 22px 18px 0; margin-top: auto; margin-bottom: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.tpl-template5 .t5-hero-actions .t5-btn-main { width: 100%; max-width: 320px; }
.tpl-template5 .t5-hero-social { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 18px max(28px, env(safe-area-inset-bottom)); }
.tpl-template5 .t5-icon-btn.social { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.tpl-template5 .t5-icon-btn.social:hover { transform: translateY(-3px); }
.tpl-template5 .t5-icon-btn.instagram:hover { background: #E1306C; border-color: #E1306C; }
.tpl-template5 .t5-icon-btn.facebook:hover { background: #1877F2; border-color: #1877F2; }
.tpl-template5 .t5-icon-btn.tiktok:hover { background: #000; border-color: #fff; }
.tpl-template5 .t5-icon-btn.whatsapp-social:hover { background: #25D366; border-color: #25D366; }

/* ========================= PANTALLA 2: MENÚ ========================= */
.tpl-template5 #t5-screen-menu { background: var(--t5-bg); color: var(--t5-text); display: block; scroll-padding-top: 150px; }
.tpl-template5 .t5-menu-header { position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, var(--t5-bg) 72%, var(--t5-header-fade)); padding: max(14px, env(safe-area-inset-top)) 18px 14px; flex-shrink: 0; }
.tpl-template5 .t5-menu-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tpl-template5 .t5-menu-title-block { flex: 1; }
.tpl-template5 .t5-menu-title-block h2 { font-family: var(--t5-font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tpl-template5 .t5-menu-title-block span { font-size: 12px; color: var(--t5-text-muted); }
.tpl-template5 .t5-cart-btn { position: relative; }
.tpl-template5 .t5-cart-count { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--t5-lime); color: var(--t5-brand); border-radius: var(--t5-radius-full); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--t5-bg); }
.tpl-template5 .t5-cart-count:empty, .tpl-template5 .t5-cart-count[data-count="0"], .tpl-template5 .t5-cart-count.t5-hidden { display: none; }

.tpl-template5 .t5-search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tpl-template5 .t5-search-box { display: flex; align-items: center; gap: 10px; background: var(--t5-bg-surface); border: 1px solid var(--t5-border); padding: 12px 16px; border-radius: var(--t5-radius-full); flex: 1; min-width: 0; }
.tpl-template5 .t5-cat-pill { display: none; flex-shrink: 0; align-items: center; gap: 7px; padding: 12px 18px; border-radius: var(--t5-radius-full); background: var(--t5-brand); color: #fff; font-family: var(--t5-font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.01em; box-shadow: 0 6px 16px rgba(var(--t5-brand-rgb),0.4); transition: var(--t5-t); border: 1px solid rgba(255,255,255,0.12); }
.tpl-template5 .t5-cat-pill:active { transform: scale(0.95); box-shadow: 0 3px 8px rgba(var(--t5-brand-rgb),0.3); }
.tpl-template5 .t5-cat-pill i { font-size: 13px; }
.tpl-template5 .t5-search-box i { color: var(--t5-text-faint); font-size: 14px; }
.tpl-template5 .t5-search-box input { flex: 1; color: var(--t5-text); font-size: 14px; }
.tpl-template5 .t5-search-box input::placeholder { color: var(--t5-text-faint); }

.tpl-template5 .t5-category-cards { display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; -ms-overflow-style: none; scrollbar-width: none; flex-shrink: 0; }
.tpl-template5 .t5-category-cards::-webkit-scrollbar { display: none; }
.tpl-template5 .t5-cat-card { position: relative; width: 100%; height: 120px; border-radius: var(--t5-radius-lg); background-size: cover; background-position: center; overflow: hidden; cursor: pointer; transition: var(--t5-t); border: 2px solid transparent; }
.tpl-template5 .t5-cat-card:active { transform: scale(0.98); }
.tpl-template5 .t5-cat-card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,26,34,0.15) 0%, rgba(27,26,34,0.75) 100%); transition: var(--t5-t); }
.tpl-template5 .t5-cat-card-label { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; color: #fff; font-family: var(--t5-font-display); font-size: 20px; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,0.6); z-index: 2; padding: 0; }
.tpl-template5 .t5-cat-card-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.75); font-size: 12px; z-index: 2; }

.tpl-template5 .t5-cat-view-header { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; }
.tpl-template5 .t5-cat-view-title-block { flex: 1; }
.tpl-template5 .t5-cat-view-title-block h3 { font-family: var(--t5-font-display); font-size: 20px; font-weight: 700; color: var(--t5-text); }
.tpl-template5 .t5-cat-view-title-block span { font-size: 12px; color: var(--t5-text-muted); }

/* ========================= PANTALLA 2B: CATEGORÍA ========================= */
.tpl-template5 #t5-screen-category { background: var(--t5-bg); color: var(--t5-text); display: block; scroll-padding-top: 110px; }
.tpl-template5 .t5-cat-page-banner { position: relative; margin: 0 18px 16px; border-radius: var(--t5-radius-lg); overflow: hidden; height: 200px; flex-shrink: 0; box-shadow: var(--t5-shadow-card); }
.tpl-template5 .t5-cat-page-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-template5 .t5-cat-page-banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,26,22,0.1) 0%, rgba(30,26,22,0.85) 100%); }
.tpl-template5 .t5-cat-page-banner-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 18px; z-index: 2; }
.tpl-template5 .t5-cat-page-banner-content h3 { font-family: var(--t5-font-display); font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.tpl-template5 .t5-cat-page-banner-content p { font-size: 12px; color: rgba(255,255,255,0.8); }

.tpl-template5 .t5-cat-page-list { padding: 0 18px max(28px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr; gap: 14px; }
.tpl-template5 .t5-cat-page-card { display: flex; gap: 14px; background: var(--t5-bg-surface); border: 1px solid var(--t5-border); border-radius: var(--t5-radius-lg); padding: 12px; transition: var(--t5-t); cursor: pointer; align-items: center; }
.tpl-template5 .t5-cat-page-card:active { transform: scale(0.98); }
.tpl-template5 .t5-cat-page-card img { width: 80px; height: 80px; border-radius: var(--t5-radius-md); object-fit: cover; flex-shrink: 0; }
.tpl-template5 .t5-cat-page-card-body { flex: 1; min-width: 0; }
.tpl-template5 .t5-cat-page-card-body h3 { font-family: var(--t5-font-display); font-size: 15px; font-weight: 600; margin-bottom: 2px; color: var(--t5-text); }
.tpl-template5 .t5-cat-page-card-desc { font-size: 12px; color: var(--t5-text-muted); line-height: 1.4; margin-bottom: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.tpl-template5 .t5-cat-page-card-foot { display: flex; align-items: center; gap: 10px; }
.tpl-template5 .t5-cat-page-card-price { font-family: var(--t5-font-display); font-size: 15px; font-weight: 700; color: var(--t5-brand); }
[data-theme="dark"] .tpl-template5 .t5-cat-page-card-price,
.tpl-template5.dark-mode .t5-cat-page-card-price { color: var(--t5-lime); }
.tpl-template5 .t5-cat-page-card-rating { font-size: 11px; color: var(--t5-text-muted); display: flex; align-items: center; gap: 3px; }
.tpl-template5 .t5-cat-page-card-rating i { color: var(--t5-star); font-size: 10px; }
.tpl-template5 .t5-cat-page-card-add { min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--t5-radius-full); background: var(--t5-brand); color: #fff; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 700; box-shadow: 0 6px 14px rgba(var(--t5-brand-rgb),0.4); transition: var(--t5-t); flex-shrink: 0; }
.tpl-template5 .t5-cat-page-card-add:active { transform: scale(0.9); }
.tpl-template5 .t5-cat-page-card-add .t5-card-qty { display: none; font-size: 12px; line-height: 1; }
.tpl-template5 .t5-cat-page-card-add.has-qty .t5-card-qty { display: inline; }
.tpl-template5 .t5-card-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.tpl-template5 .t5-card-fav { width: 34px; height: 34px; border-radius: var(--t5-radius-full); background: rgba(30,26,22,0.06); border: 1px solid var(--t5-border); color: var(--t5-text-muted); display: flex; align-items: center; justify-content: center; font-size: 13px; transition: var(--t5-t); }
.tpl-template5 .t5-card-fav:active { transform: scale(0.9); }
.tpl-template5 .t5-card-fav.fav-active { color: var(--t5-orange); border-color: rgba(var(--t5-brand-rgb),0.35); }
.tpl-template5 .t5-card-fav.fav-active i { font-weight: 900; }
[data-theme="dark"] .tpl-template5 .t5-card-fav,
.tpl-template5.dark-mode .t5-card-fav { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }

/* ---- Banner anuncio del menú ---- */
.tpl-template5 .t5-menu-banner { position: relative; margin: 0 18px 16px; border-radius: var(--t5-radius-lg); overflow: hidden; height: 180px; flex-shrink: 0; box-shadow: var(--t5-shadow-card); }
.tpl-template5 .t5-menu-banner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-template5 .t5-menu-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-template5 .t5-menu-banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,26,34,0.2) 0%, rgba(27,26,34,0.75) 100%); }
.tpl-template5 .t5-menu-banner-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 18px; z-index: 2; }
.tpl-template5 .t5-menu-banner-tag { display: inline-block; background: var(--t5-lime); color: var(--t5-brand); padding: 4px 10px; border-radius: var(--t5-radius-full); font-size: 10px; font-weight: 700; margin-bottom: 8px; }
.tpl-template5 .t5-menu-banner-title { font-family: var(--t5-font-display); font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.tpl-template5 .t5-menu-banner-desc { font-size: 12px; color: rgba(255,255,255,0.8); }
.tpl-template5 .t5-menu-banner-cta { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 10px; padding: 8px 18px; border-radius: var(--t5-radius-full); background: var(--t5-lime); color: var(--t5-brand); font-size: 12px; font-weight: 700; text-decoration: none; transition: transform .2s; }
.tpl-template5 .t5-menu-banner-cta:hover { transform: translateY(-2px); }
.tpl-template5 .t5-menu-banner-carousel { padding: 0; }
.tpl-template5 .t5-menu-banner-carousel .t5-banner-track { display: flex; height: 100%; transition: transform .45s var(--t5-ease); }
.tpl-template5 .t5-menu-banner-carousel .t5-banner-slide { position: relative; min-width: 100%; height: 100%; overflow: hidden; }
.tpl-template5 .t5-menu-banner-carousel .t5-banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-template5 .t5-banner-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,.85); color: var(--t5-dark); cursor: pointer; font-size: .8rem; z-index: 3; display: flex; align-items: center; justify-content: center; }
.tpl-template5 .t5-banner-btn.prev { left: 10px; } .tpl-template5 .t5-banner-btn.next { right: 10px; }
.tpl-template5 .t5-banner-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.tpl-template5 .t5-dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: all .25s; }
.tpl-template5 .t5-dot.active { background: var(--t5-lime); width: 20px; border-radius: 4px; }

/* ---- Banner promoción ---- */
.tpl-template5 .t5-promo-row { display: flex; gap: 12px; margin: 0 18px 16px; flex-shrink: 0; }
.tpl-template5 .t5-promo-banner { position: relative; border-radius: var(--t5-radius-lg); overflow: hidden; height: 220px; flex: 1; box-shadow: var(--t5-shadow-card); }
.tpl-template5 .t5-promo-half { flex: 1; }
.tpl-template5 .t5-promo-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-template5 .t5-promo-banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,26,22,0.1) 0%, rgba(30,26,22,0.85) 100%); }
.tpl-template5 .t5-promo-banner-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 16px; z-index: 2; }
.tpl-template5 .t5-promo-banner-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--t5-brand); color: var(--t5-lime); padding: 4px 10px; border-radius: var(--t5-radius-full); font-size: 10px; font-weight: 700; margin-bottom: 8px; }
.tpl-template5 .t5-promo-banner-title { font-family: var(--t5-font-display); font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 3px; line-height: 1.2; }
.tpl-template5 .t5-promo-banner-desc { font-size: 11px; color: rgba(255,255,255,0.75); margin-bottom: 8px; }
.tpl-template5 .t5-promo-banner-price { display: flex; align-items: center; gap: 8px; }
.tpl-template5 .t5-promo-old { font-size: 12px; color: rgba(255,255,255,0.45); text-decoration: line-through; }
.tpl-template5 .t5-promo-new { font-size: 18px; font-weight: 800; color: var(--t5-lime); font-family: var(--t5-font-display); }

/* ---- Sección de productos destacados en menú ---- */
.tpl-template5 .t5-featured-section { padding: 0 18px 16px; flex-shrink: 0; }
.tpl-template5 .t5-featured-title-block { margin-bottom: 14px; }
.tpl-template5 .t5-featured-title-block h3 { font-family: var(--t5-font-display); font-size: 20px; font-weight: 700; color: var(--t5-text); }
.tpl-template5 .t5-featured-title-block span { font-size: 12px; color: var(--t5-text-muted); }
.tpl-template5 .t5-featured-list { display: flex; flex-direction: column; gap: 14px; }

/* ---- Botón flotante de categorías ---- */
.tpl-template5 .t5-fab-categories { position: fixed; bottom: 60%; right: 24px; transform: translateY(50%); display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: var(--t5-radius-full); background: var(--t5-brand); color: #fff; font-family: var(--t5-font-display); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(var(--t5-brand-rgb),0.5); z-index: 50; transition: var(--t5-t); }
.tpl-template5 .t5-fab-categories:active { transform: translateY(50%) scale(0.95); }
.tpl-template5 .t5-fab-categories i { font-size: 16px; }

/* Mobile: hide FAB, show pill in header */
@media (max-width: 1023px) {
  .tpl-template5 .t5-fab-categories { display: none; }
  .tpl-template5 .t5-cat-pill { display: flex; }
}

/* ---- Modal de categorías ---- */
.tpl-template5 .t5-cat-modal-sheet { width: 100%; max-width: 640px; margin: 0 auto; background: var(--t5-bg); border-radius: var(--t5-radius-xl) var(--t5-radius-xl) 0 0; padding: max(14px, env(safe-area-inset-top)) 0 env(safe-area-inset-bottom); z-index: 100; max-height: 85dvh; overflow-y: auto; transform: translateY(100%); transition: transform 0.36s var(--t5-ease); }
.tpl-template5 #t5-cat-modal.open .t5-cat-modal-sheet { transform: translateY(0); }
.tpl-template5 .t5-cat-modal-sheet .t5-reserve-header { padding: 0 18px; }
.tpl-template5 .t5-cat-modal-sheet .t5-category-cards { padding: 20px 18px; }
.tpl-template5 .t5-cat-modal-sheet .t5-menu-list { padding: 0 18px 28px; }
.tpl-template5 .t5-cat-modal-sheet .t5-cat-view-header { padding: 20px 18px 0; }

.tpl-template5 .t5-category-section { padding: 0 18px max(28px, env(safe-area-inset-bottom)); flex-shrink: 0; }
.tpl-template5 .t5-menu-list { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.tpl-template5 .t5-menu-card { display: flex; gap: 14px; background: var(--t5-bg-surface); border: 1px solid var(--t5-border); border-radius: var(--t5-radius-lg); padding: 12px; transition: var(--t5-t); cursor: pointer; }
.tpl-template5 .t5-menu-card:active { transform: scale(0.98); }
.tpl-template5 .t5-menu-card img { width: 84px; height: 84px; border-radius: var(--t5-radius-md); object-fit: cover; flex-shrink: 0; }
.tpl-template5 .t5-menu-card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tpl-template5 .t5-menu-card h3 { font-family: var(--t5-font-display); font-size: 15px; font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t5-text); }
.tpl-template5 .t5-menu-card .t5-desc { font-size: 11px; color: var(--t5-text-muted); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-template5 .t5-menu-card-foot { display: flex; align-items: center; justify-content: space-between; }
.tpl-template5 .t5-menu-card .t5-price { font-family: var(--t5-font-display); font-weight: 700; font-size: 16px; }
.tpl-template5 .t5-menu-card .t5-rating { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--t5-text-muted); }
.tpl-template5 .t5-menu-card .t5-rating i { color: var(--t5-star); font-size: 10px; }
.tpl-template5 .t5-menu-card-add { width: 34px; height: 34px; border-radius: var(--t5-radius-full); background: var(--t5-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 6px 14px rgba(var(--t5-brand-rgb),0.4); transition: var(--t5-t); flex-shrink: 0; align-self: center; }
.tpl-template5 .t5-menu-card-add:active { transform: scale(0.85); background: var(--t5-lime); color: var(--t5-brand); }
.tpl-template5 .t5-menu-empty { text-align: center; color: var(--t5-text-muted); padding: 60px 20px; font-size: 14px; }

/* ========================= PANTALLA 3: DETALLE ========================= */
.tpl-template5 #t5-screen-detail { background: var(--t5-sheet-bg); color: var(--t5-sheet-text); }
.tpl-template5 .t5-detail-header { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 18px 14px; }
.tpl-template5 .t5-detail-visual { position: relative; height: 45%; min-height: 280px; background: linear-gradient(160deg, #2B1F16 0%, #4A3520 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tpl-template5 .t5-detail-glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--t5-orange-glow) 0%, rgba(254,179,2,0.18) 40%, transparent 70%); }
.tpl-template5 .t5-detail-visual img { position: relative; z-index: 2; width: 80%; max-width: 300px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 30px 60px rgba(0,0,0,0.45); animation: t5floatY 5s ease-in-out infinite; }

.tpl-template5 .t5-detail-sheet { flex: 1; background: var(--t5-sheet-bg); border-radius: var(--t5-radius-xl) var(--t5-radius-xl) 0 0; margin-top: -28px; position: relative; z-index: 2; padding: 26px 22px max(28px, env(safe-area-inset-bottom)); }
.tpl-template5 .t5-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tpl-template5 .t5-detail-head h2 { font-family: var(--t5-font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.tpl-template5 .t5-detail-head .t5-subtitle { display: block; font-size: 13px; color: var(--t5-sheet-muted); margin-top: 2px; }
.tpl-template5 .t5-rating-pill { display: flex; align-items: center; gap: 5px; background: var(--t5-sheet-input-bg); padding: 7px 12px; border-radius: var(--t5-radius-full); font-size: 13px; font-weight: 700; }
.tpl-template5 .t5-rating-pill i { color: var(--t5-star); font-size: 12px; }

.tpl-template5 .t5-detail-price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tpl-template5 #t5-detail-price { font-family: var(--t5-font-display); font-size: 26px; font-weight: 700; color: var(--t5-brand); }
.tpl-template5 .t5-qty-control { display: flex; align-items: center; gap: 14px; background: var(--t5-sheet-input-bg); padding: 7px; border-radius: var(--t5-radius-full); }
.tpl-template5 .t5-qty-control button { width: 32px; height: 32px; border-radius: 50%; background: var(--t5-light-surface); color: var(--t5-brand); display: flex; align-items: center; justify-content: center; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: var(--t5-t); }
[data-theme="dark"] .tpl-template5 .t5-qty-control button,
.tpl-template5.dark-mode .t5-qty-control button { background: var(--t5-dark-surface-2); color: var(--t5-lime); }
.tpl-template5 .t5-qty-control button:active { transform: scale(0.88); }
.tpl-template5 .t5-qty-control span { font-family: var(--t5-font-display); font-weight: 700; font-size: 15px; min-width: 18px; text-align: center; }

.tpl-template5 .t5-size-block { margin-bottom: 18px; }
.tpl-template5 .t5-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--t5-sheet-text); }
.tpl-template5 .t5-size-options { display: flex; gap: 10px; }
.tpl-template5 .t5-size-opt { flex: 1; padding: 12px; border-radius: var(--t5-radius-md); background: var(--t5-sheet-input-bg); border: 1.5px solid transparent; text-align: center; transition: var(--t5-t); }
.tpl-template5 .t5-size-opt .t5-sz-name { display: block; font-family: var(--t5-font-display); font-weight: 600; font-size: 13px; }
.tpl-template5 .t5-size-opt .t5-sz-price { display: block; font-size: 11px; color: var(--t5-sheet-muted); margin-top: 2px; }
.tpl-template5 .t5-size-opt.active { background: var(--t5-light-surface); border-color: var(--t5-brand); box-shadow: 0 4px 12px rgba(var(--t5-brand-rgb),0.18); }
[data-theme="dark"] .tpl-template5 .t5-size-opt.active,
.tpl-template5.dark-mode .t5-size-opt.active { background: var(--t5-dark-surface-2); }
.tpl-template5 .t5-size-opt.active .t5-sz-name { color: var(--t5-brand); }

.tpl-template5 .t5-detail-desc { font-size: 13px; color: var(--t5-sheet-muted); line-height: 1.65; margin-bottom: 22px; }

/* Extras */
.tpl-template5 .t5-extras-block { margin-bottom: 18px; }
.tpl-template5 .t5-extras-list { display: flex; flex-direction: column; gap: 10px; }
.tpl-template5 .t5-extra-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--t5-radius-md); background: var(--t5-sheet-input-bg); border: 1.5px solid var(--t5-sheet-border); cursor: pointer; transition: var(--t5-t); }
.tpl-template5 .t5-extra-item:hover { border-color: var(--t5-brand); }
.tpl-template5 .t5-extra-item.active { border-color: var(--t5-brand); background: var(--t5-purple-soft); }
.tpl-template5 .t5-extra-info { display: flex; align-items: center; gap: 10px; }
.tpl-template5 .t5-extra-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--t5-sheet-border); display: flex; align-items: center; justify-content: center; font-size: 11px; color: transparent; transition: var(--t5-t); }
.tpl-template5 .t5-extra-item.active .t5-extra-check { background: var(--t5-brand); border-color: var(--t5-brand); color: #fff; }
.tpl-template5 .t5-extra-name { font-size: 14px; font-weight: 500; }
.tpl-template5 .t5-extra-price { font-size: 13px; font-weight: 700; color: var(--t5-brand); }

/* Observations */
.tpl-template5 .t5-obs-block { margin-bottom: 18px; }
.tpl-template5 .t5-obs-input { width: 100%; padding: 14px 16px; border-radius: var(--t5-radius-md); background: var(--t5-sheet-input-bg); border: 1.5px solid var(--t5-sheet-border); color: var(--t5-sheet-text); font-size: 14px; line-height: 1.5; resize: vertical; min-height: 80px; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.tpl-template5 .t5-obs-input::placeholder { color: var(--t5-sheet-muted); }
.tpl-template5 .t5-obs-input:focus { outline: none; border-color: var(--t5-brand); box-shadow: 0 0 0 3px rgba(var(--t5-brand-rgb),0.12); }

.tpl-template5 .t5-rec-block { margin-bottom: 22px; }
.tpl-template5 .t5-rec-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; -ms-overflow-style: none; scrollbar-width: none; }
.tpl-template5 .t5-rec-list::-webkit-scrollbar { display: none; }
.tpl-template5 .t5-rec-item { flex-shrink: 0; width: 110px; background: var(--t5-sheet-input-bg); border-radius: var(--t5-radius-md); padding: 10px; text-align: center; cursor: pointer; transition: var(--t5-t); }
.tpl-template5 .t5-rec-item:active { transform: scale(0.95); }
.tpl-template5 .t5-rec-item img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; }
.tpl-template5 .t5-rec-item .t5-ri-name { font-size: 12px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-template5 .t5-rec-item .t5-ri-price { font-size: 12px; font-weight: 700; color: var(--t5-brand); }

.tpl-template5 .t5-detail-actions { display: flex; flex-direction: column; gap: 12px; }

/* ========================= PANTALLA 4: CARRITO ========================= */
.tpl-template5 #t5-screen-cart { background: var(--t5-sheet-bg); color: var(--t5-sheet-text); }
.tpl-template5 .t5-cart-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: max(14px, env(safe-area-inset-top)) 18px 14px; background: var(--t5-sheet-bg); }
.tpl-template5 .t5-cart-header h2 { font-family: var(--t5-font-display); font-size: 24px; font-weight: 700; flex: 1; margin: 0; }

.tpl-template5 .t5-cart-body { flex: 1; padding: 8px 18px 18px; overflow-y: auto; }
.tpl-template5 .t5-cart-items { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.tpl-template5 .t5-cart-item { display: flex; gap: 12px; align-items: center; background: var(--t5-sheet-input-bg); border-radius: var(--t5-radius-lg); padding: 10px; }
.tpl-template5 .t5-cart-item img { width: 64px; height: 64px; border-radius: var(--t5-radius-md); object-fit: cover; flex-shrink: 0; }
.tpl-template5 .t5-ci-body { flex: 1; min-width: 0; }
.tpl-template5 .t5-ci-name { font-family: var(--t5-font-display); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-template5 .t5-ci-meta { font-size: 13px; color: var(--t5-sheet-muted); margin-bottom: 6px; }
.tpl-template5 .t5-ci-controls { display: flex; align-items: center; justify-content: space-between; }
.tpl-template5 .t5-ci-qty { display: flex; align-items: center; gap: 10px; background: var(--t5-light-surface); padding: 5px; border-radius: var(--t5-radius-full); }
[data-theme="dark"] .tpl-template5 .t5-ci-qty,
.tpl-template5.dark-mode .t5-ci-qty { background: var(--t5-dark-surface-2); }
.tpl-template5 .t5-ci-qty button { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--t5-brand); transition: var(--t5-t); }
.tpl-template5 .t5-ci-qty button:active { transform: scale(0.85); }
.tpl-template5 .t5-ci-qty span { font-family: var(--t5-font-display); font-weight: 700; font-size: 15px; min-width: 18px; text-align: center; }
.tpl-template5 .t5-ci-price { font-family: var(--t5-font-display); font-weight: 700; font-size: 14px; color: var(--t5-brand); }
.tpl-template5 .t5-ci-remove { color: var(--t5-danger); font-size: 14px; padding: 7px; }
.tpl-template5 .t5-ci-remove:active { transform: scale(0.85); }

.tpl-template5 .t5-cart-empty { text-align: center; padding: 60px 20px; color: var(--t5-sheet-muted); }
.tpl-template5 .t5-cart-empty i { font-size: 44px; color: var(--t5-purple-soft); margin-bottom: 14px; }
.tpl-template5 .t5-cart-empty p { font-size: 14px; margin-bottom: 18px; }
.tpl-template5 .t5-cart-empty .t5-btn-main { display: inline-flex; width: auto; padding: 12px 24px; }

.tpl-template5 .t5-cart-summary { background: var(--t5-sheet-input-bg); border-radius: var(--t5-radius-lg); padding: 16px 18px; }
.tpl-template5 .t5-sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--t5-sheet-muted); margin-bottom: 10px; }
.tpl-template5 .t5-sum-row span:last-child { color: var(--t5-sheet-text); font-weight: 600; }
.tpl-template5 .t5-sum-row.total { padding-top: 12px; margin-bottom: 0; border-top: 1px solid var(--t5-sheet-border); font-size: 18px; font-weight: 700; color: var(--t5-sheet-text); }
.tpl-template5 .t5-sum-row.total span:last-child { color: var(--t5-brand); font-family: var(--t5-font-display); font-size: 20px; }
.tpl-template5 .t5-sum-row.promo-row span:last-child { color: #1A7F3C; }

.tpl-template5 .t5-promo-box { display: flex; align-items: center; gap: 10px; background: var(--t5-sheet-input-bg); border: 1.5px dashed var(--t5-sheet-border); padding: 10px 12px; border-radius: var(--t5-radius-md); margin-bottom: 18px; }
.tpl-template5 .t5-promo-box i { color: var(--t5-brand); font-size: 16px; }
.tpl-template5 .t5-promo-box input { flex: 1; font-size: 15px; color: var(--t5-sheet-text); }
.tpl-template5 .t5-promo-box input::placeholder { color: var(--t5-sheet-muted); }
.tpl-template5 .t5-promo-box button { background: var(--t5-brand); color: #fff; padding: 10px 16px; border-radius: var(--t5-radius-full); font-size: 14px; font-weight: 600; }
.tpl-template5 .t5-promo-box button:active { transform: scale(0.94); }

.tpl-template5 .t5-cart-footer { padding: 14px 18px max(18px, env(safe-area-inset-bottom)); background: var(--t5-sheet-bg); box-shadow: 0 -8px 24px rgba(0,0,0,0.06); }

/* ========================= PANTALLA: TRACKING ========================= */
.tpl-template5 .t5-tracking-hero { text-align: center; padding: 30px 20px; }
.tpl-template5 .t5-tracking-icon-circle { width: 120px; height: 120px; border-radius: 50%; background: var(--t5-purple-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 48px; color: var(--t5-brand); }
.tpl-template5 .t5-tracking-countdown { display: inline-block; background: var(--t5-purple-soft); padding: 8px 20px; border-radius: var(--t5-radius-full); font-family: var(--t5-font-display); font-weight: 700; color: var(--t5-brand); margin-bottom: 24px; }

.tpl-template5 .t5-stepper { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.tpl-template5 .t5-stepper-node { display: flex; align-items: center; gap: 12px; opacity: 0.5; transition: var(--t5-t); }
.tpl-template5 .t5-stepper-node.completed,
.tpl-template5 .t5-stepper-node.active { opacity: 1; }
.tpl-template5 .t5-stepper-node-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--t5-bg-surface); color: var(--t5-text-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--t5-t); }
.tpl-template5 .t5-stepper-node.completed .t5-stepper-node-icon,
.tpl-template5 .t5-stepper-node.active .t5-stepper-node-icon { background: var(--t5-brand); color: #fff; }
.tpl-template5 .t5-stepper-node-label { font-weight: 600; }
.tpl-template5 .t5-stepper-node:not(.completed):not(.active) .t5-stepper-node-label { font-weight: 400; color: var(--t5-text-muted); }

.tpl-template5 .t5-tracking-summary { background: var(--t5-sheet-input-bg); border-radius: var(--t5-radius-lg); padding: 18px; margin-bottom: 16px; }
.tpl-template5 .t5-tracking-summary h4 { font-family: var(--t5-font-display); font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--t5-sheet-text); }
.tpl-template5 .t5-tracking-summary-product { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tpl-template5 .t5-tracking-summary-product-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--t5-purple-soft); display: flex; align-items: center; justify-content: center; color: var(--t5-brand); flex-shrink: 0; }
.tpl-template5 .t5-tracking-summary-product-name { font-weight: 600; font-size: 14px; color: var(--t5-sheet-text); }
.tpl-template5 .t5-tracking-summary-product-meta { font-size: 12px; color: var(--t5-sheet-muted); }
.tpl-template5 .t5-tracking-summary-product-price { font-family: var(--t5-font-display); font-weight: 700; color: var(--t5-brand); }
.tpl-template5 .t5-tracking-summary-rows { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tpl-template5 .t5-tracking-summary-row { display: flex; justify-content: space-between; }
.tpl-template5 .t5-tracking-summary-row span:first-child { color: var(--t5-sheet-muted); }
.tpl-template5 .t5-tracking-summary-row strong { color: var(--t5-sheet-text); }

/* ========================= MODAL RESERVA ========================= */
.tpl-template5 .t5-modal { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background: rgba(0,0,0,0.55); visibility: hidden; opacity: 0; transition: opacity 0.32s var(--t5-ease), visibility 0.32s; }
.tpl-template5 .t5-reserve-overlay { position: absolute; inset: 0; z-index: -1; }
.tpl-template5 .t5-modal.open { visibility: visible; opacity: 1; }
.tpl-template5 .t5-reserve-sheet { width: 100%; max-width: 520px; background: var(--t5-sheet-bg); border-radius: var(--t5-radius-xl) var(--t5-radius-xl) 0 0; padding: 22px 22px max(26px, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.32s var(--t5-ease); }
.tpl-template5 .t5-modal.open .t5-reserve-sheet { transform: translateY(0); }
.tpl-template5 .t5-modal.open .t5-cat-modal-sheet { transform: translateY(0); }

.tpl-template5 .t5-reserve-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.tpl-template5 .t5-reserve-header h2 { font-family: var(--t5-font-display); font-size: 20px; font-weight: 700; color: var(--t5-sheet-text); }

.tpl-template5 .t5-reserve-form { display: flex; flex-direction: column; gap: 16px; }
.tpl-template5 .t5-field { display: flex; flex-direction: column; gap: 6px; }
.tpl-template5 .t5-field span { font-size: 13px; font-weight: 600; color: var(--t5-sheet-text); }
.tpl-template5 .t5-field input, .tpl-template5 .t5-field textarea, .tpl-template5 .t5-field select { padding: 12px 16px; border-radius: var(--t5-radius-md); background: var(--t5-sheet-input-bg); border: 1px solid var(--t5-sheet-border); color: var(--t5-sheet-text); font-size: 15px; font-family: inherit; resize: none; }
.tpl-template5 .t5-field input:focus, .tpl-template5 .t5-field textarea:focus, .tpl-template5 .t5-field select:focus { border-color: var(--t5-brand); outline: none; }
.tpl-template5 .t5-reserve-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.tpl-template5 .t5-btn-link { width: 100%; padding: 12px; color: var(--t5-sheet-muted); font-size: 14px; font-weight: 500; background: none; text-align: center; }
.tpl-template5 .t5-btn-link:hover { color: var(--t5-brand); }

/* ========================= FLOATING FUNCTIONS BUTTON + DRAWER ========================= */
.tpl-template5 .t5-fab-functions { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 18px; width: 48px; height: 48px; border-radius: var(--t5-radius-full); background: var(--t5-bg-surface); border: 1px solid var(--t5-border); color: var(--t5-text); font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.28); z-index: 50; transition: var(--t5-t); }
.tpl-template5 .t5-fab-functions:active { transform: scale(0.94); }

.tpl-template5 .t5-drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; opacity: 0; transition: visibility 0s linear 0.3s, opacity 0.3s var(--t5-ease); }
.tpl-template5 .t5-drawer.open { visibility: visible; opacity: 1; transition: visibility 0s, opacity 0.3s var(--t5-ease); }
.tpl-template5 .t5-drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.tpl-template5 .t5-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(300px, 82vw); background: var(--t5-bg-surface); border-radius: var(--t5-radius-xl) 0 0 var(--t5-radius-xl); box-shadow: -10px 0 40px rgba(0,0,0,0.35); transform: translateX(100%); transition: transform 0.32s var(--t5-ease); display: flex; flex-direction: column; overflow-y: auto; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); }
.tpl-template5 .t5-drawer.open .t5-drawer-panel { transform: translateX(0); }
.tpl-template5 .t5-drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tpl-template5 .t5-drawer-header h2 { font-family: var(--t5-font-display); font-size: 22px; font-weight: 700; color: var(--t5-text); }
.tpl-template5 .t5-drawer-list { display: flex; flex-direction: column; gap: 4px; }
.tpl-template5 .t5-drawer-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--t5-radius-md); background: transparent; color: var(--t5-text); font-family: var(--t5-font-body); font-size: 15px; font-weight: 500; text-align: left; transition: var(--t5-t); width: 100%; }
.tpl-template5 .t5-drawer-item i { font-size: 18px; color: var(--t5-text-muted); width: 22px; text-align: center; }
.tpl-template5 .t5-drawer-item:active { background: rgba(30,26,22,0.06); }
[data-theme="dark"] .tpl-template5 .t5-drawer-item:active,
.tpl-template5.dark-mode .t5-drawer-item:active { background: rgba(255,255,255,0.06); }

.tpl-template5 .t5-dock-spacer { height: 70px; flex-shrink: 0; }

/* ========================= TABLET (600px–1023px) ========================= */
@media (min-width: 600px) and (max-width: 1023px) {
  .tpl-template5 .t5-app-container { max-width: 720px; }
  .tpl-template5 .t5-cart-body { padding: 16px 28px 24px; }
}

/* ========================= DESKTOP FULL-WIDTH (≥1024px) ========================= */
@media (min-width: 1024px) {
  .tpl-template5 { font-size: 16px; }
  .tpl-template5 .t5-app-layout { padding: 0; background: var(--t5-light-bg); }
  .tpl-template5 .t5-app-container { max-width: none; width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }

  .tpl-template5 .t5-hero-bg { filter: brightness(0.5) saturate(1.1); }
  .tpl-template5 .t5-hero-overlay { background: linear-gradient(180deg, rgba(30,26,22,0.50) 0%, rgba(30,26,22,0.30) 40%, rgba(30,26,22,0.85) 85%, var(--t5-dark) 100%); }
  .tpl-template5 .t5-hero-header { padding: 24px 48px; }
  .tpl-template5 .t5-brand-name { font-size: 24px; }
  .tpl-template5 .t5-brand-icon { width: 44px; height: 44px; font-size: 20px; }
  .tpl-template5 .t5-hero-actions { margin-left: auto; margin-right: auto; margin-top: auto; width: 100%; max-width: 520px; padding: 40px 48px env(safe-area-inset-bottom); align-items: center; gap: 18px; }
  .tpl-template5 .t5-hero-actions .t5-btn-main { width: 100%; max-width: 420px; padding: 18px 28px; font-size: 17px; }
  .tpl-template5 .t5-hero-social { gap: 24px; padding-top: 12px; }
  .tpl-template5 .t5-icon-btn.social { width: 48px; height: 48px; font-size: 18px; }

  .tpl-template5 .t5-menu-header { padding: 24px 48px; }
  .tpl-template5 #t5-screen-menu { scroll-padding-top: 180px; }
  .tpl-template5 #t5-screen-category { scroll-padding-top: 130px; }
  .tpl-template5 .t5-menu-top, .tpl-template5 .t5-search-row { max-width: 1200px; margin-left: auto; margin-right: auto; }
  .tpl-template5 .t5-search-row { margin-top: 16px; }
  .tpl-template5 .t5-search-box { padding: 14px 20px; font-size: 15px; }
  .tpl-template5 .t5-menu-top { margin-bottom: 18px; }
  .tpl-template5 .t5-menu-title-block h2 { font-size: 28px; }
  .tpl-template5 .t5-menu-banner { margin: 0 auto 28px; max-width: 1200px; height: 320px; border-radius: var(--t5-radius-xl); }
  .tpl-template5 .t5-menu-banner-title { font-size: 30px; }
  .tpl-template5 .t5-menu-banner-desc { font-size: 15px; }
  .tpl-template5 .t5-menu-banner-tag { font-size: 13px; padding: 6px 14px; }
  .tpl-template5 .t5-menu-banner-content { padding: 28px 32px; }

  .tpl-template5 .t5-promo-row { max-width: 1200px; margin: 0 auto 28px; gap: 20px; }
  .tpl-template5 .t5-promo-banner { height: 320px; border-radius: var(--t5-radius-xl); }
  .tpl-template5 .t5-promo-banner-title { font-size: 24px; }
  .tpl-template5 .t5-promo-banner-desc { font-size: 13px; }
  .tpl-template5 .t5-promo-banner-badge { font-size: 12px; padding: 6px 14px; }
  .tpl-template5 .t5-promo-banner-content { padding: 28px 32px; }
  .tpl-template5 .t5-promo-new { font-size: 26px; }
  .tpl-template5 .t5-promo-old { font-size: 15px; }

  .tpl-template5 .t5-featured-section { max-width: 1200px; margin: 0 auto 28px; padding: 0 48px 24px; }
  .tpl-template5 .t5-featured-title-block h3 { font-size: 26px; }
  .tpl-template5 .t5-featured-title-block span { font-size: 14px; }
  .tpl-template5 .t5-featured-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .tpl-template5 .t5-category-section { max-width: 1200px; margin: 0 auto; padding: 0 48px 40px; }
  .tpl-template5 .t5-category-cards { padding-bottom: 24px; }
  .tpl-template5 .t5-fab-categories { right: 48px; padding: 16px 28px; font-size: 16px; }
  .tpl-template5 .t5-fab-categories i { font-size: 18px; }
  .tpl-template5 .t5-cat-modal-sheet { max-width: 800px; }
  .tpl-template5 .t5-cat-card { height: 180px; border-radius: var(--t5-radius-lg); }
  .tpl-template5 .t5-cat-card-label { font-size: 26px; }
  .tpl-template5 .t5-cat-card-count { font-size: 14px; bottom: 18px; }
  .tpl-template5 .t5-cat-view-header { padding-bottom: 24px; }
  .tpl-template5 .t5-cat-view-title-block h3 { font-size: 26px; }
  .tpl-template5 .t5-menu-list { padding-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 24px; }
  .tpl-template5 .t5-menu-card { align-items: center; padding: 16px; }
  .tpl-template5 .t5-menu-card img { width: 100px; height: 100px; border-radius: var(--t5-radius-md); }
  .tpl-template5 .t5-menu-card h3 { font-size: 17px; }
  .tpl-template5 .t5-menu-card .t5-desc { font-size: 13px; }
  .tpl-template5 .t5-menu-card .t5-price { font-size: 17px; }
  .tpl-template5 .t5-menu-card-add { width: 42px; height: 42px; font-size: 15px; }

  .tpl-template5 .t5-cat-page-banner { margin: 0 auto 28px; max-width: 1200px; height: 320px; border-radius: var(--t5-radius-xl); }
  .tpl-template5 .t5-cat-page-banner-content h3 { font-size: 28px; }
  .tpl-template5 .t5-cat-page-banner-content p { font-size: 14px; }
  .tpl-template5 .t5-cat-page-banner-content { padding: 28px 32px; }
  .tpl-template5 .t5-cat-page-list { max-width: 1200px; margin: 0 auto; padding: 0 48px 40px; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .tpl-template5 .t5-cat-page-card { padding: 16px; }
  .tpl-template5 .t5-cat-page-card img { width: 100px; height: 100px; }
  .tpl-template5 .t5-cat-page-card-body h3 { font-size: 17px; }
  .tpl-template5 .t5-cat-page-card-desc { font-size: 13px; }
  .tpl-template5 .t5-cat-page-card-price { font-size: 17px; }
  .tpl-template5 .t5-cat-page-card-add { min-width: 42px; height: 42px; font-size: 15px; }
  .tpl-template5 .t5-cat-page-card-add .t5-card-qty { font-size: 14px; }

  .tpl-template5 .t5-detail-header { padding: 24px 48px; width: 45%; right: auto; }
  .tpl-template5 #t5-screen-detail { flex-direction: row; overflow: hidden; }
  .tpl-template5 .t5-detail-visual { width: 45%; height: 100%; min-height: auto; }
  .tpl-template5 .t5-detail-visual img { width: 55%; max-width: 380px; }
  .tpl-template5 .t5-detail-sheet { width: 55%; height: 100%; margin-top: 0; border-radius: 0; padding: 48px; overflow-y: auto; }
  .tpl-template5 .t5-detail-sheet h2 { font-size: 36px; }
  .tpl-template5 #t5-detail-price { font-size: 34px; }
  .tpl-template5 .t5-detail-actions { flex-direction: row; }
  .tpl-template5 .t5-detail-actions .t5-btn-main { flex: 1; }

  .tpl-template5 .t5-cart-header { padding: 24px 48px; max-width: 1000px; margin: 0 auto; }
  .tpl-template5 .t5-cart-body { max-width: 1000px; margin: 0 auto; padding: 32px 48px; }
  .tpl-template5 .t5-cart-item { padding: 14px; gap: 14px; }
  .tpl-template5 .t5-ci-name { font-size: 15px; }
  .tpl-template5 .t5-ci-price { font-size: 15px; }
  .tpl-template5 .t5-cart-footer { padding: 28px 48px; }
  .tpl-template5 .t5-cart-footer .t5-btn-main { max-width: 1000px; margin: 0 auto; }

  .tpl-template5 .t5-reserve-sheet { max-width: 640px; padding: 40px 48px; border-radius: var(--t5-radius-xl) var(--t5-radius-xl) 0 0; }
  .tpl-template5 .t5-reserve-header h2 { font-size: 26px; }
}

@media (min-width: 1440px) {
  .tpl-template5 .t5-hero-actions { max-width: 600px; }
  .tpl-template5 .t5-hero-actions .t5-btn-main { max-width: 480px; }
  .tpl-template5 .t5-menu-list { grid-template-columns: repeat(3, 1fr); }
  .tpl-template5 .t5-cat-page-list { grid-template-columns: repeat(3, 1fr); }
  .tpl-template5 .t5-featured-list { grid-template-columns: repeat(3, 1fr); }
}

/* ========================= DARK MODE OVERRIDES ========================= */
/* In dark mode, detail/cart sheets use dark surfaces */
[data-theme="dark"] .tpl-template5 .t5-detail-visual,
.tpl-template5.dark-mode .t5-detail-visual { background: linear-gradient(160deg, #1E1A16 0%, #2B251E 100%); }
[data-theme="dark"] .tpl-template5 .t5-menu-header,
.tpl-template5.dark-mode .t5-menu-header { background: linear-gradient(180deg, var(--t5-dark) 72%, rgba(30,26,22,0.95)); }
[data-theme="dark"] .tpl-template5 .t5-cart-header,
.tpl-template5.dark-mode .t5-cart-header { background: var(--t5-dark-surface); }
[data-theme="dark"] .tpl-template5 .t5-cart-footer,
.tpl-template5.dark-mode .t5-cart-footer { background: var(--t5-dark-surface); box-shadow: 0 -8px 24px rgba(0,0,0,0.3); }
[data-theme="dark"] .tpl-template5 .t5-size-opt.active,
.tpl-template5.dark-mode .t5-size-opt.active { background: var(--t5-dark-surface-2); }
[data-theme="dark"] .tpl-template5 .t5-reserve-header h2,
.tpl-template5.dark-mode .t5-reserve-header h2 { color: #fff; }
