/* ═══════════════════════════════════════════════════════════════════
   P4P ONLINE ORDERING — COMPONENTS STYLING
   Header, Branch Selector, Menu Cards, Director's Cut Sheet
   ═══════════════════════════════════════════════════════════════════ */

/* ── Top Status Strip ── */
.p4p-top-strip {
  background: linear-gradient(90deg, #05140f 0%, #0a2d21 50%, #05140f 100%);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  font-size: 0.82rem;
  padding: 0.45rem 1.5rem;
  color: var(--p4p-cream-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  z-index: 101;
}

.top-strip-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.live-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.top-strip-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.top-strip-link {
  color: var(--p4p-gold-light);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.top-strip-link:hover {
  color: var(--p4p-cream);
}

/* ── Main App Header ── */
.p4p-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 12, 9, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.22);
  transition: all 0.3s ease;
}

.p4p-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}

.p4p-brand-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}

.p4p-header-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.p4p-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--p4p-gold);
  object-fit: cover;
  box-shadow: 0 0 14px rgba(201, 168, 76, 0.25);
  transition: transform 0.3s ease;
}

.p4p-logo-img:hover {
  transform: scale(1.05);
}

.p4p-logo-text {
  display: flex;
  flex-direction: column;
}

.p4p-logo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--p4p-gold);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.p4p-logo-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--p4p-cream-muted);
}

/* ── Branch & Fulfillment Trigger ── */
.p4p-branch-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14, 33, 25, 0.65);
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
}

.p4p-branch-trigger:hover {
  background: rgba(20, 50, 38, 0.85);
  border-color: var(--p4p-gold);
}

.branch-pin-icon {
  color: var(--p4p-gold);
  font-size: 1rem;
}

.branch-info-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.branch-current-mode {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--p4p-gold-light);
}

.branch-current-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--p4p-cream);
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Header Search ── */
.header-search-bar {
  flex: 1;
  max-width: 360px;
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-bar input {
  width: 100%;
  padding-left: 2.3rem;
  padding-right: 1.8rem;
  background: rgba(10, 22, 17, 0.85);
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 168, 76, 0.25);
  font-size: 0.88rem;
}

.header-search-bar .search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--p4p-gold);
  pointer-events: none;
  font-size: 0.95rem;
}

.header-search-bar .search-clear {
  position: absolute;
  right: 0.75rem;
  color: var(--p4p-cream-faint);
  cursor: pointer;
  font-size: 1.1rem;
}

/* ── Header Actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.header-action-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--p4p-cream-muted);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.header-action-link:hover {
  color: var(--p4p-gold);
}

.header-cart-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #c9a84c 0%, #a6842f 100%);
  color: #040907;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.3);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.header-cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.45);
}

.cart-count-badge {
  background: #061c14;
  color: var(--p4p-gold-light);
  font-size: 0.75rem;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid var(--p4p-gold);
}

/* ── Fulfilment / Branch Switcher Modal ── */
.p4p-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}

.p4p-modal-card {
  background: #081611;
  border: 1.5px solid var(--p4p-gold);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 1.8rem;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(201, 168, 76, 0.2);
  position: relative;
}

.p4p-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  color: var(--p4p-cream-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.p4p-modal-close:hover {
  color: var(--p4p-gold);
}

.mode-toggle-group {
  display: flex;
  background: rgba(14, 30, 23, 0.9);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 1.2rem 0;
}

.mode-toggle-btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--p4p-cream-muted);
  transition: all 0.2s;
}

.mode-toggle-btn.active {
  background: linear-gradient(135deg, var(--p4p-gold) 0%, #b28e36 100%);
  color: #050c09;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.branch-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.branch-select-card {
  border: 1.5px solid rgba(201, 168, 76, 0.25);
  background: rgba(12, 26, 20, 0.7);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.branch-select-card:hover, .branch-select-card.selected {
  border-color: var(--p4p-gold);
  background: rgba(18, 42, 32, 0.9);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.2);
}

.branch-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.5);
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.branch-select-card.selected .branch-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p4p-gold);
}

/* ── Menu Categories Left Rail & Grid ── */
.menu-page-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

@media (max-width: 1024px) {
  .menu-page-layout {
    grid-template-columns: 1fr;
  }
}

.category-left-rail {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  height: fit-content;
  background: rgba(8, 19, 14, 0.85);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.rail-heading {
  font-family: var(--font-cinema);
  font-size: 0.9rem;
  color: var(--p4p-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(201, 168, 76, 0.3);
}

.category-rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--p4p-cream-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.category-rail-item:hover {
  background: rgba(201, 168, 76, 0.1);
  color: var(--p4p-cream);
}

.category-rail-item.active {
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.25) 0%, rgba(201, 168, 76, 0.05) 100%);
  color: var(--p4p-gold-light);
  font-weight: 700;
  border-left: 3px solid var(--p4p-gold);
}

