/* Pizza Time v2.4 | Fluid layout, full-width hero and accessible responsive components.
   Overrides the original theme without replacing its colors, media, content or API. */
:root { --layout-gutter: clamp(18px, 4.2vw, 74px); }
html { width: 100%; min-width: 0; scroll-padding-top: 90px; }
body { width: 100%; min-width: 0; overflow-x: clip; }
#main-content, #main-content > section, .site-footer, .site-header { min-width: 0; }
:where(.section-wrap, .hero-copy, .hero-art, .product-grid, .product-card, .cart-layout > *,
       .checkout-layout > *, .info-grid > *, .promo-band > *, .site-footer > *) { min-width: 0; }
img, video { max-width: 100%; }
:where(button, input, select, textarea) { max-width: 100%; }
:where(button, a, input, select, textarea):focus-visible { outline: 3px solid #ce9c42; outline-offset: 3px; }
:where(.checkout-form input, .checkout-form select, .checkout-form textarea) { min-width: 0; }
.section-wrap { max-width: 1440px; width: 100%; padding-inline: var(--layout-gutter); }

/* Full-bleed means the actual hero background reaches both viewport edges.
   The background video/image is ABOVE the section background but BELOW text. */
#main-content > .hero {
  width: 100% !important; max-width: none !important; margin: 0 !important;
  box-sizing: border-box; min-height: clamp(540px, 72svh, 820px) !important;
  padding: clamp(72px, 9vw, 148px) var(--layout-gutter) !important;
  display: flex !important; align-items: center !important; justify-content: flex-start !important;
  position: relative !important; isolation: isolate !important; overflow: hidden !important;
  background: #2d1d18 !important;
}
#main-content > .hero .hero-art {
  position: absolute !important; inset: 0 !important; z-index: 0 !important;
  width: 100% !important; height: 100% !important; max-width: none !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important;
}
#main-content > .hero .hero-art .hero-video,
#main-content > .hero .hero-art .hero-photo {
  inset: 0 !important; width: 100% !important; height: 100% !important;
  object-fit: cover !important; object-position: center center !important;
  border: none !important; border-radius: 0 !important;
}
#main-content > .hero::before {
  z-index: 1 !important; content: '';
  background: linear-gradient(90deg, rgba(25,16,13,.92) 0%, rgba(33,20,15,.83) 30%,
              rgba(48,23,17,.42) 66%, rgba(48,23,17,.16) 100%) !important;
}
#main-content > .hero .hero-copy {
  z-index: 2 !important; position: relative !important; width: min(670px, 100%) !important;
  max-width: 670px !important; margin: 0 !important;
}
#main-content > .hero .hero-copy h1 {
  max-width: 12ch; margin-block: 22px 21px;
  font-size: clamp(46px, 6.4vw, 96px); line-height: 1.035; letter-spacing: -.045em;
  overflow-wrap: normal; word-break: normal;
}
#main-content > .hero .hero-copy > p { max-width: 48ch; font-size: clamp(14px, 1.45vw, 17px); }
#main-content > .hero .hero-detail { flex-wrap: wrap; gap: 10px 15px; }
#main-content > .hero .hero-actions { flex-wrap: wrap; gap: 16px 24px; }
#main-content > .hero .hero-art.has-video .hero-video-toggle { z-index: 4 !important; }
#main-content > .hero .hero-art:not(.has-photo):not(.has-video) .pizza-plate {
  opacity: .36; right: clamp(3%, 11vw, 17%); width: clamp(250px, 30vw, 470px); height: clamp(250px, 30vw, 470px);
}

#main-content > .hero .hero-art:not(.has-photo):not(.has-video) .art-ring,
#main-content > .hero .hero-art:not(.has-photo):not(.has-video) .art-note,
#main-content > .hero .hero-art:not(.has-photo):not(.has-video) .art-sun { display: none !important; }

