/*
 * The product detail popup (#productModal), on every page.
 *
 * The existing site only has this popup on the menu and checkout pages, where
 * landingpage.css / checkout.css style it (their copies are identical). Here
 * the header search opens it from any page, so those rules are copied out
 * verbatim and linked globally. Every rule is scoped to #productModal, so
 * nothing leaks onto the page behind; on Home and Checkout the page sheet
 * repeats the same rules and changes nothing.
 */

/* Above the sticky header (999999), as landingpage.css does for all modals. */
#productModal.modal.show {z-index: 9999999;}
body:has(#productModal.show) .modal-backdrop.show {z-index: 999999;}

/* The --m-* palette, scoped to the popup instead of :root. */
#productModal {
  --m-brand: #e8472a;
  --m-brand-dark: #c73a20;
  --m-brand-light: #fff2ef;
  --m-ink: #111827;
  --m-muted: #6b7280;
  --m-border: #f0f0f0;
  --m-bg: #fafafa;
  --m-white: #ffffff;
  --m-radius: 24px;
  --m-radius-sm: 12px;
  --m-radius-xs: 8px;
  --m-shadow: 0 24px 64px rgba(0, 0, 0, .16), 0 4px 16px rgba(0, 0, 0, .08);
}
#productModal {padding: 0 !important;}
#productModal .modal-dialog {margin: auto !important; width: 100% !important;}
#productModal .modal-content {border: none !important; border-radius: var(--m-radius) !important; box-shadow: var(--m-shadow) !important; overflow: hidden; max-height: calc(100dvh - 1.5rem); display: flex; flex-direction: column; background: var(--m-white);}
#productModal .btn-close {width: 22px !important; height: 22px !important; background-color: var(--m-white) !important; border-radius: 50% !important; opacity: 1 !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .14) !important; top: 0px !important; right: 0px !important; z-index: 20; transition: transform .15s;}
#productModal .btn-close:hover {transform: scale(1.1);}
#productModal .btn-close:focus { box-shadow: none !important; outline: none;}
#productModal .modal-body {flex: 1 1 auto; overflow: hidden; padding: 0 !important;}
#productModal .row.g-0 {height: 100%; min-height: 0;}
#productModal .col-lg-5 {position: relative;}
#productModal .product-image-wrapper {position: relative; background: #e5e7eb; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden;}
#productModal #modalProductImage {max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply;}
#productModal .image-overlay {position: absolute; inset: 0; background: linear-gradient(160deg,transparent 40%,rgba(0, 0, 0, .28) 100%);pointer-events: none;}
#productModal .col-lg-7 {display: flex; flex-direction: column; max-height: calc(100dvh - 1.5rem - 88px); min-height: 0; overflow: hidden;}
#productModal .product-details-wrapper {flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 28px 28px 32px !important; scrollbar-width: thin; scrollbar-color: #e0e0e0 transparent;}
#productModal .product-details-wrapper::-webkit-scrollbar {width: 3px;}
#productModal .product-details-wrapper::-webkit-scrollbar-thumb {background: #e0e0e0; border-radius: 4px;}
#productModal .product-header {margin-bottom: 14px !important;}
#productModal .product-title {font-family: 'Syne', sans-serif !important; font-size: 1.5rem !important; font-weight: 700 !important; color: var(--m-ink) !important; line-height: 1.25 !important; margin-bottom: 6px !important;}
#productModal .product-price {font-size: 1.35rem !important; font-weight: 700 !important; color: var(--m-brand) !important; letter-spacing: -.3px;}
#productModal .product-description {font-size: .875rem !important; color: var(--m-muted) !important; line-height: 1.6 !important; margin-bottom: 0 !important; padding-bottom: 16px; border-bottom: 1px solid var(--m-border);}
#productModal .modifier-groups-container {margin-bottom: 12px !important;}
#productModal .modifier-group-wrapper {margin-bottom: 0;}
#productModal .modifier-group-wrapper > hr {border: none; border-top: 1px solid var(--m-border); margin: 14px 0 10px;}
#productModal .modifier-group-wrapper h6 {font-family: 'Syne', sans-serif; font-size: .92rem; font-weight: 700; color: var(--m-ink); margin-bottom: 2px !important; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;}
#productModal .modifier-group-wrapper small.text-muted {font-size: .75rem !important; color: var(--m-muted) !important; display: block; margin-bottom: 8px;}
#productModal span.required {font-size: .65rem; font-weight: 700; background: var(--m-brand); color: #fff; padding: 2px 8px; border-radius: 20px; letter-spacing: .4px; text-transform: uppercase;}
#productModal .form-check {display: flex !important; align-items: center !important; justify-content: space-between !important; flex-direction: row-reverse !important; padding: 11px 14px !important; margin: 0 0 5px !important; border-radius: var(--m-radius-xs) !important; background: var(--m-bg) !important; border: 1.5px solid transparent !important; cursor: pointer; transition: border-color .14s, background .14s, box-shadow .14s;}
#productModal .form-check:hover {border-color: #e0e0e0 !important; background: #f3f3f3 !important;}
#productModal .form-check:has(input:checked) {border-color: var(--m-brand) !important; background: var(--m-brand-light) !important; box-shadow: 0 0 0 3px rgba(232, 71, 42, .07);}
#productModal .form-check-label {font-size: .875rem !important; font-weight: 500 !important; color: var(--m-ink) !important; cursor: pointer !important; flex: 1; line-height: 1.4; padding-left: 11px !important; margin: 0 !important;}
#productModal .form-check-input {width: 20px !important; height: 20px !important; flex-shrink: 0 !important; cursor: pointer !important; accent-color: var(--m-brand) !important; margin: 0 0 0 10px !important; border: 2px solid #d1d5db !important;}
#productModal .form-check-input[type="radio"] {border-radius: 50% !important;}
#productModal .form-check-input[type="checkbox"] {border-radius: 5px !important;}
#productModal .linked-group-wrapper {padding-left: 14px; border-left: 3px solid var(--m-brand); border-radius: 0 0 0 6px;}
#productModal .linked-group-wrapper .modifier-group-wrapper > hr { margin: 8px 0 8px;}
#productModal .special-instructions-wrapper {margin-top: 4px;}
#productModal .special-instructions-wrapper .form-label {font-size: .82rem !important; font-weight: 600 !important; color: var(--m-ink) !important; margin-bottom: 6px !important;}
#productModal #specialInstructions {font-size: .85rem !important; border: 1.5px solid var(--m-border) !important; border-radius: var(--m-radius-sm) !important; background: var(--m-bg) !important; resize: none !important; transition: border-color .18s, box-shadow .18s;}
#productModal #specialInstructions:focus {border-color: var(--m-brand) !important; box-shadow: 0 0 0 3px rgba(232, 71, 42, .1) !important; outline: none !important;}
#productModal .modal-footer {flex-shrink: 0 !important; border-top: 1px solid var(--m-border) !important; background: var(--m-white) !important; padding: 14px 22px !important; border-radius: 0 0 var(--m-radius) var(--m-radius);}
#productModal .btn-quantity {width: 38px !important; height: 38px !important; border-radius: 50% !important; border: 1.5px solid #e0e0e0 !important; background: var(--m-white) !important; color: var(--m-ink) !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; font-size: 1rem; transition: all .15s;}
#productModal .btn-quantity:hover {border-color: var(--m-brand) !important; color: var(--m-brand) !important; background: var(--m-brand-light) !important;}
#productModal .quantity-display {font-size: 1rem !important; font-weight: 700 !important; min-width: 28px; text-align: center; color: var(--m-ink);}
#productModal .btn-add-to-cart {background: var(--m-ink) !important; border: none !important; border-radius: var(--m-radius-sm) !important; font-family: 'Syne', sans-serif !important; font-size: .92rem !important; font-weight: 700 !important; letter-spacing: .3px !important; padding: 13px 24px !important; color: var(--m-white) !important; position: relative; overflow: hidden; transition: background .2s, transform .12s, box-shadow .2s; box-shadow: 0 4px 16px rgba(17, 24, 39, .2);}
#productModal .btn-add-to-cart::after {content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); transform: translateX(-100%); transition: transform .4s;}
#productModal .btn-add-to-cart:hover {background: #1f2937 !important; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(17, 24, 39, .28);}
#productModal .btn-add-to-cart:hover::after {transform: translateX(100%);}
#productModal .btn-add-to-cart:active { transform: translateY(0);}
@media (min-width: 768px) {
  #productModal .modal-dialog {display: flex !important; align-items: center !important; min-height: calc(100% - 1.5rem) !important; margin: 0.75rem auto !important;}
  #productModal .modal-content {width: 100% !important;}
  #productModal .col-lg-5 {position: relative !important; min-height: 460px !important;}
  #productModal .row.g-0 {min-height: 460px !important; align-items: stretch !important;}
}
@media (max-width: 767.98px) {
  #productModal .modal-dialog {margin: 0 !important; max-width: 100% !important; width: 100% !important; min-height: 100% !important; align-items: flex-end !important;}
  #productModal .modal-content {border-radius: 22px 22px 0 0 !important; max-height: 93 dvh !important;width: 100%;}
  #productModal .col-lg-5 {width: 100%;}
  #productModal .col-lg-7 {width: 100%; max-height: calc(93dvh - 210px - 76px) !important;}
  #productModal .product-details-wrapper {padding: 18px 18px 96px !important;}
  #productModal .product-title {font-size: 1.2rem !important;}
  #productModal .product-price {font-size: 1.15rem !important;}
  #productModal .modal-footer {padding: 12px 16px !important;}
  #productModal .btn-add-to-cart {font-size: .85rem !important; padding: 12px 16px !important;}
  #productModal .modal-footer > .d-flex {display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 10px !important;}
  #productModal .btn-add-to-cart {flex: 1 1 auto !important; width: auto !important; white-space: nowrap; min-width: 0;}
}
@media (min-width: 992px) {
  #productModal .modal-content {max-height: 88 dvh !important;}
  #productModal .col-lg-7 {max-height: calc(88dvh - 88px) !important;}
  #productModal .row.g-0 {height: calc(88dvh - 1.5rem - 88px);}
}
#productModal .cashback-badge-modal {display: inline-block; background: linear-gradient(135deg, #ff512f, #dd2476); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 30px; margin: 6px 0; letter-spacing: 0.5px; box-shadow: 0 4px 10px rgba(221, 36, 118, 0.25); animation: pulseBogof 1.8s infinite; text-transform: uppercase;}
