      .sin-cod-trigger {
        display: flex; align-items: center; justify-content: center; gap: 10px;
        width: 100%; margin: 10px 0 0; padding: 16px 18px;
        background: linear-gradient(120deg, #24403a, #35594f);
        color: #fff5ec; border: none; border-radius: 12px; cursor: pointer;
        font-family: "Helvetica Neue", Arial, sans-serif;
        font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
        box-shadow: 0 10px 24px -14px rgba(0,0,0,0.7);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
      }
      .sin-cod-trigger:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(0,0,0,0.8); }

      /* Belt and braces: the theme renders its own checkout links in places
         the remove_action() calls don't reach. */
      .sin-buy-busy { opacity: 0.65; pointer-events: none; }

      .wc-proceed-to-checkout .checkout-button,
      .woocommerce .wc-proceed-to-checkout a.button.checkout-button,
      .widget_shopping_cart .buttons a.checkout,
      .woocommerce-mini-cart__buttons a.checkout,
      .mini-cart-buttons a.checkout,
      .xoo-wsc-ft-buttons-cont a[href*="checkout"],
      .woncep-cart-buttons a[href*="checkout"] { display: none !important; }

      .sin-cod-overlay {
        /* Above the side-cart drawer, sticky header, and any chat widget. */
        position: fixed; inset: 0; z-index: 2147483000;
        background: rgba(6, 9, 8, 0.78);
        -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
        display: flex; align-items: center; justify-content: center;
        padding: 16px;
        font-family: "Helvetica Neue", Arial, sans-serif;
        /* iOS Safari counts the address bar and bottom toolbar inside vh,
           so 100vh runs off the bottom of the screen. dvh is the real
           visible height; the vh line stays as the fallback. */
        height: 100vh;
        height: 100dvh;
      }
      .sin-cod-overlay[hidden] { display: none !important; }

      /* One centred card, phone and desktop alike. */
      .sin-cod-modal {
        width: 100%; max-width: 432px;
        /* Near-black with a green undertone — green is the accent, not the room. */
        background: #151917; color: #fff5ec;
        border-radius: 16px; overflow: hidden;
        box-shadow: 0 30px 70px -20px rgba(0,0,0,0.85);
        animation: sin-cod-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        /* Never taller than the screen; body scrolls, header stays put. */
        display: flex; flex-direction: column;
        max-height: 94vh;
        max-height: 94dvh;
      }
      @keyframes sin-cod-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
      @media (prefers-reduced-motion: reduce) { .sin-cod-modal { animation: none; } }

      /* The one green surface — Sin's brand band across the top. */
      .sin-cod__head {
        display: flex; align-items: center; gap: 10px; flex-shrink: 0;
        padding: 15px 18px;
        background: linear-gradient(120deg, #24403a, #35594f);
        border-bottom: 1px solid rgba(0,0,0,0.35);
      }
      .sin-cod-overlay .sin-cod__head h2 {
        flex: 1; margin: 0; font-size: 16px; font-weight: 800;
        letter-spacing: 0.06em; color: #fff5ec;
      }
      .sin-cod__home { font-size: 17px; }

      /* Proper hit target, spins and fills on hover. */
      .sin-cod-overlay .sin-cod__close {
        display: flex !important; align-items: center; justify-content: center;
        width: 34px !important; height: 34px !important;
        flex-shrink: 0; padding: 0 !important; cursor: pointer;
        border-radius: 50% !important;
        background: rgba(255,255,255,0.12) !important;
        color: #fff5ec !important;
        transition: background 0.2s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
      }
      .sin-cod-overlay .sin-cod__close:hover {
        background: rgba(255,255,255,0.26) !important;
        transform: rotate(90deg);
      }
      .sin-cod-overlay .sin-cod__close:active { transform: rotate(90deg) scale(0.9); }
      .sin-cod__close svg { display: block; pointer-events: none; }
      @media (prefers-reduced-motion: reduce) {
        .sin-cod-overlay .sin-cod__close { transition: background 0.2s ease; }
        .sin-cod-overlay .sin-cod__close:hover { transform: none; }
      }

      .sin-cod__body {
        padding: 14px 18px 18px;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain; /* don't hand the scroll to the page */
      }
      .sin-cod__loading, .sin-cod__empty {
        padding: 40px 0; text-align: center; opacity: 0.7; font-size: 14px;
      }
      /* Syncing with the server. Deliberately subtle — dimming the whole
         panel on every qty tap read as lag even when it was fast. */
      .sin-cod__body.is-syncing .sin-cod__totals,
      .sin-cod__body.is-syncing .sin-cod__submit-total { opacity: 0.5; }
      .sin-cod__totals, .sin-cod__submit-total { transition: opacity 0.15s ease; }

      /* One column by default; two side by side on desktop (see media query). */
      .sin-cod__grid { display: grid; grid-template-columns: 1fr; gap: 0; }
      .sin-cod__col { min-width: 0; }

      /* ---------------------------------------------------------------
         HARD RESET. The theme styles bare <button> globally (black slab,
         full width, big padding) and wins on specificity otherwise.
         Everything below is scoped to .sin-cod-overlay to outrank it.
      ---------------------------------------------------------------- */
      .sin-cod-overlay button,
      .sin-cod-overlay input {
        font-family: inherit !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        text-transform: none !important;
        letter-spacing: normal !important;
        box-shadow: none !important;
        min-width: 0 !important;
        min-height: 0 !important;
        line-height: 1 !important;
        margin: 0 !important;
      }
      .sin-cod-overlay .sin-cod__step,
      .sin-cod-overlay .sin-cod__remove,
      .sin-cod-overlay .sin-cod__close {
        background: transparent !important;
        border: none !important;
        color: #fff5ec !important;
        width: auto !important;
        height: auto !important;
        font-weight: 400 !important;
      }

      .sin-cod__items { display: flex; flex-direction: column; gap: 8px; }
      .sin-cod-overlay .sin-cod__item {
        position: relative; display: flex; gap: 12px; align-items: flex-start;
        background: rgba(255,255,255,0.055); border-radius: 12px;
        padding: 11px 34px 11px 11px;
      }
      .sin-cod__thumb { position: relative; flex-shrink: 0; width: 56px; }
      .sin-cod-overlay .sin-cod__thumb img {
        width: 56px !important; height: 56px !important;
        object-fit: cover; border-radius: 8px; display: block;
        max-width: none !important; margin: 0 !important;
      }
      .sin-cod__qtybadge {
        position: absolute; top: -6px; left: -6px;
        min-width: 20px; height: 20px; padding: 0 5px;
        background: #e8b04b; color: #24403a;
        border-radius: 999px; font-size: 11px; font-weight: 800;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 6px rgba(0,0,0,0.35);
      }

      .sin-cod__info { flex: 1; min-width: 0; }
      .sin-cod__name {
        font-size: 13px; font-weight: 700; line-height: 1.35;
        color: #fff5ec; margin: 0 0 3px;
      }
      .sin-cod__meta {
        font-size: 11.5px; line-height: 1.4; opacity: 0.6;
        margin: 0 0 7px; color: #fff5ec;
      }
      .sin-cod__meta p, .sin-cod__meta dl, .sin-cod__meta dt, .sin-cod__meta dd {
        margin: 0 !important; padding: 0 !important;
        display: inline !important; font-size: inherit !important;
        background: none !important; color: inherit !important;
      }
      .sin-cod__meta dt { font-weight: 400; }
      .sin-cod__meta dd::after { content: ""; }

      /* Price and stepper share the bottom row. */
      .sin-cod__foot {
        display: flex; align-items: center; justify-content: space-between;
        gap: 10px; flex-wrap: wrap;
      }
      .sin-cod__price {
        font-size: 14px; font-weight: 800; color: #e8b04b; margin: 0;
      }
      .sin-cod__price .woocommerce-Price-amount { color: #e8b04b; }

      .sin-cod__stepper {
        display: inline-flex; align-items: center;
        background: rgba(255,255,255,0.11); border-radius: 999px; padding: 3px;
      }
      .sin-cod-overlay .sin-cod__step {
        width: 24px !important; height: 24px !important;
        border-radius: 50% !important; padding: 0 !important;
        font-size: 15px !important; cursor: pointer;
        display: flex !important; align-items: center; justify-content: center;
        opacity: 0.85; transition: background 0.15s ease, opacity 0.15s ease;
      }
      .sin-cod-overlay .sin-cod__step:hover {
        background: rgba(255,255,255,0.18) !important; opacity: 1;
      }
      .sin-cod__qty {
        min-width: 26px; text-align: center;
        font-size: 12.5px; font-weight: 700; color: #fff5ec;
      }

      .sin-cod-overlay .sin-cod__remove {
        position: absolute; top: 8px; right: 8px;
        display: flex !important; align-items: center; justify-content: center;
        width: 24px !important; height: 24px !important;
        padding: 0 !important; cursor: pointer; opacity: 0.45;
        border-radius: 50% !important;
        transition: opacity 0.15s ease, background 0.15s ease, transform 0.2s ease;
      }
      .sin-cod-overlay .sin-cod__remove:hover {
        opacity: 1; color: #ff9c9c !important;
        background: rgba(255,156,156,0.16) !important;
        transform: rotate(90deg);
      }
      .sin-cod__remove svg { display: block; pointer-events: none; }

      .sin-cod__totals {
        background: rgba(255,255,255,0.055); border-radius: 12px;
        padding: 12px 15px; margin: 11px 0 0;
      }
      .sin-cod__row {
        display: flex; justify-content: space-between; align-items: center;
        font-size: 13.5px; padding: 4px 0;
      }
      .sin-cod__row--total {
        border-top: 1px solid rgba(255,255,255,0.12);
        margin-top: 7px; padding-top: 10px;
        font-size: 16.5px; font-weight: 800;
      }
      .sin-cod__row--total span:last-child { color: #e8b04b; }
      .sin-cod__free { color: #e8b04b; font-weight: 800; }

      .sin-cod__section-label {
        font-size: 12.5px; font-weight: 700; opacity: 0.8;
        margin: 13px 0 7px; letter-spacing: 0.02em;
      }
      .sin-cod__section-label--center { text-align: center; margin-top: 15px; }

      /* The one block customers must not skim past. Gold-edged panel so it
         reads as a decision, not as more of the same dark form. */
      .sin-cod__shipbox {
        margin-top: 14px; padding: 12px;
        border: 1.5px solid rgba(232,176,75,0.45);
        background: rgba(232,176,75,0.05);
        border-radius: 14px;
      }
      .sin-cod__shiphead {
        font-size: 11.5px; font-weight: 800; color: #e8b04b;
        text-transform: uppercase; letter-spacing: 0.08em;
        margin-bottom: 3px;
      }
      .sin-cod__shiphint {
        font-size: 11.5px; line-height: 1.4;
        opacity: 0.6; margin-bottom: 9px;
      }
      .sin-cod__shipbox .sin-cod__shiphead + .sin-cod__ships { margin-top: 9px; }

      .sin-cod__ships { display: flex; flex-direction: column; gap: 7px; }
      .sin-cod__ship {
        display: flex; align-items: center; gap: 11px;
        padding: 12px 15px; border-radius: 11px; cursor: pointer;
        background: rgba(255,255,255,0.04);
        border: 1.5px solid rgba(255,255,255,0.09);
        transition: border-color 0.15s ease, background 0.15s ease;
      }
      .sin-cod__ship:hover { border-color: rgba(232,176,75,0.5); }
      /* Selected: filled, gold-ringed, and the text goes gold too. */
      .sin-cod__ship.is-active {
        border-color: #e8b04b;
        background: rgba(232,176,75,0.18);
        box-shadow: inset 0 0 0 1px #e8b04b;
      }
      .sin-cod__ship.is-active .sin-cod__shipname,
      .sin-cod__ship.is-active .sin-cod__shipcost { color: #f0c26a; }
      /* Sole free-delivery row — nothing to choose, so don't invite a click. */
      .sin-cod__ship.is-locked { cursor: default; }
      .sin-cod__ship.is-locked:hover { border-color: #e8b04b; }
      .sin-cod-overlay .sin-cod__ship input { position: absolute; opacity: 0; pointer-events: none; }

      /* Flex-centred dot. Absolute insets drift by a sub-pixel against the
         border box and the dot ends up visibly off-centre. */
      .sin-cod__radio {
        width: 20px; height: 20px; flex-shrink: 0;
        box-sizing: border-box; border-radius: 50%;
        border: 2px solid rgba(255,255,255,0.36);
        display: flex; align-items: center; justify-content: center;
        transition: border-color 0.15s ease;
      }
      .sin-cod__ship.is-active .sin-cod__radio { border-color: #e8b04b; }
      .sin-cod__ship.is-active .sin-cod__radio::after {
        content: ""; display: block;
        width: 10px; height: 10px;
        background: #e8b04b; border-radius: 50%;
      }
      .sin-cod__shipname { flex: 1; font-size: 14px; font-weight: 700; }
      .sin-cod__shipcost { font-size: 14px; font-weight: 700; }

      .sin-cod__fields { display: flex; flex-direction: column; gap: 9px; }
      .sin-cod-overlay .sin-cod__field label {
        display: block; font-size: 12px; font-weight: 600;
        opacity: 0.75; margin-bottom: 4px;
      }
      .sin-cod__req { color: #ff8f8f; }

      /* Icon sits inside the field; input gets left padding to clear it. */
      .sin-cod__inputwrap { position: relative; }
      .sin-cod__ico {
        position: absolute; left: 13px; top: 50%;
        transform: translateY(-50%);
        display: flex; align-items: center;
        pointer-events: none; opacity: 0.45; color: #fff5ec;
        transition: opacity 0.15s ease;
      }
      .sin-cod__ico svg { display: block; }
      .sin-cod__inputwrap:focus-within .sin-cod__ico { opacity: 0.8; }

      /* Scoped + !important because this is now an enqueued stylesheet that
         loads BEFORE the theme's CSS. Inline in the footer it won on order
         alone; as a file it has to win on specificity instead. */
      .sin-cod-overlay .sin-cod__field input {
        width: 100% !important; box-sizing: border-box !important;
        padding: 12px 14px 12px 40px !important;
        border-radius: 10px !important;
        background: rgba(255,255,255,0.06) !important;
        border: 1.5px solid rgba(255,255,255,0.12) !important;
        color: #fff5ec !important;
        font-size: 15px !important;
        font-family: inherit !important;
        outline: none !important;
        box-shadow: none !important;
        height: auto !important;
        min-height: 0 !important;
        transition: border-color 0.15s ease;
      }
      .sin-cod-overlay .sin-cod__field input::placeholder { color: rgba(255,255,255,0.34) !important; }
      .sin-cod-overlay .sin-cod__field input:focus { border-color: #e8b04b !important; }
      .sin-cod-overlay .sin-cod__field input:-webkit-autofill {
        -webkit-text-fill-color: #fff5ec !important;
        -webkit-box-shadow: 0 0 0 1000px #22201e inset !important;
      }
      .sin-cod-overlay .sin-cod__field input.has-error { border-color: #ff8f8f; }

      .sin-cod__errors { margin-top: 12px; }
      .sin-cod__errors:empty { display: none; }
      .sin-cod__errors ul { margin: 0; padding: 0 0 0 18px; }
      .sin-cod__errors li, .sin-cod__errors p {
        color: #ffb4b4; font-size: 13px; line-height: 1.5; margin: 0;
      }

      /* White pill, like the reference. Scoped + !important to beat the theme. */
      .sin-cod-overlay .sin-cod__submit {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        width: 100%; padding: 16px 22px;
        /* !important because the reset above sets margin:0 !important. */
        margin: 14px 0 0 !important;
        background: #ffffff !important; color: #16110f !important;
        border: none !important; border-radius: 999px !important;
        cursor: pointer; font-family: inherit;
        font-size: 13.5px !important; font-weight: 600 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        line-height: 1.2 !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
      }
      .sin-cod-overlay .sin-cod__submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px -10px rgba(0,0,0,0.85);
      }
      .sin-cod-overlay .sin-cod__submit:active { transform: translateY(0); }
      /* Busy state keeps full contrast — a dimmed button reads as "broken",
         the spinner reads as "working". */
      .sin-cod-overlay .sin-cod__submit.is-busy { pointer-events: none; }
      .sin-cod__spinner { display: none; }
      .sin-cod__submit.is-busy .sin-cod__spinner {
        display: block; width: 15px; height: 15px; flex-shrink: 0;
        border: 2px solid rgba(22,17,15,0.25);
        border-top-color: #16110f;
        border-radius: 50%;
        animation: sin-cod-spin 0.65s linear infinite;
      }
      @keyframes sin-cod-spin { to { transform: rotate(360deg); } }
      @media (prefers-reduced-motion: reduce) {
        .sin-cod__submit.is-busy .sin-cod__spinner { animation-duration: 2s; }
      }

      /* "COMPLETE ORDER - Tk 879.00" — the dash is CSS so the busy
         state can drop it along with the price. */
      .sin-cod__submit-text::after { content: "\00a0-"; }
      .sin-cod__submit.is-busy .sin-cod__submit-text::after { content: ""; }
      .sin-cod__submit.is-busy .sin-cod__submit-total { display: none; }
      .sin-cod__submit-total { font-weight: 600; }
      .sin-cod__submit-total .woocommerce-Price-amount { color: #16110f; }

      /* Scroll lock. The position:fixed on body is what actually stops
         iOS; the JS stashes and restores scrollTop around it. */
      html.sin-cod-open { overflow: hidden !important; }
      body.sin-cod-open {
        overflow: hidden !important;
        position: fixed !important;
        left: 0 !important; right: 0 !important;
        width: 100% !important;
      }

      /* No inner scroller — every item stacks and the modal body scrolls
         as one. A nested scrollbar hides items the customer should see. */

      /* Phone: same centred card, just narrower gutters. */
      @media (max-width: 480px) {
        .sin-cod-overlay { padding: 10px; }
        .sin-cod__body { padding: 13px 15px 16px; }
        .sin-cod__head { padding: 13px 15px; }
        .sin-cod-overlay .sin-cod__head h2 { font-size: 15px; }
        /* Sit clear of the iOS home indicator / bottom toolbar. */
        .sin-cod-modal { margin-bottom: env(safe-area-inset-bottom, 0px); }
      }

      /* Very short screens — claw back every spare pixel. */
      @media (max-height: 720px) {
        .sin-cod__row { padding: 3px 0; }
        .sin-cod__section-label { margin: 11px 0 6px; }
        .sin-cod__section-label--center { margin-top: 13px; }
        .sin-cod__ship { padding: 10px 14px; }
        .sin-cod-overlay .sin-cod__field input { padding: 10px 13px 10px 40px !important; }
        .sin-cod__fields { gap: 8px; }
        .sin-cod-overlay .sin-cod__submit { margin-top: 12px !important; padding: 14px 20px; }
      }
