/* Marco Coffee V19 — calm premium commerce flow, scoped to customer UI.
   Preserves original product imagery, prices, options, rewards and backend API. */
:root{--m19-gold:#94691f;--m19-gold-hover:#765011;--m19-charcoal:#292b2e;--m19-sand:#f8f5ef;--m19-line:#e9e4dc}
/* Product customization: vertical layout with a true, always-present action dock */
body #optionDialog{width:min(700px,calc(100vw - 32px))!important;height:min(820px,calc(100dvh - 32px))!important;max-height:calc(100dvh - 32px)!important;overflow:hidden!important;border-radius:22px!important;padding:0!important}
body #optionDialog .option-modal-inner{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important}
body #optionDialog .v19-modal-scroll{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;padding:26px 26px 18px;scrollbar-width:thin;scrollbar-color:#d0c2aa transparent}
body #optionDialog .detail-close{position:absolute!important;top:14px!important;right:14px!important;z-index:9!important;box-shadow:0 4px 14px #27252212}
body #optionDialog .option-hero-image{height:185px!important;min-height:185px!important;max-height:185px!important;border:1px solid #f0ece5!important;background:#fbfaf7!important;margin-bottom:15px!important}
body #optionDialog .option-hero-image img{max-height:170px!important}
body #optionDialog .option-modal-header{padding:0 4px;justify-content:space-between;align-items:center;flex-wrap:nowrap;gap:12px}
body #optionDialog .option-modal-header h2{font-size:clamp(23px,3vw,29px)!important;overflow-wrap:anywhere;margin:0}
body #optionDialog .option-modal-header strong{white-space:nowrap;flex-shrink:0;font-size:19px!important}
body #optionDialog .option-product-description{margin:6px 4px 8px!important;font-size:13px!important}
body #optionDialog .v17-option-heading{border-bottom:1px solid var(--m19-line);padding-bottom:12px;margin-top:3px}
body #optionDialog .option-choice{transition:background-color .17s,border-color .17s,box-shadow .17s}
body #optionDialog .option-choice:focus-within{outline:2px solid var(--m19-gold);outline-offset:2px}
body #optionDialog .option-choice.selected{box-shadow:0 0 0 1px #c39a54 inset!important}
body #optionDialog .v17-recommendations{margin-top:15px;padding-top:20px}
body #optionDialog .v17-recommendation-header h3{font-size:23px!important}
body #optionDialog .v17-recommendation-list{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;overflow:visible!important}
body #optionDialog .v17-rec-item{display:grid;grid-template-columns:26px 64px minmax(0,1fr);padding:9px 12px;min-height:84px;gap:13px;border-radius:13px;transition:background-color .16s,border-color .16s}
body #optionDialog .v17-rec-photo{width:62px;height:64px;flex:none;background:#fbfaf8}
body #optionDialog .v17-rec-text b{font-size:14px;font-family:Georgia,serif}
body #optionDialog .v17-rec-text small{font-size:11px;display:block;line-height:1.5;color:#777;max-height:2.95em;overflow:hidden}
body #optionDialog .v17-rec-text small em{display:block;margin-top:3px;color:var(--m19-gold);font:800 13px 'Segoe UI',Arial,sans-serif}
body #optionDialog .v17-rec-check>span{width:21px;height:21px;border-radius:6px}
body #optionDialog .option-modal-footer{position:relative!important;flex:0 0 auto!important;bottom:auto!important;margin:0!important;z-index:6!important;display:flex!important;gap:14px!important;align-items:center!important;justify-content:space-between!important;padding:16px 25px max(16px,env(safe-area-inset-bottom))!important;border-top:1px solid #e5dccd!important;background:#fff!important;box-shadow:0 -12px 30px rgba(39,32,17,.07)!important;backdrop-filter:none!important}
body #optionDialog .option-modal-footer .option-order-total{min-width:0!important;flex:1 1 155px!important;display:grid!important;gap:4px!important;margin:0!important}
body #optionDialog .option-modal-footer .option-order-total>span{font:600 11px/1.3 'Segoe UI',Arial,sans-serif;color:#736f69}
body #optionDialog .option-modal-footer .option-order-total strong{font-size:clamp(17px,2vw,23px)!important;color:var(--m19-gold)!important;white-space:nowrap}
body #optionDialog .option-modal-footer .qty-controls{flex:0 0 120px!important;width:120px!important;height:46px!important;background:#faf9f7;border:1px solid #e2dcd2;border-radius:12px}
body #optionDialog .option-modal-footer #optionAddBtn{flex:0 0 190px!important;width:190px!important;min-height:47px!important;background:var(--m19-gold)!important;border-radius:11px!important;font:800 13px 'Segoe UI',Arial,sans-serif!important;white-space:nowrap!important;letter-spacing:.1px}
body #optionDialog .option-modal-footer #optionAddBtn:hover{background:var(--m19-gold-hover)!important;transform:translateY(-1px)}
body #optionDialog .option-modal-footer #optionAddBtn:active{transform:translateY(0)!important}
/* Cart drawer, clear line items, prices and payment/collection action */
body .cart-drawer{width:min(445px,100vw)!important;max-width:100vw!important;background:#fff!important;box-shadow:-22px 0 60px #1c1b1b2d!important}
body .cart-drawer .drawer-header{background:linear-gradient(130deg,#2b2c2e,#39332c)!important;color:#fff!important;padding:23px 24px 20px!important}
body .cart-drawer .drawer-header small{color:#ddbd7d!important;letter-spacing:1.8px;font-weight:800}
body .cart-drawer .drawer-header h2{color:#fff!important;font:700 29px/1.1 Georgia,'Times New Roman',serif!important;margin:5px 0}
body .cart-drawer .drawer-header h2 span{color:#edd4a6;font:650 16px 'Segoe UI',sans-serif}
body .cart-drawer .v19-drawer-sub{margin:7px 0 0!important;color:#e1ddd6;font-size:11.5px;line-height:1.45}
body .cart-drawer .drawer-header .close-button{background:#ffffff1d!important;color:#fff!important;border-radius:50%;width:36px;height:36px;box-shadow:none}
body .cart-drawer .drawer-items{padding:16px!important;background:#fcfbf9!important;scrollbar-width:thin}
body .cart-drawer .cart-line{background:#fff!important;border:1px solid #ebe5dc!important;border-radius:15px!important;padding:14px!important;margin:0 0 12px!important;box-shadow:0 5px 18px #352b1610;gap:11px!important;min-width:0}
body .cart-drawer .cart-thumb{width:69px!important;height:76px!important;border-radius:10px!important;flex:0 0 69px!important;overflow:hidden;background:#faf7f2}
body .cart-drawer .cart-thumb img{width:100%;height:100%;object-fit:contain}
body .cart-drawer .cart-line h4{font:700 16px/1.25 Georgia,serif!important;margin:2px 0 5px;color:#2b2a28}
body .cart-drawer .cart-line strong{color:var(--m19-gold)!important;font-weight:800}
body .cart-drawer .cart-choice-label{color:#777;font-size:11px!important;line-height:1.5}
body .cart-drawer .drawer-footer{padding:20px 23px max(20px,env(safe-area-inset-bottom))!important;border-top:1px solid #e9e0d4!important;background:#fff!important;box-shadow:0 -10px 27px #3024110e}
body .cart-drawer .drawer-footer .price-line{font-size:13px}
body .cart-drawer .drawer-footer .price-line strong{color:#252525;font-size:20px}
body .cart-drawer #checkoutBtn{background:var(--m19-gold)!important;color:#fff!important;min-height:52px;border-radius:11px!important;font:800 14px 'Segoe UI',Arial,sans-serif!important;letter-spacing:0;display:flex;gap:9px}
body .cart-drawer #checkoutBtn:hover:not(:disabled){background:var(--m19-gold-hover)!important}
body .cart-drawer #continueShopping{color:var(--m19-gold)!important;font-weight:750}
body .cart-drawer .qty-controls{background:#faf9f7;border:1px solid #eee2d2;border-radius:9px}
body .cart-drawer .qty-controls button{border:0!important;background:transparent!important;color:var(--m19-gold)!important}
/* Checkout: easier to inspect line items and payable total */
body #checkoutDialog .v19-checkout-detail{border:1px solid #e8dfd0;background:#fff;border-radius:12px;margin:18px 0 12px;padding:15px}
body #checkoutDialog .v19-checkout-detail h3{font:700 17px/1.3 Georgia,serif!important;color:#2c2b29;margin:0 0 11px}
body #checkoutDialog .v19-checkout-row{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-top:1px solid #f0ece5;padding:10px 0;min-width:0}
body #checkoutDialog .v19-checkout-row:first-child{border-top:0;padding-top:0}
body #checkoutDialog .v19-checkout-row>div{min-width:0;display:grid;gap:3px}
body #checkoutDialog .v19-checkout-row strong{font:750 12px 'Segoe UI',Arial,sans-serif;color:#343332}
body #checkoutDialog .v19-checkout-row small{color:#858079;line-height:1.35;font-size:11px;overflow-wrap:anywhere}
body #checkoutDialog .v19-checkout-row b{white-space:nowrap;font-size:12px;color:#855c1b}
body #checkoutDialog .v19-summary-empty{font-size:12px;color:#888}
body #checkoutDialog .modal-header{background:#fbf9f5;border-radius:12px;padding:18px 18px 13px;margin-bottom:22px!important;border:1px solid #f0e9dc}
body #checkoutDialog .modal-header h2{font:700 30px/1.18 Georgia,serif!important;color:#262526}
body #checkoutDialog .v17-checkout-side{background:#faf9f7!important;border-color:#e8e1d7!important}
body #checkoutDialog .order-summary{background:#f4eee3!important;border:1px solid #ead7b7;border-radius:12px;margin:10px 0 16px!important;padding:14px!important}
body #checkoutDialog .order-summary .order-grand-total{color:#2c2c2e;font-size:15px}
body #checkoutDialog .order-summary #checkoutTotal{font-size:22px;color:#8d631b}
body #checkoutDialog #submitOrder{border-radius:11px!important;background:var(--m19-gold)!important;color:white!important;font-size:14px!important;font-weight:800!important}
body #checkoutDialog #submitOrder:hover:not(:disabled){background:var(--m19-gold-hover)!important}
body #checkoutDialog .terms-check{line-height:1.6}
/* Narrow screens: modal scroll remains independent of bottom bar. */
@media(max-width:790px){body #optionDialog{width:min(700px,calc(100vw - 16px))!important;max-height:calc(100dvh - 16px)!important;height:calc(100dvh - 16px)!important}}
@media(max-width:600px){
 body #optionDialog{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
 body #optionDialog .v19-modal-scroll{padding:22px 15px 12px!important}
 body #optionDialog .option-modal-inner{padding:0!important}
 body #optionDialog .option-hero-image{height:152px!important;min-height:152px!important;max-height:152px!important;padding:9px!important}
 body #optionDialog .option-hero-image img{max-height:137px!important}
 body #optionDialog .option-modal-header h2{font-size:22px!important}
 body #optionDialog .v17-rec-item{grid-template-columns:22px 53px minmax(0,1fr);min-height:74px;padding:8px 9px;gap:9px}
 body #optionDialog .v17-rec-photo{width:53px;height:55px}
 body #optionDialog .v17-recommendation-header h3{font-size:21px!important}
 body #optionDialog .option-modal-footer{display:grid!important;grid-template-columns:minmax(0,1fr) 112px!important;gap:9px!important;padding:12px 14px max(12px,env(safe-area-inset-bottom))!important}
 body #optionDialog .option-modal-footer .option-order-total{grid-column:1!important;grid-row:1!important;min-width:0!important}
 body #optionDialog .option-modal-footer .qty-controls{grid-column:2!important;grid-row:1!important;width:112px!important;max-width:112px!important;height:44px!important}
 body #optionDialog .option-modal-footer #optionAddBtn{grid-column:1 / -1!important;grid-row:2!important;width:100%!important;min-height:47px!important;flex:auto!important}
 body .cart-drawer .drawer-header{padding:20px!important}
 body .cart-drawer .drawer-items{padding:12px!important}
 body .cart-drawer .drawer-footer{padding:15px 16px max(15px,env(safe-area-inset-bottom))!important}
 body #checkoutDialog .modal-header{padding:13px!important}
 body #checkoutDialog .modal-header h2{font-size:25px!important}
 body #checkoutDialog .v19-checkout-detail{padding:12px!important}
}
@media(prefers-reduced-motion:reduce){body #optionDialog *,body .cart-drawer *,body #checkoutDialog *{transition:none!important;animation:none!important}}
/* Keep close control clear of long product names and prices when scrolling. */
body #optionDialog .option-modal-header{padding-right:45px!important}
/* Explicit minimum sizing prevents narrow cart entries from pushing controls outside. */
body .cart-drawer{right:0!important;left:auto!important;overflow-x:hidden!important}
body .cart-drawer .cart-line{grid-template-columns:69px minmax(0,1fr) 25px!important}
body .cart-drawer .cart-line>div:nth-child(2){min-width:0!important}
body .cart-drawer .drawer-header .close-button{position:static!important;flex:none!important;align-self:flex-start!important;min-width:36px!important}
body .cart-drawer .drawer-footer .price-line{gap:12px;min-width:0}
body .cart-drawer .drawer-footer .price-line strong{flex-shrink:0;white-space:nowrap}
