/* Fixes from the 2 Dec 2026 walk-through (owner: "do all except 5 and 6 ... 8 fix, 9 fix, 10 fix ... and the other").
   Loaded last on every page by inc/fixes.php. Each block names the fault it fixes. */

/* ---- 1. Product pages on phones: the bar that follows the visitor was wider than the screen (437 px on 390), so its
   Add to cart button was off the edge. The size box and the button now share the width; the bar's own quantity
   stepper is left out on phones (the quantity is set in the buy box above). ---- */
@media (max-width: 768px) {
  html body.single-product div.popup:not(#cm) .inner:not(#cm) { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; padding: 10px 12px !important; box-sizing: border-box !important; width: 100% !important; max-width: 100vw !important; }
  html body.single-product div.popup:not(#cm) .left:not(#cm) { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; margin: 0 !important; }
  html body.single-product div.popup:not(#cm) .left .select:not(#cm), html body.single-product div.popup:not(#cm) .left .fake-select:not(#cm) { width: 100% !important; min-width: 0 !important; }
  html body.single-product div.popup:not(#cm) .right:not(#cm) { flex: 0 1 auto !important; width: auto !important; min-width: 0 !important; max-width: 54% !important; margin: 0 !important; }
  html body.single-product div.popup:not(#cm) .right .quantity:not(#cm):not(#cm) { display: none !important; }
  html body.single-product div.popup:not(#cm) .right .btn.submit:not(#cm):not(#cm) { position: static !important; display: flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; min-width: 0 !important; max-width: none !important; height: auto !important; min-height: 52px !important; padding: 8px 18px !important; margin: 0 !important; white-space: normal !important; text-align: center !important; font-size: 11.5px !important; line-height: 1.35 !important; letter-spacing: .14em !important; }
  html body.single-product div.popup:not(#cm) .right .btn.submit:not(#cm) .price, html body.single-product div.popup:not(#cm) .right .btn.submit:not(#cm) .cm-arr { display: none !important; }
}
/* ---- 2. Shop first screen on phones: the row of names made the whole block wider than the screen, so the headline
   and the price sentence ran off the right edge (worst in Italian). ---- */
@media (max-width: 760px) {
  html body .cmw { max-width: 100vw !important; overflow-x: clip !important; }
  html body .cmw > * { min-width: 0 !important; max-width: 100vw !important; box-sizing: border-box !important; }
  html body .cmw-top { width: 100% !important; }
  html body .cmw-ticks { width: 100% !important; min-width: 0 !important; }
  html body .cmw-names { width: 100% !important; min-width: 0 !important; }
  html body .cmw-foot { grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; }
  html body .cmw-foot > * { min-width: 0 !important; }
  html body .cmw-foot h2 { font-size: clamp(25px, 7.6vw, 34px) !important; overflow-wrap: break-word !important; }
  html body .cmw-price { max-width: 100% !important; overflow-wrap: break-word !important; }
  html body .cmw-price b { font-size: clamp(22px, 6.6vw, 28px) !important; }
}

/* ---- 4. Home and Taste Matcher on computers: the "Buy ... caviar" button sat on top of the chart's corner. It now
   sits under the caviar's headline, beside the description. ---- */
@media (min-width: 768px) {
  html body [data-eggs_radar] [data-eggs_radar_meta] a.radar-caviar-cta { position: relative !important; display: inline-flex !important; inset: auto !important; transform: none !important; margin: 6px 0 0 !important; }
}

/* ---- Home on phones: "The Pinnacle of Caviar Excellence" (and each caviar's line) showed twice, one screen apart.
   The taste chart keeps its button; the repeated headline is left out there. ---- */
@media (max-width: 767px) {
  html body.home [data-eggs_radar] [data-eggs_radar_meta] h4 { display: none !important; }
}

/* ---- 8. Bag page: "Proceed to checkout" first and the only solid button; "Continue shopping" a quiet link. ---- */
html body.woocommerce-cart .checkout-buttons-wrap { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 18px !important; }
html body.woocommerce-cart .checkout-buttons-wrap > a.checkout-button { order: -1 !important; margin: 0 !important; }
html body.woocommerce-cart .checkout-buttons-wrap > a.btn:not(.checkout-button):not(#cm):not(#cm) { align-self: center !important; width: auto !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 4px 0 6px !important; background: none !important; border: 0 !important; border-bottom: 1px solid rgba(0, 14, 52, .45) !important; box-shadow: none !important; color: #000E34 !important; font: 500 12px/1.4 "Jost", sans-serif !important; letter-spacing: .2em !important; text-transform: uppercase !important; }
html body.woocommerce-cart .checkout-buttons-wrap > a.btn:not(.checkout-button):not(#cm):not(#cm)::before,
html body.woocommerce-cart .checkout-buttons-wrap > a.btn:not(.checkout-button):not(#cm):not(#cm)::after,
html body.woocommerce-cart .checkout-buttons-wrap > a.btn:not(.checkout-button):not(#cm):not(#cm) .cm-arr { display: none !important; }
html body.woocommerce-cart .cart_totals table:not(#cm) th, html body.woocommerce-cart .cart_totals table:not(#cm) td { font-family: "Jost", sans-serif !important; }
html body.woocommerce-cart .cart_totals table:not(#cm):not(#cm) th { font-family: "Jost", sans-serif !important; font-weight: 500 !important; font-size: 12px !important; letter-spacing: .18em !important; text-transform: uppercase !important; color: rgba(0, 14, 52, .7) !important; }
html body.woocommerce-cart .cart_totals table:not(#cm):not(#cm) td::before { font: 500 12px/1.6 "Jost", sans-serif !important; letter-spacing: .18em !important; text-transform: uppercase !important; color: rgba(0, 14, 52, .7) !important; }
html body.woocommerce-cart .cart_totals .order-total td, html body.woocommerce-cart .cart_totals .order-total td strong { font: 400 24px/1.2 "Bodoni Moda", Georgia, serif !important; color: #000E34 !important; }

@media (min-width: 769px) { html body.woocommerce-cart .checkout-buttons-wrap { align-items: flex-start !important; } html body.woocommerce-cart .checkout-buttons-wrap > a.btn:not(.checkout-button):not(#cm):not(#cm) { align-self: flex-start !important; } }

/* ---- 9. Checkout in the house look (same fields, same order, same payment methods). ---- */
html body.woocommerce-checkout main .woocommerce > .container { max-width: 1180px !important; }
html body.woocommerce-checkout main h1 { font: 400 clamp(30px, 4vw, 44px)/1.1 "Bodoni Moda", Georgia, serif !important; color: #000E34 !important; margin-bottom: 22px !important; }
html body.woocommerce-checkout main h3, html body.woocommerce-checkout #order_review_heading { font: 400 26px/1.2 "Bodoni Moda", Georgia, serif !important; color: #000E34 !important; margin: 26px 0 16px !important; }
html body.woocommerce-checkout .woocommerce-info { margin: 0 0 12px !important; padding: 14px 16px !important; background: #FBF7EE !important; border: 1px solid rgba(194, 163, 107, .5) !important; border-top: 1px solid rgba(194, 163, 107, .5) !important; color: #000E34 !important; font: 400 15px/1.5 "Jost", sans-serif !important; }
html body.woocommerce-checkout .woocommerce-info::before { display: none !important; }
html body.woocommerce-checkout .woocommerce-info a { color: #000E34 !important; text-decoration: underline !important; text-underline-offset: 4px !important; }
html body.woocommerce-checkout form.checkout label, html body.woocommerce-checkout form.login label, html body.woocommerce-checkout .checkout_coupon label { font: 500 11.5px/1.4 "Jost", sans-serif !important; letter-spacing: .16em !important; text-transform: uppercase !important; color: rgba(0, 14, 52, .72) !important; }
html body.woocommerce-checkout form.checkout label.checkbox, html body.woocommerce-checkout form.checkout .woocommerce-form__label-for-checkbox, html body.woocommerce-checkout form.checkout #ship-to-different-address label, html body.woocommerce-checkout form.checkout .wc_payment_method > label { font: 400 16px/1.4 "Jost", sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; color: #000E34 !important; }
html body.woocommerce-checkout form.checkout .input-text, html body.woocommerce-checkout form.checkout select, html body.woocommerce-checkout form.checkout textarea, html body.woocommerce-checkout .checkout_coupon .input-text, html body.woocommerce-checkout form.login .input-text, html body.woocommerce-checkout .select2-container .select2-selection--single { min-height: 50px !important; background: #FFFDF8 !important; border: 1px solid rgba(0, 14, 52, .22) !important; border-radius: 0 !important; color: #000E34 !important; font: 400 16px/1.3 "Jost", sans-serif !important; box-shadow: none !important; }
html body.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered { line-height: 48px !important; color: #000E34 !important; padding-left: 12px !important; }
html body.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow { height: 48px !important; }
html body.woocommerce-checkout form.checkout .input-text:focus, html body.woocommerce-checkout form.checkout select:focus, html body.woocommerce-checkout form.checkout textarea:focus, html body.woocommerce-checkout .select2-container--open .select2-selection--single { border-color: #C2A36B !important; outline: 1px solid #C2A36B !important; outline-offset: 0 !important; }
html body.woocommerce-checkout form.checkout label .optional { font-size: inherit !important; letter-spacing: inherit !important; }
html body.woocommerce-checkout form.checkout ::placeholder { color: rgba(0, 14, 52, .42) !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table { background: #FBF7EE !important; border: 1px solid rgba(194, 163, 107, .5) !important; border-top: 2px solid #C2A36B !important; border-collapse: separate !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table th, html body.woocommerce-checkout .woocommerce-checkout-review-order-table td { background: transparent !important; border-color: rgba(0, 14, 52, .1) !important; font-family: "Jost", sans-serif !important; color: #000E34 !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th { font-weight: 500 !important; font-size: 12px !important; letter-spacing: .18em !important; text-transform: uppercase !important; color: rgba(0, 14, 52, .7) !important; }
html body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td, html body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td strong { font: 400 24px/1.2 "Bodoni Moda", Georgia, serif !important; }
html body.woocommerce-checkout #payment { background: transparent !important; }
html body.woocommerce-checkout #payment ul.payment_methods { border: 1px solid rgba(0, 14, 52, .14) !important; background: #FFFDF8 !important; padding: 6px 16px !important; }
html body.woocommerce-checkout #payment ul.payment_methods > li { padding: 14px 0 !important; border-bottom: 1px solid rgba(0, 14, 52, .08) !important; }
html body.woocommerce-checkout #payment ul.payment_methods > li:last-child { border-bottom: 0 !important; }
html body.woocommerce-checkout #payment .payment_box { margin-top: 14px !important; }
html body.woocommerce-checkout #payment .payment_box .novalnet-info-box { background: rgba(247, 243, 234, .08) !important; border-left: 2px solid #C2A36B !important; color: #F7F3EA !important; opacity: 1 !important; padding: 10px 12px !important; font: 400 14px/1.5 "Jost", sans-serif !important; }
html body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper, html body.woocommerce-checkout .woocommerce-privacy-policy-text { font: 400 14px/1.6 "Jost", sans-serif !important; color: rgba(0, 14, 52, .78) !important; }
html body.woocommerce-checkout #place_order { width: 100% !important; min-height: 56px !important; }

/* ---- 10. Footer: the cards and methods as their real logos on small white tiles, not a line of words. ---- */
html body footer .cm-foot .cm-pay { display: inline-flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: center !important; gap: 8px !important; vertical-align: middle !important; }
html body footer .cm-foot .cm-pay i { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 46px !important; height: 30px !important; background: #fff !important; border-radius: 4px !important; overflow: hidden !important; }
html body footer .cm-foot .cm-pay i img { display: block !important; max-width: 38px !important; max-height: 22px !important; width: auto !important; height: auto !important; }
html body footer .cm-foot .cm-pay i.cm-pay--wide { width: 62px !important; }
html body footer .cm-foot .cm-pay i.cm-pay--wide img { max-width: 54px !important; }
html body footer .cm-foot .cm-pay i.cm-pay--full { background: none !important; }
html body footer .cm-foot .cm-pay i.cm-pay--full img { max-width: 46px !important; max-height: 30px !important; width: 46px !important; height: 30px !important; }
@media (max-width: 768px) { html body footer .cm-foot .cm-pay { display: flex !important; width: 100% !important; margin-top: 12px !important; } }
html body footer .cm-foot .cm-pay .cm-pay-t { font: 500 11px/1 "Jost", sans-serif !important; letter-spacing: .14em !important; text-transform: uppercase !important; color: rgba(247, 243, 234, .8) !important; padding: 0 4px !important; }

/* ---- Contact on phones: the email address broke in the middle of a word. ---- */
html body .cmb a.cmb-cbig[href^="mailto:"] { font-size: min(20px, 4.4vw) !important; white-space: nowrap !important; overflow-wrap: normal !important; word-break: normal !important; }

/* ---- Journal on phones: the page was about thirty screens long. Eight cards show, then a button brings the rest
   (assets/js/fixes.js). ---- */
html body .cmb .cmb-lcard.cm-later { display: none !important; }
html body .cmb .cm-more[hidden] { display: none !important; }
html body .cmb .cm-more { display: flex !important; justify-content: center !important; margin: 26px 0 0 !important; }
html body .cmb .cm-more button { appearance: none !important; background: none !important; border: 1px solid rgba(0, 14, 52, .5) !important; padding: 15px 30px !important; color: #000E34 !important; font: 500 12px/1 "Jost", sans-serif !important; letter-spacing: .2em !important; text-transform: uppercase !important; cursor: pointer !important; }
html body .cmb .cm-more button span { opacity: .55 !important; margin-left: 8px !important; }
