:root {
    --p4-primary: var(--cardapio-primaria, #b91c1c);
    --p4-bg     : var(--cardapio-fundo, #f6f7f9);
    --p4-card   : var(--cardapio-card, #fff);
    --p4-text   : var(--cardapio-texto, #1f2937);
    --p4-radius : var(--cardapio-raio, 16px)
}

* {
    box-sizing: border-box
}

.p4-page {
    min-height    : 100vh;
    background    : var(--p4-bg);
    color         : var(--p4-text);
    font-family   : var(--cardapio-fonte-textos, Arial, sans-serif);
    padding-bottom: 105px
}

.p4-container {
    width : min(1100px, calc(100% - 28px));
    margin: auto
}

.p4-topbar {
    height       : 66px;
    background   : #fff;
    border-bottom: 1px solid #e5e7eb;
    position     : sticky;
    top          : 0;
    z-index      : 40
}

.p4-topbar .p4-container {
    height         : 100%;
    display        : flex;
    align-items    : center;
    justify-content: space-between
}

.p4-back,
.p4-bag {
    width          : 40px;
    height         : 40px;
    border-radius  : 50%;
    display        : grid;
    place-items    : center;
    color          : #111;
    background     : #f3f4f6;
    text-decoration: none
}

.p4-layout {
    display              : grid;
    grid-template-columns: 360px 1fr;
    gap                  : 28px;
    padding-top          : 28px
}

.p4-product {
    position     : sticky;
    top          : 94px;
    align-self   : start;
    background   : #fff;
    border-radius: var(--p4-radius);
    overflow     : hidden;
    box-shadow   : 0 8px 30px rgba(15, 23, 42, .08)
}

.p4-photo {
    aspect-ratio: 1/1;
    background  : #f3f4f6
}

.p4-photo img {
    width     : 100%;
    height    : 100%;
    object-fit: cover
}

.p4-intro {
    padding: 22px
}

.p4-category {
    text-transform: uppercase;
    font-size     : 12px;
    font-weight   : 700;
    color         : var(--p4-primary)
}

.p4-intro h1 {
    font  : 700 27px/1.15 var(--cardapio-fonte-titulos, Arial, sans-serif);
    margin: 8px 0
}

.p4-intro p {
    color         : #64748b;
    line-height   : 1.5;
    white-space   : pre-line;
    overflow-wrap : anywhere
}

.p4-base-price {
    font-weight: 800;
    font-size  : 19px;
    color      : var(--p4-primary);
    margin-top : 18px
}

.p4-options {
    display       : flex;
    flex-direction: column;
    gap           : 18px
}

.p4-group,
.p4-note {
    border       : 0;
    background   : #fff;
    border-radius: var(--p4-radius);
    padding      : 0;
    overflow     : hidden;
    box-shadow   : 0 8px 30px rgba(15, 23, 42, .06)
}

.p4-group legend {
    width          : 100%;
    padding        : 18px 20px;
    background     : #fafafa;
    border-bottom  : 1px solid #eee;
    display        : flex;
    justify-content: space-between;
    align-items    : center
}

.p4-group legend span {
    display       : flex;
    flex-direction: column;
    gap           : 3px
}

.p4-group legend small {
    color    : #64748b;
    font-size: 12px
}

.p4-group legend em {
    font-style   : normal;
    font-size    : 11px;
    font-weight  : 700;
    color        : #fff;
    background   : var(--p4-primary);
    padding      : 5px 8px;
    border-radius: 999px
}

.p4-group[data-required="0"] legend em {
    background: #94a3b8
}

.p4-choice {
    min-height     : 68px;
    padding        : 14px 20px;
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    border-bottom  : 1px solid #f0f1f3;
    cursor         : pointer;
    transition     : background-color .16s ease, box-shadow .16s ease
}

.p4-choice:hover {
    background: #fff8f7
}

.p4-choice.is-selected {
    background: #fff3f1;
    box-shadow: inset 4px 0 0 var(--p4-primary)
}

.p4-choice.is-disabled {
    cursor: not-allowed;
    opacity: .55;
    background: #f4f5f7
}

.p4-stock-group .p4-stepper {
    flex-shrink: 0
}

.p4-choice:focus-visible {
    outline       : 2px solid var(--p4-primary);
    outline-offset: -3px
}

.p4-choice.has-image {
    display              : grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap                  : 13px
}

.p4-choice-image {
    width        : 58px;
    height       : 58px;
    border-radius: 10px;
    object-fit   : contain;
    background   : #f3f4f6
}

.p4-choice:last-child {
    border-bottom: 0
}

.p4-choice>div:first-child {
    display       : flex;
    flex-direction: column;
    gap           : 4px
}

.p4-choice.has-image>.p4-choice-copy {
    display       : flex;
    flex-direction: column;
    gap           : 4px
}

.p4-choice.has-image>.p4-stepper {
    display       : flex;
    flex-direction: row;
    align-items   : center;
    white-space   : nowrap
}

.p4-choice small {
    color: var(--p4-primary)
}

.p4-choice-copy {
    min-width: 0
}

.p4-choice-description {
    color: #667085;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35
}

.p4-check input {
    position: absolute;
    opacity : 0
}

.p4-check span {
    width        : 24px;
    height       : 24px;
    border       : 2px solid #cbd5e1;
    border-radius: 50%;
    display      : block
}

.p4-check input:checked+span {
    border: 7px solid var(--p4-primary)
}

.p4-group[data-type="1 de Cada"] .p4-check span {
    border-radius: 6px
}

.p4-stepper,
.p4-order-stepper {
    display    : flex;
    align-items: center;
    gap        : 12px
}

.p4-stepper button,
.p4-order-stepper button {
    border       : 1px solid #d6d9df;
    background   : #fff;
    width        : 34px;
    height       : 34px;
    border-radius: 50%;
    font-size    : 20px
}

.p4-note {
    padding : 20px;
    position: relative
}

.p4-note label {
    display       : flex;
    flex-direction: column;
    gap           : 4px
}

.p4-note label small {
    color: #64748b
}

.p4-note textarea {
    width        : 100%;
    min-height   : 92px;
    margin-top   : 14px;
    border       : 1px solid #d8dce2;
    border-radius: 12px;
    padding      : 13px;
    resize       : vertical
}

.p4-note>span {
    font-size: 11px;
    color    : #94a3b8;
    position : absolute;
    right    : 30px;
    bottom   : 28px
}

.p4-bottom {
    position  : fixed;
    bottom    : 0;
    left      : 0;
    right     : 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index   : 50;
    padding   : 14px 0
}

.p4-bottom-inner {
    display        : flex;
    justify-content: flex-end;
    gap            : 18px
}

.p4-order-stepper {
    padding      : 0 12px;
    border       : 1px solid #e1e4e8;
    border-radius: 12px
}

.p4-add-button {
    border         : 0;
    background     : var(--p4-primary);
    color          : #fff;
    border-radius  : 12px;
    min-width      : 300px;
    padding        : 0 20px;
    height         : 58px;
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    font-weight    : 700
}

.p4-toast {
    position      : fixed;
    left          : 50%;
    bottom        : 95px;
    transform     : translate(-50%, 20px);
    background    : #111827;
    color         : #fff;
    padding       : 12px 18px;
    border-radius : 10px;
    opacity       : 0;
    pointer-events: none;
    transition    : .2s;
    z-index       : 80
}

.p4-toast.is-visible {
    opacity  : 1;
    transform: translate(-50%, 0)
}

@media(max-width:800px) {
    .p4-layout {
        grid-template-columns: 1fr;
        padding-top          : 0;
        width                : 100%
    }

    .p4-product {
        position     : static;
        border-radius: 0
    }

    .p4-photo {
        aspect-ratio: 16/10
    }

    .p4-options {
        padding: 0 14px
    }

    .p4-choice.has-image {
        grid-template-columns: 50px minmax(0, 1fr) auto;
        padding              : 11px 14px
    }

    .p4-choice-image {
        width : 50px;
        height: 50px
    }

    .p4-bottom-inner {
        width  : 100%;
        padding: 0 12px;
        gap    : 10px
    }

    .p4-add-button {
        min-width: 0;
        flex     : 1
    }

    .p4-order-stepper {
        gap: 7px
    }

    .p4-container {
        width: min(100% - 24px, 1100px)
    }
}
.p4-header-spacer {
  width : 40px;
  height: 40px;
}

.p4-back[type="button"] {
  border: 0;
}

.p4-page.is-modal {
  min-height: 100vh;
}

.p4-page.is-modal .p4-container {
  width: min(980px, calc(100% - 28px));
}

.p4-page.is-modal .p4-layout {
  grid-template-columns: 320px 1fr;
  gap                  : 22px;
  padding-top          : 22px;
}

.p4-page.is-modal .p4-product {
  top: 88px;
}

.p4-page.is-modal .p4-photo {
  aspect-ratio: 4 / 3;
  display: block;
  min-height: 220px;
  overflow: hidden;
  background: #fff;
}

.p4-page.is-modal .p4-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.p4-page.is-modal .p4-intro {
  padding: 18px;
}

.p4-page.is-modal .p4-intro h1 {
  font-size: 16px;
}

@media (max-width: 800px) {
  .p4-page.is-modal .p4-layout {
    grid-template-columns: 1fr;
    padding-top          : 0;
    width                : 100%;
  }

  .p4-page.is-modal .p4-container {
    width: min(100% - 24px, 1100px);
  }

  .p4-page.is-modal .p4-product {
    position: static;
  }

  .p4-page.is-modal .p4-photo {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}
.product-image-zoomable {
  cursor: zoom-in;
}

.product-image-zoomable:focus-visible {
  outline: 3px solid var(--cardapio-primaria, #b91c1c);
  outline-offset: 3px;
}

.product-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 15, 28, .9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.product-image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.product-image-lightbox__figure {
  width: min(960px, 100%);
  height: min(760px, calc(100vh - 56px));
  height: min(760px, calc(100dvh - 56px));
  margin: 0;
  display: grid;
  place-items: center;
}

.product-image-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.product-image-lightbox__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

body.product-image-lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 600px) {
  .product-image-lightbox {
    padding: 16px;
  }

  .product-image-lightbox__figure {
    width: 100%;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
  }

  .product-image-lightbox__image {
    border-radius: 8px;
  }
}
