/* ============================================================
   CHADA THAI CUISINE — Palm Springs
   Modern Printable & PDF Menu Stylesheet
   Engineered for Mobile Screens & Exact Letter Size Print / PDF
   ============================================================ */

:root {
  --red-deep:     #7E1620;
  --red:          #A6212B;
  --red-hot:      #C53A30;
  --gold:         #D9A441;
  --gold-pale:    #F3E5C8;
  --cream:        #FAF4E7;
  --cream-soft:   #F3ECDC;
  --paper:        #FFFDF8;
  --ink:          #241915;
  --ink-light:    #55443B;
  --muted:        #7C6B5D;
  --line:         rgba(126, 22, 32, 0.18);
  --line-gold:    rgba(217, 164, 65, 0.35);
  
  --serif:        "Fraunces", Georgia, serif;
  --sans:         "Outfit", system-ui, -apple-system, sans-serif;
  
  --shadow:       0 8px 30px rgba(36, 25, 21, 0.08);
  --radius:       12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background-color: var(--cream);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Screen Top Header & Floating Action Bar */
.screen-header {
  background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 100%);
  color: var(--cream);
  padding: 1.1rem 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.screen-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.screen-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.screen-brand img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.screen-brand__text h1 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
}

.screen-brand__text p {
  font-size: 0.78rem;
  color: var(--gold-pale);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.screen-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-action--primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(217, 164, 65, 0.4);
}

.btn-action--primary:hover {
  background: #e6b14f;
  transform: translateY(-2px);
}

.btn-action--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 500;
}

.btn-action--ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Category Quick Jump Pills */
.category-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line-gold);
  padding: 0.6rem 1rem;
  position: sticky;
  top: 68px;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.category-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.category-nav__inner::-webkit-scrollbar {
  height: 4px;
}
.category-nav__inner::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

.category-pill {
  white-space: nowrap;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-light);
  background: var(--cream-soft);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.category-pill:hover, .category-pill.active {
  background: var(--red);
  color: #fff;
}

/* Menu Container */
.menu-print-wrapper {
  max-width: 1080px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Individual Printable Sheet (Letter Aspect Ratio on Screen) */
.print-sheet {
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-gold);
  padding: 2.2rem 2.4rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.print-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--gold));
}

/* Sheet Main Header (Page 1) */
.sheet-header {
  border-bottom: 2px solid var(--red);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  position: relative;
}

.sheet-header__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sheet-logo {
  height: 56px;
  width: auto;
}

