/* =====================================================================
   ck-pdp-space-v1.css — the two spacing answers the 2026-11-16 phone audit
   found on the product card, after the price/quantity block moved above the
   share door.

   A new filename rather than an edit of ck-compact-v2.css because the edge
   holds a CSS URL for seven days: an appended rule would have reached
   shoppers a week after it shipped.

   Everything here is scoped .ck-storefront .x, which outranks a bare
   utility from the frozen Tailwind bundle on specificity rather than on
   order, and nothing here invents a utility class the host cannot compile.
   =================================================================== */

/* ------------------------------------------------------------------ 1
   The delivery badge and the share door on one line at 360.

   The pair measured 329px against the 309px a 360-wide Android phone gives
   the card, so it wrapped and the badge stood over the door — the owner
   asked for them side by side. The trim buys 27px and leaves 7px of slack:

     badge label  11px tracking-wide  ->  10px, no extra tracking   (-15)
     badge inner gap and padding       ->  4px and 6px              (-4)
     door  padding and icon gap        ->  8px and 6px              (-5)
     gap between the two               ->  6px                      (-3)

   10px is still inside §2 of the brief, which puts badges at 10-11px, and
   no wording changed. At 320px the pair still wraps: the words themselves
   are wider than that screen, and shrinking further would read as smudged.
   Desktop is outside the media query and keeps the badge as the compact
   layer draws it today.

   1b — the same row must not end up under the floating cart.

   Measured on the live page at 360: the card runs x 27..336 and the cart
   owns x 304..349, so the cart already sits on the last 32px of everything
   in the card — it does the same to the Make payment button today. Before
   the trim the door was on its own line at x 27..156 and never reached that
   lane; on one line it lands at x 329, which puts the circle over the last
   letters of "Share Product" for a band of scroll near the top of the page.

   So on the phones narrow enough for it to matter the trim goes 8px deeper:
   row gap 4, badge padding 4, door padding 6, door icon gap 4, door words
   11px. The pair becomes 281px, the door ends at x 308 and its words end at
   x 301 — clear of the cart at every scroll position the row passes through,
   with the icon kept and both pills still 38px tall. Only the pill's 3px of
   trailing padding grazes the circle, which is what the badge's last 1px of
   padding bought. Above 390 the lane is far enough right that the lighter
   trim is already clear, so nothing there is made smaller than it needs to
   be.
*/
@media (max-width: 1023.98px) {
    .ck-storefront .ck-ship-row {
        gap: 6px;
    }

    .ck-storefront .ck-ship-badge {
        gap: 4px;
        padding-inline: 6px;
    }

    .ck-storefront .ck-ship-badge-label {
        font-size: 10px;
        letter-spacing: normal;
    }

    .ck-storefront .ck-share-door {
        gap: 6px;
        padding-inline: 8px;
    }
}

@media (max-width: 390px) {
    .ck-storefront .ck-ship-row {
        gap: 4px;
    }

    .ck-storefront .ck-ship-badge {
        padding-inline: 4px;
    }

    .ck-storefront .ck-share-door {
        gap: 4px;
        font-size: 11px;
        padding-inline: 6px;
    }
}

/* ------------------------------------------------------------------ 2
   The floating doors stop cutting into the card's words.

   .ck-pdp-chrome is fixed across the top of the viewport and owns y 0-56
   while the picture is on screen, which is what the immersive layout asked
   for. The picture scrolls, the row does not, so from the moment the card
   reaches the top edge every row that passes through that band — the name
   first, since the reorder put it there — is cut by a white disc.

   The doors therefore answer for the band they sit in: once the card is
   under them the row takes a solid backing, the discs drop their own
   circles, and content passes cleanly behind a header instead of half
   under a button. This is the same behaviour the fixed buy band already
   shows at the bottom edge.

   The state is decided by the page's own Alpine (the share button already
   runs on it) and is re-read on load as well as on scroll, because a phone
   restores a scroll position when a product is reopened from the cart. With
   no script at all the row simply stays as it is today, which is the old
   behaviour rather than a broken one.

   The rules live inside the same media query ck-compact-v2.css uses for
   .ck-pdp-chrome: above 1024 that div is an ordinary static block in the
   page flow and must never be painted.
*/
@media (max-width: 1023.98px) {
    .ck-storefront .ck-pdp-chrome {
        transition: background-color 160ms ease, box-shadow 160ms ease;
    }

    .ck-storefront .ck-pdp-chrome--solid {
        background: #fff;
        box-shadow: 0 1px 0 rgba(17, 17, 20, 0.10);

        /* The row is a holder while it is transparent, so taps land on the
         * picture beside the doors. Once it is a header it owns its band. */
        pointer-events: auto;
    }

    .ck-storefront .ck-pdp-chrome--solid .ck-back,
    .ck-storefront .ck-pdp-chrome--solid .ck-pdp-door {
        background: transparent;
        box-shadow: none;
    }
}

html[data-theme="dark"] .ck-storefront .ck-pdp-chrome--solid {
    background: #17171a;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
