/* ============================================================
   PAUSA Coffee — Common Styles
   Shared variables, reset, typography, buttons, header, footer
============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-bg:         #FFFFFF;
  --color-bg-soft:    #FFFFFF;
  --color-accent:     #565a63;
  --color-accent-dark:#3d4047;
  --color-ink:        #1E1F22;
  --color-text:       #2C2C2C;
  --color-text-light: #777777;
  --color-border:     #E8E8E8;
  --color-white:      #FFFFFF;
  --font-main:        'Kinetika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --radius-sm:        8px;
  --radius-md:        16px;
  --radius-lg:        20px;
  --shadow-card:      0 2px 16px rgba(0,0,0,0.07);
  --shadow-btn:       0 4px 12px rgba(86,90,99,0.20);
  --max-width:        1100px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); background: var(--color-bg); color: var(--color-text); line-height: 1.6; font-size: 16px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 14px 32px; border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 16px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; text-align: center; }
.btn-primary { background-color: var(--color-accent); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background-color: var(--color-accent-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-accent); border: 2px solid var(--color-accent); }
.btn-outline:hover { background: var(--color-accent); color: #fff; }
.btn-ghost { background: #EDEDF0; color: #333; }
.btn-success { background: #A8C3AC; color: #fff; }
.btn-danger { background: #D9A8A8; color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Section Titles ---------- */
.section-title { font-size: clamp(24px, 4vw, 36px); font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { font-size: 17px; color: var(--color-text-light); text-align: center; max-width: 560px; margin: 0 auto 48px; }

/* ---------- Reveal Animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Header (shared) ---------- */
.header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); transition: box-shadow 0.3s; }
.header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,0.07); }
.header-inner { max-width: var(--max-width); margin: 0 auto; height: 72px; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header-inner > nav { grid-column: 1 / 2; }
.nav { display: flex; gap: 28px; list-style: none; }
.nav a { font-size: 15px; font-weight: 500; color: var(--color-text); transition: color 0.2s; position: relative; }
.nav a:hover, .nav a.active { color: var(--color-accent); }
.nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--color-accent); border-radius: 2px; }
.header-logo { position: absolute; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; align-items: center; z-index: 2; }
.header-logo img { height: 38px; width: auto; }
.header-right { grid-column: 3 / 4; display: flex; justify-content: flex-end; align-items: center; }
.header-phone { font-weight: 600; color: var(--color-accent); font-size: 15px; white-space: nowrap; transition: opacity 0.2s; }
.header-phone:hover { opacity: 0.75; }
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; margin-left: 16px; padding: 4px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--color-text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu { display: none; flex-direction: column; background: var(--color-white); border-bottom: 1px solid var(--color-border); overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.mobile-menu.open { max-height: 340px; }
.mobile-menu a { padding: 15px 24px; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--color-border); transition: background 0.2s; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background: var(--color-bg-soft); color: var(--color-accent); }

/* ---------- Footer (shared) ---------- */
.footer { background: var(--color-ink); color: rgba(255,255,255,0.55); padding: 40px 24px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-logo img { height: 38px; width: auto; display: block; }
.footer-text { font-size: 13px; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

/* ---------- Responsive (shared breakpoints) ---------- */
@media (max-width: 1024px) {
  .nav { gap: 20px; }
}
@media (max-width: 900px) {
  .nav, .header-right .header-phone { display: none; }
  .header-right { display: flex; }
  .header-phone { display: none; }
  .burger { display: flex; }
  .header-inner { padding: 0 16px; }
  .header-logo img { height: 30px; }
  .mobile-menu { display: flex; }
}
@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .footer-logo img { height: 30px; }
}
@media (max-width: 480px) {
  .btn { padding: 13px 26px; font-size: 15px; }
}
@media (max-width: 360px) {
  .hero-title { font-size: 27px; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Toast (shared) ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #A8C3AC; color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform 0.3s; z-index: 110;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: #C62828; }

/* ---------- Modal Overlay (shared) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 20, 22, 0.55);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-card {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  max-width: 520px; width: 100%;
  padding: 32px 30px 28px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

/* Dish modal content */
.modal-media { text-align: center; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.modal-media img { width: 230px; height: 230px; padding: 8px 14px 18px; box-sizing: content-box; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(0,0,0,0.16)); transform: translateZ(0); backface-visibility: hidden; }
.modal-badge { margin-bottom: 10px; }
.modal-name { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.modal-desc { font-size: 15px; color: var(--color-text-light); line-height: 1.7; margin-bottom: 16px; white-space: pre-line; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--color-border); }
.modal-volume { font-size: 14px; color: var(--color-text-light); }
.modal-price { font-size: 22px; font-weight: 700; color: var(--color-accent); }
@media (max-width: 620px) { .modal-card { padding: 24px 18px 22px; } .modal-media img { width: 180px; height: 180px; } .modal-name, .modal-price { font-size: 19px; } }
@media (max-width: 380px) { .modal-media img { width: 150px; height: 150px; } .modal-card { padding: 22px 16px 20px; } }
.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--color-bg-soft);
  color: var(--color-text); font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--color-border); }

/* ---------- Badge Presets (shared) ---------- */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 100px;
  white-space: nowrap; flex-shrink: 0;
}
.badge-hit   { background: #565a63; color: #FFFFFF; }
.badge-new   { background: #E8F5E9; color: #388E3C; }
.badge-kids  { background: #E3F2FD; color: #1976D2; }
.badge-cold  { background: #EDE7F6; color: #6A1B9A; }
.badge-custom { background: #EDEDF0; color: #555; }

/* Admin-specific badge chips (for preview) */
.badge-chip {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 100px;
}
.badge-chip.badge-hit { background: #FFE3E3; color: #C62828; }
.badge-chip.badge-new { background: #E3F1E8; color: #2E7D32; }
.badge-chip.badge-kids { background: #FFF3D6; color: #B26A00; }
.badge-chip.badge-cold { background: #E3F0FA; color: #1565C0; }
.badge-chip.badge-custom { background: #EDEDF0; color: #555; }