/**
 * Shared "My cart" panel (Figma 627:9635; phones: bottom sheet 1479:50595) and Add to cart alerts.
 * Moved unchanged from gm-pdp.css (2026-11-24) so every page with an Add to cart button uses the same
 * panel: product pages, homepage, Black Friday, campaign listings, series picks and the cart page.
 */

/* ---------- My cart panel (627:9635) ---------- */
.gm-pdp-scrim { position: fixed; inset: 0; z-index: 1002; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity var(--gm-dur, .25s) ease; }
.gm-pdp-scrim.is-open { opacity: 1; }
.gm-pdp-cartpanel {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 1003;
	display: flex; flex-direction: column; align-items: center; gap: 40px; width: 566px; max-width: 100vw; overflow-y: auto;
	background: var(--gm-color-bg-subtle); box-shadow: -16px 0 40px rgba(0, 0, 0, .12);
	transform: translateX(100%); transition: transform .32s var(--gm-ease, ease);
}
.gm-pdp-cartpanel.is-open { transform: none; }
.gm-pdp-cartpanel[hidden], .gm-pdp-scrim[hidden] { display: none; }
html.gm-cart-lock, html.gm-cart-lock body { overflow: hidden; }
.gm-pdp-cartpanel__head { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 66px); max-width: 500px; padding: 20px 33px; box-sizing: content-box; }
.gm-pdp-cartpanel__head h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.2px; color: #000; }
.gm-pdp-cartpanel__close { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer; transition: background-color var(--gm-dur-fast, .15s) ease; }
.gm-pdp-cartpanel__close:hover { background: #e8ebed; }
.gm-pdp-cartpanel__close:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }
.gm-pdp-cartpanel__close img { display: block; }
.gm-pdp-cartpanel__card { display: flex; align-items: flex-start; width: 526px; max-width: calc(100% - 40px); height: 228px; padding: 20px; overflow: hidden; background: #fff; border-radius: 12px; }
.gm-pdp-cartpanel__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 30px 20px; background: #fff; border-radius: 12px; }
.gm-pdp-cartpanel__img { display: flex; flex: none; width: 128px; height: 128px; padding: 0 12px; overflow: hidden; }
.gm-pdp-cartpanel__img img { width: 103.125px; height: 128px; max-width: none; object-fit: cover; }
.gm-pdp-cartpanel__info { display: flex; flex-direction: column; gap: 19px; width: 276px; min-width: 0; color: #0a0a0a; }
.gm-pdp-cartpanel__name { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.2px; }
.gm-pdp-cartpanel__price { display: flex; align-items: flex-start; white-space: nowrap; }
.gm-pdp-cartpanel__price span { font-size: 30px; line-height: 14px; font-weight: 700; letter-spacing: .8px; }
.gm-pdp-cartpanel__price b { font-size: 64px; line-height: 72px; font-weight: 800; letter-spacing: -1px; }
/* Whole basket, newest first (client 2026-10-20): the same white card, one row per line; scrolls when long. */
.gm-pdp-cartpanel__card--list { flex: 0 1 auto; min-height: 0; height: auto; padding: 4px 20px; overflow-y: auto; }
.gm-pdp-cartpanel__list { width: 100%; margin: 0; padding: 0; list-style: none; }
.gm-pdp-cartpanel__line { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px 32px 16px 0; }
.gm-pdp-cartpanel__remove { position: absolute; top: 12px; right: -8px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer; transition: background-color var(--gm-dur-fast, .15s) ease; }
.gm-pdp-cartpanel__remove:hover { background: #e8ebed; }
.gm-pdp-cartpanel__remove:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }
.gm-pdp-cartpanel__remove:disabled { opacity: .4; cursor: default; }
/* QA-064: − qty + in each My cart line; the × button's size, hover, focus and disabled look, with a light outline. */
.gm-pdp-cartpanel__lrow:has(.gm-pdp-cartpanel__qty) { align-items: center; }
.gm-pdp-cartpanel__qty { display: inline-flex; align-items: center; gap: 4px; }
.gm-pdp-cartpanel__step { display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--gm-color-border, #e3e6e8); border-radius: 999px; background: #fff; font: 600 20px/1 var(--gm-font-sans); color: #0a0a0a; cursor: pointer; transition: background-color var(--gm-dur-fast, .15s) ease; }
.gm-pdp-cartpanel__step:hover:not(:disabled) { background: #e8ebed; }
.gm-pdp-cartpanel__step:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }
.gm-pdp-cartpanel__step:disabled { opacity: .4; cursor: default; }
.gm-pdp-cartpanel__qtyn { min-width: 24px; text-align: center; font-size: 16px; line-height: 24px; font-weight: 700; color: #0a0a0a; }
.gm-pdp-cartpanel__qty:not([role]) .gm-pdp-cartpanel__qtyn { min-width: 0; font-size: 14px; font-weight: 400; color: #62676c; } /* "Qty 1" when the line can only hold one: as before. */
.gm-pdp-cartpanel__empty { width: 486px; max-width: calc(100% - 40px); margin: 0; padding: 32px 20px; border-radius: 12px; background: #fff; text-align: center; font-size: 18px; line-height: 26px; font-weight: 600; color: #454a4f; }
.gm-pdp-cartpanel [hidden] { display: none !important; }
.gm-pdp-cartpanel__line + .gm-pdp-cartpanel__line { border-top: 1px solid var(--gm-color-border, #e3e6e8); }
.gm-pdp-cartpanel__limg { display: flex; align-items: center; justify-content: center; flex: none; width: 88px; height: 88px; }
.gm-pdp-cartpanel__limg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gm-pdp-cartpanel__linfo { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; color: #0a0a0a; }
.gm-pdp-cartpanel__lname { font-size: 18px; line-height: 26px; font-weight: 700; }
.gm-pdp-cartpanel__lopts { font-size: 14px; line-height: 20px; color: #62676c; }
.gm-pdp-cartpanel__lrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; font-size: 14px; color: #62676c; }
.gm-pdp-cartpanel__lrow b { font-size: 20px; line-height: 28px; font-weight: 800; color: #0a0a0a; }
.gm-pdp-cartpanel__total { display: flex; align-items: baseline; justify-content: space-between; width: 486px; max-width: calc(100% - 40px); margin: -16px 0 0; font-size: 18px; font-weight: 700; color: #0a0a0a; }
.gm-pdp-cartpanel__total b { font-size: 24px; font-weight: 800; }
.gm-pdp-cartpanel__actions { display: flex; flex-direction: column; gap: 16px; width: 486px; max-width: calc(100% - 40px); margin-top: auto; padding-bottom: 40px; }
.gm-pdp-cartpanel__btn {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; padding: 0 20px;
	border: 1px solid transparent; border-radius: 12px; font: 600 16px/24px var(--gm-font-sans); color: #0a0a0a; text-decoration: none;
	transition: background-color var(--gm-dur-fast, .15s) ease, border-color var(--gm-dur-fast, .15s) ease;
}
.gm-pdp-cartpanel__btn--primary { background: #ff7a00; color: #0a0a0a; }
.gm-pdp-cartpanel__btn--primary:hover { background: #f06f00; color: #0a0a0a; }
.gm-pdp-cartpanel__btn--ghost { border-color: #000; background: transparent; }
.gm-pdp-cartpanel__btn--ghost:hover { background: #fff; color: #0a0a0a; }
.gm-pdp-cartpanel__btn:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }

@media (max-width: 768px) {
	.gm-pdp-cartpanel { width: 100%; gap: 24px; }
	.gm-pdp-cartpanel__card { height: auto; padding: 12px; }
	.gm-pdp-cartpanel__card--list { padding: 0 12px; }
	.gm-pdp-cartpanel__limg { width: 72px; height: 72px; }
	.gm-pdp-cartpanel__total { margin-top: 0; }
	.gm-pdp-cartpanel__item { padding: 16px 8px; }
	.gm-pdp-cartpanel__img { width: 96px; height: 96px; padding: 0 9px; }
	.gm-pdp-cartpanel__img img { width: 77px; height: 96px; }
	.gm-pdp-cartpanel__name { font-size: 20px; line-height: 28px; }
	.gm-pdp-cartpanel__price b { font-size: 44px; line-height: 52px; }
	.gm-pdp-cartpanel__price span { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.gm-pdp-cartpanel, .gm-pdp-scrim { transition: none; }
}
@media (max-width: 767px) {
	/* My cart: a bottom sheet (Figma 1479:50595). */
	.gm-pdp-cartpanel {
		top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: min(88vh, calc(100dvh - 48px));
		gap: 24px; padding-bottom: env(safe-area-inset-bottom);
		border-radius: var(--gm-radius-md, 12px) var(--gm-radius-md, 12px) 0 0; box-shadow: 0 -8px 32px rgba(0, 0, 0, .16);
		transform: translateY(100%);
	}
	.gm-pdp-cartpanel__head { width: 100%; max-width: none; padding: 16px 16px 0; box-sizing: border-box; }
	.gm-pdp-cartpanel__head h2 { font-size: 20px; line-height: 28px; }
	.gm-pdp-cartpanel__card, .gm-pdp-cartpanel__empty, .gm-pdp-cartpanel__total, .gm-pdp-cartpanel__actions { width: calc(100% - 32px); max-width: none; }
	.gm-pdp-cartpanel__card { margin: 0 8px; width: calc(100% - 48px); border-radius: 8px; }
	.gm-pdp-cartpanel__actions { gap: 12px; padding-bottom: 24px; }
	.gm-pdp-cartpanel__btn { height: 48px; }
	.gm-pdp-cartpanel__lname { font-size: 16px; line-height: 24px; }
	.gm-pdp-cartpanel__lrow b { font-size: 20px; }
}

/* ---------- Add to cart feedback (QA-005) ---------- */
/* "Added to your basket" at the top of My cart (in-stock green). Empty: no box and no extra gap. */
.gm-pdp-cartpanel__status { width: 526px; max-width: calc(100% - 40px); }
.gm-pdp-cartpanel__status:empty { margin-top: -40px; }
.gm-pdp-cartpanel__added {
	display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-radius: 12px;
	background: #ecfdf3; color: #067647; font-family: var(--gm-font-sans); font-size: 16px; line-height: 24px; font-weight: 600;
}
.gm-pdp-cartpanel__added::before {
	content: ""; flex: none; width: 20px; height: 20px; background: currentColor;
	-webkit-mask: url("../images/gm/ic-track-check.svg") center / contain no-repeat; mask: url("../images/gm/ic-track-check.svg") center / contain no-repeat;
}
/* QA-064: a quantity note in My cart (stock limit, failed update): the status line without the tick. */
.gm-pdp-cartpanel__note { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fff; color: #454a4f; font-family: var(--gm-font-sans); font-size: 16px; line-height: 24px; font-weight: 600; }
/* Problems: the toast's look, above the sticky bar on phones; the text may wrap. */
.gm-pdp-alert { position: fixed; z-index: 1001; left: 50%; bottom: 32px; width: max-content; max-width: calc(100vw - 32px); transform: translateX(-50%); }
.gm-pdp-alert__box {
	display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 20px; border-radius: 8px;
	background: var(--gm-color-bg-inverse, #0d1b2a); box-shadow: 0 4px 10px -2px rgba(13, 27, 42, .08), 0 16px 32px -8px rgba(13, 27, 42, .16);
	font-family: var(--gm-font-sans);
}
.gm-pdp-alert__msg { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; color: #fff; }
.gm-pdp-alert__close { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.gm-pdp-alert__close:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }
@media (max-width: 768px) {
	.gm-pdp-cartpanel__status:empty { margin-top: -24px; } /* The panel's gap is 24px from here down. */
}
@media (max-width: 767px) {
	.gm-pdp-cartpanel__status { width: calc(100% - 32px); max-width: none; }
	.gm-pdp-alert { bottom: calc(16px + env(safe-area-inset-bottom)); }
	html.gm-pdp-sticky-on .gm-pdp-alert { bottom: calc(var(--gm-pdp-sticky-h, calc(76px + env(safe-area-inset-bottom))) + 8px); } /* Above the sticky bar (its measured height, safe area included). */
}

/* ---------- Cover on each line (2026-11-24, inc/gm-cover.php) ---------- */
/* Owner 2026-11-24: paid cover as one compact block - "Extended cover · £15" together, the terms wrapping under it. */
.gm-pdp-cartpanel__lcover { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; font-family: var(--gm-font-sans); font-size: 13px; line-height: 18px; color: #62676c; }
.gm-pdp-cartpanel__lcover[hidden] { display: none; }
.gm-pdp-cartpanel__lcoverhead { font-weight: 600; color: #0a0a0a; }
/* Narrow phones: the quantity row may use the space kept for the × (it sits beside the title only), so the line total
   stays inside the card. */
@media (max-width: 359px) {
	.gm-pdp-cartpanel__lrow { margin-right: -32px; }
}
/* Every basket line shows (owner 2026-11-24): the list card grows with its lines and the whole panel scrolls, instead of
   a capped inner scroll box that hid the second line below its edge. */
.gm-pdp-cartpanel__card--list { flex: none; overflow: visible; }

/* Stock message (owner 2026-11-26) beneath a basket line's options (Cart page and My cart): "Only 3 left in stock" in
   amber for 1-5 units, "In stock" in the product page's green, "Out of stock" red, backorder neutral. Compact 13px text;
   the wording carries the meaning, colour supports it. */
.gm-stock-note { display: block; width: fit-content; max-width: 100%; margin: 6px 0 0; padding: 2px 8px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: 13px; line-height: 18px; font-weight: 700; }
.gm-stock-note--low { background: #fffbeb; color: #92400e; }
.gm-stock-note--out { background: #fef3f2; color: #b42318; }
.gm-stock-note--back { background: #f2f4f7; color: #344054; }
.gm-stock-note[hidden] { display: none; }
.gm-pdp-cartpanel__linfo .gm-stock-note { margin-top: 4px; }
