/*
 * MLIST (2026-11-21, localhost): redesigned PHONE layout of the 13 listing pages
 * (Figma "Mobile view": phones 2021:4852, Apple 2021:5734, Samsung 2027:6104,
 * Pixel 2027:6480, iPads & Tablets 2027:6844, budget 2027:7208 / 29333 / 29791,
 * iPhones 2027:30251, ranges 2027:30609 / 30948 / 31287 / 31626).
 *
 * Loaded with media="(max-width: 767px)" on those pages only (inc/gm-mlist.php),
 * and every rule is scoped to .gm-mlist, so tablets, desktops and every other
 * page keep their styles. Reuses the site tokens, tick boxes (.gm-cat-check),
 * Filters button and sheet, card parts (.gm-pcard__*) and Black Friday parts.
 */
@media (max-width: 767px) {

/* ---------- Page order (Figma): hero, perks, [budget picks], controls + list, then the page's other sections ---------- */
.gm-mlist.gm-cat { display: flex; flex-direction: column; }
.gm-mlist.gm-cat > * { order: 3; }
.gm-mlist.gm-cat > .gm-cat-hero { order: 0; }
.gm-mlist--budget.gm-cat > .gm-series-picks { order: 1; } /* Budget pages: the picks come before the list (Figma 2027:7208). */
.gm-mlist.gm-cat > .gm-cat-shop, .gm-mlist.gm-cat > .gm-budget-shop { order: 2; }

/* ---------- Hero (Hero-section): breadcrumb, H1 36/43, lead 18/26 ---------- */
.gm-mlist .gm-cat-hero { padding: 24px 0 0; background: var(--gm-color-bg-surface, #fff); }
.gm-mlist .gm-cat-crumbs { flex-wrap: wrap; gap: 2px; min-height: 32px; height: auto; padding-top: 7px; padding-bottom: 7px; font-size: 12px; line-height: 18px; }
.gm-mlist .gm-cat-crumbs a { font-weight: 500; color: var(--gm-color-text-secondary, #454a4f); }
.gm-mlist .gm-cat-crumbs span { font-weight: 600; color: var(--gm-color-text-primary, #0a0a0a); }
.gm-mlist .gm-cat-crumbs img { width: 18px; height: 18px; }
.gm-mlist .gm-cat-hero__info { gap: 12px; padding-top: 24px; padding-bottom: 0; }
.gm-mlist .gm-cat-hero__title { font-size: 36px; line-height: 43px; font-weight: 700; letter-spacing: -.6px; overflow-wrap: break-word; }
.gm-mlist .gm-cat-hero__lead { font-size: 18px; line-height: 26px; font-weight: 400; color: var(--gm-color-text-muted, #62676c); }

/* ---------- Perks (Frame 1820550766): grey rows, 40px icon, 16/24 SemiBold ---------- */
.gm-mlist.gm-cat .gm-cat-trust { flex-direction: column; align-items: stretch; gap: 12px; padding: 24px 0; }
.gm-mlist .gm-cat-trust li { gap: 12px; width: 100%; padding: 6px 8px; border-radius: var(--gm-radius-sm, 8px); background: var(--gm-color-action-disabled-bg, #e8ebed); font-size: 16px; line-height: 24px; font-weight: 600; color: var(--gm-color-bg-inverse, #0d1b2a); white-space: normal; }
.gm-mlist .gm-cat-trust__ic { width: 40px; height: 40px; background: none; }
.gm-mlist .gm-cat-trust__ic img { left: 8px; top: 8px; }

/* ---------- Budget picks (Frame 1820550788): heading 20/28, lead 14/20, a sideways row of 300px cards ---------- */
.gm-mlist .gm-series-picks { padding: 24px 0; background: var(--gm-color-bg-subtle, #f5f7f8); }
.gm-mlist .gm-series-picks .gm-cat-head { gap: 14px; margin-bottom: 24px; }
.gm-mlist .gm-series-picks .gm-cat-h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: 0; }
.gm-mlist .gm-series-picks .gm-cat-head .gm-cat-lead { font-size: 14px; line-height: 20px; color: var(--gm-color-text-secondary, #454a4f); }
.gm-mlist.gm-series .gm-series-picks__grid {
	display: flex; align-items: stretch; gap: 12px; margin-right: calc(var(--gm-gutter) * -1); padding: 2px var(--gm-gutter) 6px 0;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gm-mlist .gm-series-picks__grid::-webkit-scrollbar { display: none; }
.gm-mlist.gm-series .gm-series-picks__grid .gm-series-pick {
	flex: 0 0 300px; width: 300px; height: auto; min-height: 0; gap: 8px; scroll-snap-align: start;
	border-radius: var(--gm-radius-md, 12px); background: var(--gm-color-bg-surface, #fff); box-shadow: 0 2px 4px rgba(17, 15, 21, .05); filter: none; transform: none;
}
.gm-mlist.gm-series .gm-series-pick .gm-cat-card__media { height: auto; gap: 8px; padding: 14px 14px 0; }
.gm-mlist.gm-series .gm-series-pick .gm-cat-card__img { display: block; width: 148px; height: 148px; padding: 0; }
.gm-mlist.gm-series .gm-series-pick .gm-cat-card__img img { display: block; width: 148px; height: 148px; object-fit: contain; transform: none; }
.gm-mlist.gm-series .gm-series-picks__grid .gm-series-pick__body { flex: 1 0 auto; gap: 12px; height: auto; min-height: 0; padding: 0 20px 16px; }
.gm-mlist.gm-series .gm-series-pick__title { display: block; min-height: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; font-size: 20px; line-height: 24px; font-weight: 700; }
.gm-mlist .gm-series-pick__btn { display: none; } /* Figma's picks have no button; the photo and the name link to the product. */

/* ---------- Controls + list (Frame 1820550767): subtle background, 20px rhythm ---------- */
.gm-mlist .gm-cat-shop, .gm-mlist .gm-budget-shop { padding: 24px 0; background: var(--gm-color-bg-subtle, #f5f7f8); }
.gm-mlist [data-gm-mlist-only].gm-mlist-quick { display: block; margin-bottom: 20px; }
.gm-mlist-quick__row { display: flex; align-items: center; gap: 8px; }
.gm-mlist-quick__row:not(.gm-mlist-quick__row--scroll) { flex-wrap: wrap; row-gap: 0; } /* 320px: Black Friday moves under Hide out of stock instead of running off screen. */
.gm-mlist-quick__row--scroll {
	margin-right: calc(var(--gm-gutter) * -1); padding-right: var(--gm-gutter);
	overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gm-mlist-quick__row--scroll::-webkit-scrollbar { display: none; }
.gm-mlist-quick__line { height: 1px; margin: 8px 0; background: var(--gm-color-border-default, #d5d9dc); }
/* Tick boxes (Tick 44px, check_box_outline_blank 24px), label 16/24 SemiBold. */
.gm-mlist .gm-mlist-tick { flex: none; gap: 0; padding-right: 0; }
.gm-mlist .gm-mlist-tick input { width: 44px; height: 44px; }
.gm-mlist .gm-mlist-tick .gm-cat-check__box { width: 44px; height: 44px; }
.gm-mlist .gm-mlist-tick .gm-cat-check__box::before { left: 10px; top: 10px; }
.gm-mlist .gm-mlist-tick .gm-cat-check__box::after { left: 13px; top: 13px; }
.gm-mlist .gm-mlist-tick:hover .gm-cat-check__box { background: none; }
.gm-mlist .gm-mlist-tick .gm-cat-check__label { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--gm-color-text-primary, #0a0a0a); }
.gm-mlist .gm-mlist-tick input:disabled ~ .gm-cat-check__label { opacity: .45; }

/* "Add filter" row: count left, Filters (Button/Ghost) right. The section heading stays for screen readers and search. */
.gm-mlist .gm-cat-shop__top { flex-wrap: nowrap; align-items: center; gap: 16px; margin-bottom: 20px; padding: 8px 0; }
.gm-mlist [data-gm-mlist-only].gm-cat-shop__top { display: flex; }
.gm-mlist .gm-cat-shop .gm-cat-h2, .gm-mlist .gm-budget-shop__head > .gm-cat-h2, .gm-mlist .gm-budget-shop__head > .gm-cat-lead {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.gm-mlist .gm-cat-shop__count, .gm-mlist .gm-cat-shop__count--phone { display: block; order: 1; min-width: 0; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--gm-color-text-secondary, #454a4f); white-space: nowrap; }
.gm-mlist .gm-cat-filterbtn { order: 2; flex: none; gap: 8px; height: 44px; margin: 0 0 0 auto; padding: 0 12px; border: 1px solid #000; border-radius: var(--gm-radius-md, 12px); background: transparent; font-size: 16px; line-height: 24px; font-weight: 500; }

/* ---------- Listing cards (Product Cards 370px): photo on top, details below ---------- */
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) > li {
	display: flex; flex-direction: column; min-width: 0; overflow: hidden;
	border-radius: var(--gm-radius-md, 12px); background: var(--gm-color-bg-surface, #fff); box-shadow: 0 2px 4px rgba(17, 15, 21, .05);
}
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) > li[hidden] { display: none; }
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card {
	position: relative; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; height: auto; min-height: 0; padding: 0;
	border-radius: var(--gm-radius-md, 12px); background: transparent; box-shadow: none; filter: none; transform: none;
}
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card:hover { transform: none; filter: none; }
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card__media { flex: none; align-items: center; justify-content: center; gap: 8px; height: auto; padding: 14px 14px 0; }
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card__img { display: block; width: 148px; height: 148px; padding: 0; overflow: hidden; }
/* Whole photo, never stretched or cropped. */
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card__img img { display: block; width: 148px; height: 148px; object-fit: contain; transform: none; }
.gm-mlist .gm-cat-card .gm-pcard__swatches { flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 16px; }
.gm-mlist .gm-cat-card .gm-pcard__swatchli { padding: 1px; }
.gm-mlist .gm-cat-card .gm-pcard__swatch { width: 10px; height: 10px; border: 1px solid rgba(17, 15, 21, .4); border-radius: var(--gm-radius-sm, 8px); }
.gm-mlist .gm-cat-card .gm-pcard__more { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .4px; color: #110f15; }
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card__body { flex: none; justify-content: flex-start; gap: 12px; height: auto; min-height: 0; padding: 0 20px 16px; }
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card__body > .gm-bf-label { margin: 0 0 2px; } /* Label container pb 6 + card gap 8 above the name. */
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card__title {
	display: block; min-height: 0; overflow: visible; overflow-wrap: anywhere; white-space: normal;
	font-size: 20px; line-height: 24px; font-weight: 700; color: var(--gm-color-text-primary, #0a0a0a);
}
.gm-mlist .gm-cat-card .gm-pcard__price { gap: 4px; }
.gm-mlist .gm-cat-card .gm-pcard__label { font-size: 14px; line-height: 16px; color: var(--gm-color-text-muted, #62676c); }
.gm-mlist .gm-cat-card .gm-pcard__amount { align-items: flex-start; }
.gm-mlist .gm-cat-card .gm-pcard__cur { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: .8px; }
.gm-mlist .gm-cat-card .gm-pcard__num { font-size: 32px; line-height: 24px; font-weight: 700; letter-spacing: 0; }
.gm-mlist .gm-cat-card .gm-pcard__was { min-height: 0; font-size: 14px; line-height: 16px; }
.gm-mlist .gm-cat-card .gm-pcard__was:empty { display: none; }
/* Saving: the shared Save chip (egs_gm_savings_html() / GM_SAVINGS, styled once in gm.css .gm-save-chip); no phone-only restyle (2026-11-22). */
/* Campaign card (the selected products' red tag, inc/gm-bf-badges.php): £ 16 Bold, price 32 ExtraBold, green. */
.gm-mlist .gm-cat-card:has(.gm-bf-tag) .gm-pcard__label { line-height: 18px; }
.gm-mlist .gm-cat-card:has(.gm-bf-tag) .gm-pcard__cur { font-size: 16px; line-height: 14px; }
.gm-mlist .gm-cat-card:has(.gm-bf-tag) .gm-pcard__num { font-weight: 800; }
/* Red tag: flush in the card's top-right corner (Figma 76px), not over the centred photo. */
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card .gm-bf-tag { top: 0; right: 0; left: auto; width: 76px; min-width: 0; max-width: none; }
/* Add to cart (Button 48px, outline): the Black Friday card's own add (gm-bf.js), outside the card link. */
.gm-mlist [data-gm-mlist-only].gm-cat-card__add {
	display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; margin: 8px 20px 16px; padding: 0 16px;
	border: 1px solid #000; border-radius: var(--gm-radius-md, 12px); background: var(--gm-color-bg-surface, #fff); cursor: pointer;
	font: 600 16px/24px var(--gm-font-sans); color: var(--gm-color-action-primary-text, #0a0a0a);
	transition: background-color var(--gm-dur-fast, .15s) ease, color var(--gm-dur-fast, .15s) ease;
}
.gm-mlist .gm-cat-card__add img { display: block; width: 24px; height: 24px; }
.gm-mlist .gm-cat-card__add:hover { background: var(--gm-color-bg-subtle, #f5f7f8); }
.gm-mlist .gm-cat-card__add:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }
.gm-mlist .gm-cat-card__add:disabled { cursor: default; border-color: #e8ebed; background: #e8ebed; color: #62676c; }
.gm-mlist .gm-cat-card__add:disabled img { display: none; }
.gm-mlist .gm-cat-card__add.is-done { border-color: var(--gm-color-bg-inverse, #0d1b2a); background: var(--gm-color-bg-inverse, #0d1b2a); color: #fff; }
.gm-mlist .gm-cat-card__add.is-done img { filter: invert(1); }
.gm-mlist :is(ul.gm-cat-grid, ul.gm-budget-grid) > li:has(> .gm-cat-card__add) .gm-cat-card__body { padding-bottom: 12px; }
/* Keyboard focus on the whole card. */
.gm-mlist.gm-cat :is(ul.gm-cat-grid, ul.gm-budget-grid) .gm-cat-card:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }

/* ---------- Show more (Figma Button 170 x 48, navy) in place of the page numbers ---------- */
.gm-mlist .gm-cat-pages { display: none; } /* The page links stay in the markup for crawlers and no-script visitors. */
.gm-mlist [data-gm-mlist-only].gm-mlist-more { display: flex; justify-content: center; }
.gm-mlist-more__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 170px; height: 48px; margin-top: 20px; padding: 0 30px;
	border: 0; border-radius: var(--gm-radius-md, 12px); background: var(--gm-color-bg-inverse, #0d1b2a); cursor: pointer;
	font: 600 16px/20px var(--gm-font-sans); color: #fff;
}
.gm-mlist-more__btn[hidden] { display: none; }
.gm-mlist-more__btn img { display: block; width: 20px; height: 20px; filter: invert(1); }
.gm-mlist-more__btn--less img { transform: rotate(180deg); } /* Show less: arrow up. */
.gm-mlist-more__btn:hover { background: #1b2c40; }
.gm-mlist-more__btn:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); }

/* ---------- Budget pages and OnePlus: the chip filters become the Filters sheet ---------- */
.gm-mlist .gm-budget-shop__head { gap: 0; margin: 0; }
.gm-mlist .gm-budget-chips[data-gm-bsheet] { display: none; }
.gm-mlist .gm-budget-chips[data-gm-bsheet].is-open {
	position: fixed; right: 0; bottom: 0; left: 0; z-index: 1003; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
	max-height: min(86vh, calc(100dvh - 48px)); margin: 0; padding: 0 0 calc(16px + env(safe-area-inset-bottom));
	overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
	border-radius: var(--gm-radius-md, 12px) var(--gm-radius-md, 12px) 0 0; background: #fff; box-shadow: 0 -8px 32px rgba(0, 0, 0, .16);
	animation: gm-mlist-sheet var(--gm-dur, .25s) var(--gm-ease, ease);
}
@keyframes gm-mlist-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gm-mlist [data-gm-mlist-only].gm-bsheet__head { position: sticky; top: 0; z-index: 1; display: flex; padding: 8px 16px; background: #fff; }
.gm-mlist .gm-bsheet__head .gm-cat-filters__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; }
.gm-mlist .gm-bsheet__head .gm-cat-filters__close img { width: 24px; height: 24px; }
.gm-mlist .gm-budget-chips.is-open > .gm-bchip { padding: 8px 30px; }
.gm-mlist .gm-budget-chips.is-open > .gm-bchip > .gm-bchip__btn { height: auto; padding: 0; border: 0; background: none; box-shadow: none; pointer-events: none; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--gm-color-text-primary, #0a0a0a); }
.gm-mlist .gm-budget-chips.is-open > .gm-bchip > .gm-bchip__btn .gm-bchip__chev, .gm-mlist .gm-budget-chips.is-open > .gm-bchip > .gm-bchip__btn .gm-bchip__n { display: none; }
.gm-mlist .gm-budget-chips.is-open .gm-bchip__menu { position: static; display: flex; flex-direction: column; gap: 0; min-width: 0; margin: 8px 0 0; padding: 0; border: 0; box-shadow: none; background: none; }
.gm-mlist .gm-budget-chips.is-open .gm-bchip__menu .gm-cat-check__label { font-size: 14px; line-height: 28px; }
.gm-mlist .gm-budget-chips.is-open > .gm-bchip__btn { align-self: flex-start; margin: 8px 30px 0; }
.gm-mlist [data-gm-mlist-only].gm-bsheet__foot { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); display: flex; margin-top: 16px; padding: 12px 16px 16px; background: #fff; }
.gm-mlist .gm-budget-grid { margin-top: 0; }
.gm-mlist .gm-budget-empty:not([hidden]) { margin-top: 20px; }

.gm-mlist .gm-series-types .gm-cat-card__body > .gm-bf-label { max-width: 100%; }
/* The relocated two-up "types" cards (138-190px wide): the Black Friday label fits inside the card (was 144px, 4px off screen at 320px). */
.gm-mlist .gm-series-types .gm-cat-card__body > .gm-bf-label > span { padding: 0 2px; font-size: 10px; letter-spacing: 0; }
@media (max-width: 359.98px) { .gm-mlist .gm-series-types .gm-cat-card__body { padding-left: 10px; padding-right: 10px; } }

@media (prefers-reduced-motion: reduce) {
	.gm-mlist .gm-budget-chips[data-gm-bsheet].is-open { animation: none; }
}

/* ---------- BF-MOBILE (2026-11-27): Black Friday page on phones (body .gm-mlist-page only while the campaign is on) ---------- */
/* Deals first (visual order only; the HTML order, headings and links are unchanged): intro, benefits line, the list, then the
   reassurance strip and the banners moved below the deals, then the page's other sections. The five card rows are the same
   products as the list, so phones show the list instead (their cards and links stay in the HTML). */
.gm-mlist-page.gm-bf-page .gm-bf { display: flex; flex-direction: column; }
.gm-mlist-page.gm-bf-page .gm-bf > * { order: 5; }
.gm-mlist-page.gm-bf-page .gm-bf > .gm-bf-intro { order: 0; }
.gm-mlist-page.gm-bf-page .gm-bf > .gm-bf-perks { order: 1; }
.gm-mlist-page.gm-bf-page .gm-bf > .gm-bf-mlist { order: 2; }
.gm-mlist-page.gm-bf-page .gm-bf > .gm-bf-trust { order: 3; }
.gm-mlist-page.gm-bf-page .gm-bf > .gm-bf-hero { order: 4; }
.gm-mlist-page.gm-bf-page :is(#featured-phones, #iphone-deals, #samsung-deals, #pixel-deals, #ipad-deals) { display: none; }
/* Compact intro: breadcrumb 12/18 as the listing pages, heading 28/34, lead 16/24. */
.gm-mlist-page.gm-bf-page .gm-bf-intro { padding: 16px 0 8px; }
.gm-mlist-page.gm-bf-page .gm-bf-crumbs { flex-wrap: wrap; gap: 2px; height: auto; min-height: 32px; font-size: 12px; line-height: 18px; }
.gm-mlist-page.gm-bf-page .gm-bf-crumbs img { width: 18px; height: 18px; }
.gm-mlist-page.gm-bf-page .gm-bf-intro__copy { gap: 8px; padding-top: 8px; }
.gm-mlist-page.gm-bf-page .gm-bf-h1 { font-size: 28px; line-height: 34px; letter-spacing: -.3px; overflow-wrap: break-word; }
.gm-mlist-page.gm-bf-page .gm-bf-intro .gm-bf-lead { font-size: 16px; line-height: 24px; }
/* Benefits line: one row, 14/20 SemiBold, the policy pages as links. */
.gm-bf-page .gm-bf-perks { margin: 0; padding-top: 4px; padding-bottom: 16px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--gm-color-text-secondary, #454a4f); }
.gm-bf-page .gm-bf-perks a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.gm-bf-page .gm-bf-perks a:focus-visible { outline: none; box-shadow: var(--gm-focus-ring); border-radius: 2px; }
/* The list block keeps the listing pages' subtle band; less top space straight under the intro. */
.gm-bf-mlist.gm-mlist .gm-cat-shop { padding-top: 20px; }
}