.category-rail-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

/* ── Mobile Horizontal Category Pills ── */
.mobile-category-pills {
  display: none;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.6rem 0;
  scrollbar-width: none;
}

.mobile-category-pills::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-category-pills {
    display: flex;
  }
}

.mobile-cat-pill {
  padding: 0.45rem 1rem;
  background: rgba(14, 30, 23, 0.8);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--radius-full);
  color: var(--p4p-cream-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.mobile-cat-pill.active {
  background: var(--p4p-gold);
  color: #040907;
  border-color: var(--p4p-gold-light);
}

/* ── Dietary & Attribute Filter Bar ── */
.menu-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(8, 18, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(15, 30, 24, 0.6);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--p4p-cream-muted);
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--p4p-gold);
  color: var(--p4p-cream);
}

.filter-btn.active {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--p4p-gold);
  color: var(--p4p-gold-light);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.2);
}

/* ── Product Cards Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
}

.product-card {
  background: var(--p4p-surface-card);
  border: 1.5px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--p4p-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 16px rgba(201, 168, 76, 0.2);
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(90deg, #091a13 0%, #122d21 50%, #091a13 100%);
  background-size: 200% 100%;
  animation: p4pShimmer 2s infinite linear;
  overflow: hidden;
}

@keyframes p4pShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
  position: relative;
  z-index: 1;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.05);
}

.product-badge-overlay {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

.product-bestseller-tag {
  background: linear-gradient(135deg, #c9a84c 0%, #8c6e26 100%);
  color: #050c09;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.product-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.product-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--p4p-cream);
  line-height: 1.25;
}

.product-card-secondary {
  font-size: 0.78rem;
  color: var(--p4p-gold);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.product-card-desc {
  font-size: 0.85rem;
  color: var(--p4p-cream-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(201, 168, 76, 0.18);
}

.product-card-price-wrap {
  display: flex;
  flex-direction: column;
}

.price-main {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p4p-cream);
  font-family: var(--font-display);
}

.price-variant-note {
  font-size: 0.72rem;
  color: var(--p4p-cream-faint);
}

.product-add-btn {
  background: rgba(201, 168, 76, 0.12);
  border: 1.5px solid var(--p4p-gold);
  color: var(--p4p-gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.product-add-btn:hover {
  background: var(--p4p-gold);
  color: #050c09;
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.35);
}

.dinein-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
}

/* ── "Director's Cut" Product Customisation Sheet / Modal ── */
.customise-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}

@media (max-width: 640px) {
  .customise-sheet-backdrop {
    padding: 0;
    align-items: flex-end;
  }
}

.customise-sheet-card {
  background: #081711;
  border: 1.5px solid var(--p4p-gold);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(201, 168, 76, 0.25);
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 640px) {
  .customise-sheet-card {
    border-radius: 20px 20px 0 0;
    max-height: 94vh;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.sheet-header-banner {
  position: relative;
  height: 140px;
  background: #0d281e;
  overflow: hidden;
  flex-shrink: 0;
}

.sheet-header-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}

.sheet-header-banner .sheet-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--p4p-cream);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid rgba(201, 168, 76, 0.4);
}

.sheet-header-banner .sheet-title-badge {
  position: absolute;
  bottom: 0.8rem;
  left: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sheet-scroll-content {
  padding: 1.4rem;
  overflow-y: auto;
  flex: 1;
}

.sheet-section {
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--p4p-cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sheet-required-tag {
  font-size: 0.72rem;
  background: rgba(201, 168, 76, 0.15);
  color: var(--p4p-gold-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  font-weight: 700;
}

/* Variant & Option Cards */
.variant-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.variant-btn {
  border: 1.5px solid rgba(201, 168, 76, 0.25);
  background: rgba(14, 30, 23, 0.6);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.variant-btn:hover {
  border-color: var(--p4p-gold);
}

.variant-btn.selected {
  border-color: var(--p4p-gold);
  background: rgba(201, 168, 76, 0.15);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.25);
}

.variant-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--p4p-cream);
}

.variant-price {
  font-size: 0.85rem;
  color: var(--p4p-gold);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Option Checkbox & Radio Rows */
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.option-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.option-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-name {
  font-size: 0.88rem;
  color: var(--p4p-cream);
}

.option-price {
  font-size: 0.85rem;
  color: var(--p4p-gold-light);
  font-weight: 600;
}

/* Sheet Sticky Bottom Bar */
.sheet-bottom-bar {
  padding: 1rem 1.4rem;
  background: #05120c;
  border-top: 1px solid rgba(201, 168, 76, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.sheet-qty-stepper {
  display: flex;
  align-items: center;
  background: rgba(14, 30, 23, 0.9);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: var(--radius-full);
  padding: 2px 6px;
}

.sheet-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--p4p-gold);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-qty-num {
  padding: 0 0.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--p4p-cream);
}

.sheet-add-submit-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--p4p-gold) 0%, #b28e36 100%);
  color: #040907;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
}