/* Wider but comfortable catalog; avoid overflow and tiny controls. */
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.5vw, 22px); }
.product-card { min-width: 0; border-radius: 9px; }
.product-visual { height: clamp(140px, 14vw, 200px); }
.product-info { min-width: 0; }
.product-info h3 { overflow-wrap: break-word; }
.cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); }
.checkout-layout > form, .cart-layout > div { min-width: 0; }
.checkout-form { border-radius: 10px; }
.checkout-form input:not([type=checkbox]), .checkout-form select, .checkout-form textarea { width: 100%; max-width: 100%; }
.cart-summary { border-radius: 10px; }
.cart-item, .cart-item > *, .cart-item .qty-control { min-width: 0; }
.cart-item .qty-control { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.cart-item .quantity-direct { width: 84px; min-height: 43px; font-size: 16px; text-align: center; }
.quantity-direct::-webkit-outer-spin-button,.quantity-direct::-webkit-inner-spin-button { margin: 0; }
.availability-strip { gap: 12px; }
.site-footer { grid-template-columns: minmax(130px, 185px) minmax(180px, 1fr) auto auto; }
.site-footer > * { min-width: 0; }

@media (max-width: 1100px) {
  .site-header { gap: 16px; padding-inline: 3vw; }
  .main-nav { gap: 19px; }
  .brand { width: 173px; flex: 0 1 173px; }
  .section-wrap { max-width: 100%; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promo-band { padding: 40px var(--layout-gutter); gap: clamp(26px, 5vw, 70px); }
  .site-footer { grid-template-columns: minmax(130px, 180px) 1fr auto; }
  .footer-credit { grid-column: 2 / -1; }
}

/* Tablet: navigation stays usable and order summary moves below the checkout. */
@media (max-width: 900px) {
  .site-header { height: 76px; padding-inline: 22px; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    padding: 12px 22px 20px; gap: 0; background: var(--cream);
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 18px #201e1b18;
    z-index: 30;
  }
  .main-nav.open { display: grid; }
  .main-nav a { min-height: 44px; display: flex; align-items: center; font-size: 14px; }
  .nav-toggle { display: inline-grid; place-items: center; width: 44px; min-width: 44px;
    height: 44px; border-radius: 7px; cursor: pointer; }
  .site-header .header-cart { margin-left: auto; }
  .brand { width: 176px; flex: 0 1 176px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .cart-summary { position: static; }
  .checkout-layout .cart-summary { grid-row: auto; }
  .info-grid { gap: 22px; }
  .info-grid > div { padding-inline: 22px; }
  .promo-band { grid-template-columns: minmax(180px, .8fr) 1fr; }
}

@media (max-width: 680px) {
  :root { --layout-gutter: clamp(16px, 5vw, 24px); }
  html { scroll-padding-top: 76px; }
  .site-header { height: 70px; gap: 7px; padding-inline: var(--layout-gutter); }
  .brand { width: clamp(112px, 35vw, 154px); flex-basis: clamp(112px, 35vw, 154px); }
  .header-cart { height: 43px; padding: 0 11px; gap: 6px; }
  .header-cart .cart-glyph { font-size: 17px; }
  .nav-toggle { width: 42px; min-width: 42px; }
  .install-app-button { max-width: 108px; }
  #main-content > .hero {
    width: 100% !important; max-width: none !important;
    min-height: clamp(530px, 78svh, 750px) !important;
    padding: 64px var(--layout-gutter) 78px !important;
    justify-content: flex-start !important; align-items: center !important;
  }
  #main-content > .hero::before {
    background: linear-gradient(90deg,rgba(24,15,13,.88) 0%,rgba(24,15,13,.66) 65%,rgba(24,15,13,.48) 100%),
      linear-gradient(0deg,rgba(23,15,13,.50),transparent 45%) !important;
  }
  #main-content > .hero .hero-copy { width: 100% !important; max-width: 100% !important; }
  #main-content > .hero .hero-copy h1 { font-size: clamp(43px, 11vw, 66px); max-width: 11ch;
    letter-spacing: -.045em; margin-block: 17px 18px; }
  #main-content > .hero .hero-copy > p { font-size: 15px; line-height: 1.65; max-width: 38ch; }
  #main-content > .hero .hero-actions { align-items: center; gap: 15px 19px; }
  #main-content > .hero .hero-detail { margin-top: 28px; }
  #main-content > .hero .hero-art .hero-photo,
  #main-content > .hero .hero-art .hero-video { object-position: 55% center !important; }
  #main-content > .hero .hero-art:not(.has-photo):not(.has-video) .pizza-plate { right: -25%; opacity: .24; }
  .availability-strip { flex-wrap: wrap; padding: 12px var(--layout-gutter); min-height: 0; }
  .availability-address { width: 100%; margin-left: 19px; }
  .menu-section { padding-top: 55px; padding-bottom: 54px; }
  .section-heading { gap: 12px; align-items: flex-start; }
  .section-heading h2,.info-grid h2 { font-size: clamp(29px, 8vw, 38px); }
  .desktop-link { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .product-visual { height: clamp(122px, 35vw, 180px); }
  .product-info { padding: 13px 11px; }
  .product-info h3 { font-size: clamp(15px, 4vw, 18px); }
  .page-intro { padding-top: 45px; padding-bottom: 25px; }
  .page-intro h1 { font-size: clamp(36px, 10vw, 50px); line-height: 1.13; letter-spacing: -.045em; }
  .category-tabs { width: 100%; padding-inline: var(--layout-gutter); scroll-snap-type: x proximity; }
  .category-tabs a { scroll-snap-align: start; }
  .cart-layout, .checkout-layout { padding-bottom: 50px; }
  .cart-item { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .cart-item .qty-control > button { min-width: 42px; min-height: 42px; }
  .checkout-form { padding: 20px 16px; }
  .checkout-form input:not([type=checkbox]), .checkout-form select,
  .checkout-form textarea { font-size: 16px; min-height: 46px; }
  .checkout-form label { font-size: 13px; }
  .checkout-form :is(.consent-row,.payment-options) { min-width: 0; }
  .checkout-form button[type=submit] { width: 100%; min-height: 50px; }
  .promo-band { grid-template-columns: minmax(0, 1fr); gap: 19px;
    padding: 45px var(--layout-gutter); }
  .promo-band > img { max-width: 320px; margin-inline: auto; }
  .info-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 55px; }
  .info-grid > div { padding-inline: 16px; }
  .info-grid > div + div { margin-top: 0; }
  .restaurant-photo { padding-inline: var(--layout-gutter); }
  .site-footer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 19px 12px; padding: 30px var(--layout-gutter) calc(35px + env(safe-area-inset-bottom)); }
  .site-footer .footer-brand { max-width: 165px; }
  .site-footer .footer-credit { grid-column: 1/-1; }
  .site-footer .footer-copy { font-size: 12px; }
  .mobile-cart { bottom: calc(9px + env(safe-area-inset-bottom)); }
  .confirmation { padding-top: 56px; padding-bottom: 67px; }
  .confirmation h1 { font-size: clamp(34px, 9vw, 46px); }
}

@media (max-width: 420px) {
  #main-content > .hero { padding-bottom: 88px !important; }
  .hero-actions .button { min-width: 145px; }
  .hero-actions .text-link { line-height: 1.4; }
  .site-header .header-cart { padding: 0 8px; font-size: 11px; }
  .site-header .header-cart .cart-glyph { display: none; }
  .install-app-button { font-size: 10px; }
  .cart-item { grid-template-columns: minmax(0, 1fr); }
  .cart-item .item-total { justify-self: start; }
  .cart-item .qty-control { gap: 6px; }
  .cart-item .quantity-direct { width: 73px; }
  .site-footer { grid-template-columns: minmax(0, 1fr); }
  .site-footer .footer-credit { grid-column: 1; }
  .site-footer .footer-links { justify-self: start; }
}

@media (max-width: 350px) {
  .brand { width: 110px; flex-basis: 110px; }
  #main-content > .hero .hero-copy h1 { font-size: 40px; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .product-visual { height: 185px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy, .product-card { animation: none !important; }
  .hero .hero-art .hero-video { animation: none !important; }
}