.sheet-header__title h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--red);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.sheet-header__title p {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.sheet-header__info {
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.35;
}

.sheet-header__info strong {
  color: var(--red-deep);
  font-size: 0.92rem;
}

.sheet-page-indicator {
  position: absolute;
  right: 0;
  bottom: -1.6rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Secondary Sheet Header (Pages 2 - 5) */
.sheet-header--sub {
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 0.65rem;
  margin-bottom: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-header--sub .sub-title {
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--red-deep);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sheet-header--sub .sub-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Dietary / Legend Notice Banner */
.menu-legend-bar {
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  margin-bottom: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9A3412;
}

.menu-legend-bar .chili-legend {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Grid Layouts for Sections */
.menu-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.menu-section {
  margin-bottom: 1.1rem;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 0.3rem;
  margin-bottom: 0.65rem;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.01em;
}

.section-note {
  font-size: 0.78rem;
  color: var(--red-hot);
  font-weight: 500;
  font-style: italic;
}

/* Price Choice Tier Box */
.choice-tier-box {
  background: var(--cream-soft);
  border: 1px solid var(--line-gold);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.choice-tier-box__title {
  font-weight: 600;
  color: var(--red-deep);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.choice-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.2rem 0.65rem;
}

.choice-tier-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  padding-bottom: 1px;
}

.choice-tier-item span:first-child {
  color: var(--ink);
}

.choice-tier-item span:last-child {
  font-weight: 600;
  color: var(--red-deep);
}

/* Menu Item Rows */
.menu-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.print-item {
  font-size: 0.84rem;
  line-height: 1.32;
}

.print-item__header {
  display: flex;
  align-items: baseline;
  width: 100%;
}

.print-item__num {
  color: var(--red);
  font-weight: 700;
  font-size: 0.82rem;
  min-width: 1.35rem;
  font-feature-settings: "tnum";
}

.print-item__name {
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-chili {
  color: var(--red-hot);
  font-size: 0.82rem;
  line-height: 1;
}

.badge-na {
  display: inline-block;
  font-size: 0.68rem;
  color: #B91C1C;
  background: #FEE2E2;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 0.35rem;
  text-transform: uppercase;
}

.print-item__dots {
  flex: 1;
  border-bottom: 1px dotted rgba(124, 107, 93, 0.4);
  margin: 0 0.45rem;
  height: 0.7em;
}

.print-item__price {
  font-weight: 700;
  color: var(--red-deep);
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.print-item__desc {
  font-size: 0.77rem;
  color: var(--muted);
  margin-top: 0.12rem;
  padding-left: 1.35rem;
  line-height: 1.3;
}

/* Image Feature Cards (100% Real Food Photos) */
.dish-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0.65rem 0;
  padding: 0.45rem;
  background: var(--cream);
  border-radius: 8px;
  border: 1px solid var(--line-gold);
}

.dish-photo-strip--2 {
  grid-template-columns: repeat(2, 1fr);
}

.dish-photo-card {
  text-align: center;
}

.dish-photo-card img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.dish-photo-card p {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red-deep);
  margin-top: 0.25rem;
  line-height: 1.15;
}

/* Featured Banner Item with Large Real Photo */
.feature-banner-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--cream);
  border: 1px solid var(--line-gold);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin: 0.65rem 0;
}

.feature-banner-box img {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.12);
}

.feature-banner-box__content {
  flex: 1;
}

.feature-banner-box__title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--red-deep);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.feature-banner-box__desc {
  font-size: 0.76rem;
  color: var(--ink-light);
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* Lunch Special Highlight Box */
.lunch-highlight-box {
  background: linear-gradient(135deg, #FFF9EB 0%, #FEF3C7 100%);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.85rem;
}

.lunch-highlight-box__title {
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--red-deep);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lunch-highlight-box__rules {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* Sheet Footer */
.sheet-footer {
  margin-top: 1.1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sheet-footer strong {
  color: var(--red);
}

/* Screen Floating Download / Print FAB (Bottom-Right on Mobile) */
.mobile-print-fab {
  display: none;
}

/* ============================================================
   RESPONSIVE DESIGN (Screen / Mobile)
   ============================================================ */
@media screen and (max-width: 900px) {
  .menu-columns {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .print-sheet {
    padding: 1.4rem 1.15rem;
  }
  
  .sheet-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  
  .sheet-header__info {
    text-align: left;
  }
}

@media screen and (max-width: 600px) {
  .screen-brand__text h1 {
    font-size: 1.12rem;
  }
  
  .btn-action span {
    display: none;
  }
  
  .btn-action svg {
    margin: 0;
  }
  
  .btn-action {
    padding: 0.5rem 0.75rem;
  }
  
  .mobile-print-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background: var(--gold);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 1000;
    text-decoration: none;
    border: none;
    cursor: pointer;
  }
}

/* ============================================================
   PRINT / PDF EXPORT ENGINE (@media print)
   Strictly Formatted to 5 Exact Letter (8.5 x 11 in) Pages
   ============================================================ */
@media print {
  @page {
    size: letter portrait;
    margin: 0.3in 0.35in;
  }
  
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  html, body {
    width: 100% !important;
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 7.8pt !important;
    line-height: 1.28 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Hide interactive screen elements */
  .no-print, .screen-header, .category-nav, .mobile-print-fab, .btn-action {
    display: none !important;
  }
  
  .menu-print-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    display: block !important;
  }
  
  /* Each print-sheet maps strictly to one Letter page with zero spillover */
  .print-sheet {
    /* break handled by not last child */
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 10.38in !important;
    max-height: 10.38in !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }
  
  .print-sheet:not(:last-of-type) { page-break-after: always !important; break-after: page !important; }
  .print-sheet:last-of-type {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  
  .print-sheet::before {
    display: none !important;
  }
  
  .sheet-header {
    border-bottom: 1.2pt solid #8C1D24 !important;
    padding-bottom: 0.08in !important;
    margin-bottom: 0.1in !important;
  }
  
  .sheet-logo {
    height: 42px !important;
  }
  
  .sheet-header__title h2 {
    font-size: 15pt !important;
    color: #8C1D24 !important;
  }
  
  .sheet-header__info {
    font-size: 7pt !important;
  }
  
  .sheet-header--sub {
    border-bottom: 1pt solid #D9A441 !important;
    padding-bottom: 0.06in !important;
    margin-bottom: 0.08in !important;
  }
  
  .sheet-header--sub .sub-title {
    font-size: 11pt !important;
    color: #8C1D24 !important;
  }
  
  .menu-legend-bar {
    padding: 0.04in 0.08in !important;
    margin-bottom: 0.08in !important;
    font-size: 7pt !important;
  }
  
  .section-title-wrap {
    padding-bottom: 0.03in !important;
    margin-bottom: 0.05in !important;
  }
  
  .section-title {
    font-size: 10.5pt !important;
    color: #8C1D24 !important;
  }
  
  .menu-columns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.25in !important;
  }
  
  .menu-section {
    margin-bottom: 0.08in !important;
  }
  
  .choice-tier-box {
    background: #FDFBF7 !important;
    border: 0.5pt solid #D9A441 !important;
    padding: 0.05in 0.08in !important;
    margin-bottom: 0.06in !important;
    font-size: 7pt !important;
  }
  
  .choice-tier-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.02in 0.1in !important;
  }
  
  .menu-item-list {
    gap: 0.04in !important;
  }
  
  .print-item {
    font-size: 7.6pt !important;
    line-height: 1.25 !important;
  }
  
  .print-item__num {
    font-size: 7.4pt !important;
    min-width: 1.1rem !important;
  }
  
  .print-item__price {
    color: #7E1620 !important;
    font-size: 7.6pt !important;
  }
  
  .print-item__desc {
    font-size: 6.8pt !important;
    color: #555555 !important;
    padding-left: 1.1rem !important;
    line-height: 1.2 !important;
  }
  
  .dish-photo-strip {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    background: #FAFAFA !important;
    border: 0.5pt solid #E5E5E5 !important;
    padding: 0.04in !important;
    margin: 0.05in 0 !important;
    gap: 0.08in !important;
  }
  
  .dish-photo-strip--2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .dish-photo-card img {
    height: 42px !important;
  }
  
  .dish-photo-card p {
    font-size: 6.2pt !important;
    color: #8C1D24 !important;
  }
  
  .feature-banner-box {
    background: #FDFBF7 !important;
    border: 0.5pt solid #E5E5E5 !important;
    padding: 0.05in 0.08in !important;
    margin: 0.05in 0 !important;
  }
  
  .feature-banner-box img {
    width: 60px !important;
    height: 46px !important;
  }
  
  .feature-banner-box__title {
    font-size: 7.8pt !important;
  }
  
  .feature-banner-box__desc {
    font-size: 6.8pt !important;
  }
  
  .lunch-highlight-box {
    background: #FFFDF8 !important;
    border: 0.5pt solid #D9A441 !important;
    padding: 0.08in !important;
    margin-bottom: 0.06in !important;
  }
  
  .lunch-highlight-box__title {
    font-size: 9.5pt !important;
  }
  
  .sheet-footer {
    border-top: 0.5pt solid #D9A441 !important;
    padding-top: 0.04in !important;
    margin-top: 0.06in !important;
    font-size: 6.8pt !important;
  }
}