.sheet-add-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — HEADER & TOP STRIP (768px & below)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Top strip: hide verbose right section */
  .top-strip-right {
    display: none;
  }
  .p4p-top-strip {
    justify-content: center;
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    text-align: center;
  }

  /* Header: tighten layout */
  .p4p-header-inner {
    gap: 0.75rem;
    height: auto;
    padding: 0.6rem 0;
  }

  /* Logo: hide tagline on small tablets */
  .p4p-logo-sub {
    display: none;
  }
  .p4p-logo-title {
    font-size: 1.05rem;
  }
  .p4p-logo-img {
    width: 40px;
    height: 40px;
  }

  /* Branch trigger: condense text */
  .branch-current-name {
    max-width: 110px;
    font-size: 0.78rem;
  }
  .branch-current-mode {
    font-size: 0.6rem;
  }

  /* Header actions: drop "Reserve Table" link */
  .header-action-link[title="Dine-in Reservations & Brand Site"] {
    display: none;
  }
  .header-action-link[title="Full Menu"] span:first-child {
    display: none;
  }

  /* Header actions: reduce gap */
  .header-actions {
    gap: 0.5rem;
  }
  .header-action-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
  }
  .header-cart-btn {
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
    gap: 0.4rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — HEADER SEARCH (640px & below = full mobile)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  /* Header: switch to two-row layout */
  .p4p-header-inner {
    flex-wrap: wrap;
    padding: 0.5rem 0;
    gap: 0.5rem;
    height: auto;
  }

  /* Row 1: logo + cart */
  .p4p-brand-group {
    flex: 1;
  }
  .header-actions {
    flex-shrink: 0;
  }

  /* Row 2: full-width search below */
  .header-search-bar {
    order: 10;
    max-width: 100%;
    flex: 0 0 100%;
    width: 100%;
  }
  .header-search-bar input {
    font-size: 0.85rem;
  }

  /* Top strip: single line scroll */
  .top-strip-left {
    flex-wrap: nowrap;
    overflow: hidden;
    font-size: 0.75rem;
    gap: 0.5rem;
  }

  /* Product grid: single column */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Product card: horizontal on mobile */
  .product-card {
    flex-direction: row;
    height: auto;
    min-height: 110px;
  }
  .product-card-img-wrap {
    width: 120px;
    min-width: 120px;
    aspect-ratio: unset;
    height: auto;
    min-height: 110px;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    flex-shrink: 0;
  }
  .product-card-body {
    padding: 0.85rem;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .product-card-title {
    font-size: 0.88rem;
  }
  .product-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.77rem;
  }
  .product-card-footer {
    margin-top: 0.5rem;
  }
  .product-badge-overlay {
    top: 0.5rem;
    left: 0.5rem;
  }

  /* Menu filter bar: horizontal scroll */
  .menu-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding: 0.6rem 0.75rem;
    scrollbar-width: none;
    gap: 0.5rem;
  }
  .menu-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .menu-filter-bar > span {
    display: none;
  }

  /* Branch trigger: hide label text on mobile, keep icon + name only */
  .p4p-branch-trigger {
    padding: 0.35rem 0.65rem;
  }
  .branch-info-text {
    display: none;
  }

  /* Modal card: full screen */
  .p4p-modal-card {
    padding: 1.2rem;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — CATEGORY RAIL (hide on <1024px, show pills instead)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .category-left-rail {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — LANDING PAGE HERO (Grid & Media Wrap)
   ═══════════════════════════════════════════════════════════════════ */

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .landing-hero-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 2.2rem;
    align-items: center;
    text-align: center;
  }
  .landing-hero-media-wrap {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .landing-hero {
    padding: 2.5rem 0 3.5rem !important;
  }
}

/* Extra Compact Phones (380px and below) */
@media (max-width: 380px) {
  .product-card-img-wrap {
    width: 95px !important;
    min-width: 95px !important;
    min-height: 95px !important;
  }
  .product-card-title {
    font-size: 0.82rem !important;
  }
  .price-main {
    font-size: 0.95rem !important;
  }
  .product-add-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.76rem !important;
  }
  .p4p-logo-img {
    width: 38px !important;
    height: 38px !important;
  }
  .p4p-logo-title {
    font-size: 0.95rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — POLICY PAGE SECTIONS (640px & below)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  /* Policy page contact CTA */
  .policy-contact-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .policy-contact-btns a {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL UTILITY — Safe area for iOS notch/home bar
   ═══════════════════════════════════════════════════════════════════ */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .p4p-cart-drawer,
  .customise-sheet-card,
  .sheet-bottom-bar {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

