/* Site-wide responsive polish — mobile-first overrides */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img,
video {
  height: auto;
}

/* ── Large tablet / small laptop ── */
@media (max-width: 1280px) {
  .primary-nav {
    gap: 0.65rem;
    font-size: 0.86rem;
  }

  .header-cart,
  .nav-cta {
    padding-inline: 0.75rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1024px) {
  .category-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
  }

  .footer-meta {
    flex-wrap: wrap;
  }

  .hero-video-copy h1 {
    max-width: 16ch;
  }
}

/* ── Tablet portrait ── */
@media (max-width: 768px) {
  .section {
    padding: 1rem 0 2.25rem;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .section-heading .button {
    width: 100%;
    justify-content: center;
  }

  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .category-card {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .page-hero-section,
  .menu-section,
  .product-page-section,
  .cart-section,
  .checkout-section,
  .content-section,
  .success-section {
    padding: 1.35rem 0 2.25rem;
  }

  .page-hero-copy {
    padding: 1.65rem;
  }

  .page-hero-copy h1 {
    font-size: clamp(1.85rem, 6vw, 2.6rem);
  }

  .menu-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .results-count {
    font-size: 0.88rem;
  }

  .product-card-media {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .product-card-media img {
    height: 100%;
  }

  .product-card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .product-card-actions .button-ghost {
    justify-content: center;
    padding: 0.48rem 0.5rem;
    border: 1px solid rgba(41, 41, 41, 0.1);
    border-radius: 999px;
    min-height: 36px;
  }

  .cart-item {
    grid-template-columns: 88px 1fr;
    gap: 0.85rem;
  }

  .cart-item img {
    width: 88px;
    height: 88px;
    object-fit: contain;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .success-grid {
    grid-template-columns: 1fr;
  }

  .content-split {
    grid-template-columns: 1fr;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .buffet-contact-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .buffet-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 0.35rem;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
    scrollbar-width: none;
  }

  .buffet-tabs::-webkit-scrollbar {
    display: none;
  }

  .buffet-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .buffet-panel {
    border-radius: 22px;
  }

  .buffet-panel-hero-copy {
    padding: 1.15rem 1.25rem;
  }

  .posts-showcase-head .button {
    width: 100%;
    justify-content: center;
  }
}

/* ── Mobile navigation: see mobile-nav.css ── */

/* ── Phone ── */
@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .notice-content {
    gap: 0.65rem;
  }

  .notice-copy p {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .notice-button {
    width: 100%;
    justify-content: center;
  }

  .main-nav {
    padding: 0.85rem 0;
    min-height: auto;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .header-cart {
    min-height: 40px;
    padding: 0.42rem 0.72rem;
    font-size: 0.8rem;
  }

  .nav-cta {
    min-height: 40px;
    padding: 0.42rem 0.85rem;
    font-size: 0.82rem;
  }

  .cart-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.68rem;
  }

  .category-strip,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-card:not(.category-card--carousel) {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 0.65rem 0.85rem;
    padding: 1rem 1.05rem;
  }

  .category-card:not(.category-card--carousel) img {
    grid-row: 1;
    grid-column: 1;
    width: 56px;
    height: 56px;
  }

  .category-card:not(.category-card--carousel) strong {
    grid-row: 1;
    grid-column: 2;
    align-self: center;
    font-size: 1.02rem;
    line-height: 1.25;
  }

  .category-card:not(.category-card--carousel) span {
    grid-row: 2;
    grid-column: 1 / -1;
    display: block;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--muted);
  }

  .product-card-actions {
    grid-template-columns: 1fr;
  }

  .product-card-actions .button-ghost {
    border: 0;
    padding: 0.35rem 0;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row .button {
    width: 100%;
    justify-content: center;
  }

  .mini-meta {
    gap: 0.55rem;
  }

  .mini-meta .pill {
    font-size: 0.8rem;
    min-height: 32px;
    padding: 0.4rem 0.75rem;
  }

  .hero-video-banner {
    min-height: 520px;
    border-radius: 0 0 22px 22px;
    margin-bottom: 0.25rem;
  }

  .hero-video-content {
    min-height: 520px;
    align-items: flex-end;
    padding-bottom: 2rem;
  }

  .hero-video-copy h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    max-width: none;
    line-height: 1.08;
  }

  .hero-video-copy p {
    font-size: 0.94rem;
  }

  .hero-video-logo {
    height: 36px;
    margin-bottom: 0.75rem;
  }

  .posts-card {
    width: clamp(150px, 42vw, 190px);
    height: clamp(220px, 58vw, 280px);
    border-radius: 18px;
  }

  .posts-showcase-head h2,
  .buffet-head h2 {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
  }

  .posts-subheading,
  .buffet-subheading {
    font-size: 0.92rem;
  }

  .buffet-price-chip {
    font-size: 0.82rem;
  }

  .buffet-column h4 {
    font-size: 0.82rem;
  }

  .buffet-column li {
    font-size: 0.84rem;
  }

  .menu-panel-grid {
    grid-template-columns: 1fr;
  }

  .menu-card {
    grid-template-columns: 48px 1fr;
    padding: 0.55rem 0.65rem;
  }

  .breadcrumbs {
    width: 100%;
    border-radius: 14px;
    font-size: 0.84rem;
  }

  .category-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0.55rem;
    padding-bottom: 0.35rem;
    margin-inline: -0.15rem;
    padding-inline: 0.15rem;
    scrollbar-width: none;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .category-filters .pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .product-gallery-main {
    min-height: 280px;
  }

  .product-gallery-main img {
    max-height: 260px;
  }

  .product-info h1 {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
  }

  .qty-row {
    flex-wrap: wrap;
  }

  .cart-item {
    grid-template-columns: 72px 1fr;
  }

  .cart-item img {
    width: 72px;
    height: 72px;
  }

  .cart-item-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-actions {
    width: 100%;
  }

  .cart-actions .button {
    flex: 1 1 auto;
    min-width: 0;
  }

  .summary-card,
  .cart-table,
  .form-card,
  .product-gallery,
  .product-info {
    padding: 1.15rem;
    border-radius: 20px;
  }

  .success-card,
  .empty-state {
    padding: 1.35rem;
    border-radius: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding-bottom: 1.5rem;
  }

  .footer-column h2 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
  }

  .footer-column a {
    font-size: 0.88rem;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
    padding: 1.25rem 0;
  }

  .footer-social {
    gap: 0.65rem;
  }

  .footer-apps {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-bottom {
    gap: 0.85rem;
  }

  .footer-legal {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .footer-legal a {
    line-height: 1.4;
  }

  .footer-copy {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .content-card {
    padding: 1.25rem;
    border-radius: 20px;
  }

  .content-card h2 {
    font-size: 1.12rem;
  }
}

/* ── Small phone ── */
@media (max-width: 390px) {
  .brand-logo {
    max-width: 140px;
    height: 32px;
  }

  .nav-cta {
    padding-inline: 0.75rem;
  }

  .hero-video-banner,
  .hero-video-content {
    min-height: 480px;
  }

  .posts-card {
    width: 140px;
    height: 210px;
  }
}

/* ── Touch & accessibility ── */
@media (hover: none) and (pointer: coarse) {
  .button,
  .nav-link,
  .menu-card,
  .buffet-tab,
  .pill,
  .category-card,
  .product-card {
    min-height: 44px;
  }

  .category-card:hover,
  .product-card:hover,
  .content-card:hover,
  .menu-card:hover {
    transform: none;
  }

  .posts-marquee:hover .posts-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .posts-marquee-track {
    animation: none;
  }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  .site-header .main-nav-wrapper,
  .site-footer {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .site-footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}
