/* ============================================================================
   Costco97 — Markdown Monday roundup (from Markdown Monday.dc.html)
   ========================================================================== */

/* Two-column: main + sticky ad/subscribe rail. */
.c97mm-layout { max-width: var(--c97-container); margin: 0 auto; padding: 22px 22px 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--c97-rail-w); gap: var(--c97-gap); align-items: start; }
.c97mm-main { min-width: 0; }
.c97mm-rail { padding-top: 4px; }

/* ---- Header ---- */
.c97mm-head { padding-top: 26px; }
.c97mm-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--c97-blue); background: var(--c97-blue-tint); border: 1px solid #dbe4f0; padding: 6px 13px; border-radius: var(--c97-r-pill); }
.c97mm-kicker__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c97-red); }
.c97mm-h1 { margin: 18px 0 0; font-size: 60px; line-height: 1.02; font-weight: 600; letter-spacing: -.025em; color: var(--c97-ink); }
.c97mm-sub { margin: 20px 0 0; font-size: 21px; line-height: 1.5; font-weight: 300; color: var(--c97-ink); max-width: 640px; }
.c97mm-sub span { font-weight: 400; }
.c97mm-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.c97mm-pill { display: inline-flex; align-items: baseline; gap: 8px; background: var(--c97-wash); border: 1px solid var(--c97-line-faint); border-radius: 14px; padding: 12px 18px; font-size: 14px; color: var(--c97-muted-2); }
.c97mm-pill__n { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--c97-ink); }
.c97mm-pill--new { background: #eaf6ef; border-color: #cfe9d9; color: #3f7c5b; }
/* The meta pill (icon + text) centers instead of baseline-aligning. */
.c97mm-pill--meta { align-items: center; gap: 9px; }
.c97mm-pill--new .c97mm-pill__n { color: var(--c97-green-fg); }
.c97mm-actions { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* Featured banner — the branded MM graphic, sits at the top of the rail as a
   recurring visual cue. Natural aspect so its text isn't cropped. */
.c97mm-hero { border-radius: var(--c97-r-sm); overflow: hidden; border: 1px solid var(--c97-line-faint); background: var(--c97-wash); }
.c97mm-hero img { width: 100%; height: auto; display: block; }
@media (max-width: 960px) { .c97mm-hero { max-width: 340px; } }

/* ---- Picks ---- */
.c97mm-picks { padding-top: 52px; }
.c97mm-h2 { margin: 0 0 4px; font-size: 28px; font-weight: 600; letter-spacing: -.012em; color: var(--c97-ink); }
.c97mm-subh { margin: 0 0 24px; font-size: 16px; font-weight: 300; color: var(--c97-muted-2); }
.c97mm-picksgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.c97mm-pick { border: 1px solid var(--c97-line-faint); border-radius: 20px; padding: 24px; background: #fff; display: flex; flex-direction: column; transition: transform .3s cubic-bezier(.33,1,.68,1), box-shadow .3s; }
.c97mm-pick:hover { transform: translateY(-4px); box-shadow: 0 16px 34px -20px rgba(0,0,0,.32); }
/* Tier ladder — picks always render low → medium → high, so pure nth-child:
   green (value) → blue (brand) → graphite (premium). Tinted pill + the
   card's own 1px border carries the tier color. */
.c97mm-pick__tier { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; border-radius: var(--c97-r-pill); padding: 5px 11px; }
.c97mm-pick:nth-child(1) { border-color: #28a55f; }
.c97mm-pick:nth-child(1) .c97mm-pick__tier { color: #1d7a46; background: #e7f6ee; }
.c97mm-pick:nth-child(2) { border-color: var(--c97-blue); }
.c97mm-pick:nth-child(2) .c97mm-pick__tier { color: var(--c97-blue); background: var(--c97-blue-tint); }
.c97mm-pick:nth-child(3) { border-color: var(--c97-ink); }
.c97mm-pick:nth-child(3) .c97mm-pick__tier { color: #fff; background: var(--c97-ink); }
.c97mm-pick__name { margin-top: 12px; font-size: 18px; font-weight: 600; line-height: 1.25; color: var(--c97-ink); }
.c97mm-pick__price { margin-top: 8px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--c97-ink); }
.c97mm-pick p { margin: 14px 0 0; font-size: 14px; line-height: 1.55; font-weight: 300; color: var(--c97-muted-2); }

/* The between-sections ad inherits .c97-adbar; constrain to the column. */
.c97mm-main .c97-adbar { border: none; background: transparent; padding: 44px 0 0; }

/* In-list ads (every 15 visible rows) sit as list items. */
.c97mm-listad { border-top: 1px solid #f0f0f2; padding: 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--c97-wash-2); }
.c97mm-listad[hidden] { display: none !important; }

/* ---- List section ---- */
.c97mm-listsec { padding-top: 48px; }

/* Sticky controls */
.c97mm-controls { position: sticky; top: var(--c97-navh); z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); padding: 14px 0; margin-bottom: 6px; border-bottom: 1px solid var(--c97-line-faint); }
.c97mm-searchwrap { position: relative; }
.c97mm-searchwrap > svg { position: absolute; left: 16px; top: 14px; }
.c97mm-searchwrap input { width: 100%; border: 1px solid var(--c97-line); border-radius: 14px; background: #fff; padding: 13px 44px 13px 46px; font-size: 17px; color: var(--c97-ink); outline: none; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.c97mm-searchwrap input:focus { border-color: var(--c97-blue); box-shadow: 0 0 0 3px rgba(0,96,169,.12); }
.c97mm-clear { position: absolute; right: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: #e6e6ea; border: none; cursor: pointer; color: var(--c97-muted-2); font-size: 15px; line-height: 1; }
.c97mm-clear:hover { background: #d8d8de; }
.c97mm-controlrow { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.c97mm-chip { border-radius: var(--c97-r-pill); padding: 8px 15px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s, border-color .2s; border: 1px solid #e0e0e5; background: #fff; color: var(--c97-ink); font-family: inherit; }
.c97mm-chip.is-active { border-color: var(--c97-blue); background: var(--c97-blue); color: #fff; }
.c97mm-newtoggle { display: inline-flex; align-items: center; gap: 7px; border-radius: var(--c97-r-pill); padding: 8px 15px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s, border-color .2s; border: 1px solid #cfe9d9; background: #eaf6ef; color: var(--c97-green-fg); font-family: inherit; }
.c97mm-newtoggle span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.c97mm-newtoggle.is-active { border-color: var(--c97-green-fg); background: var(--c97-green-fg); color: #fff; }
.c97mm-sortwrap { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.c97mm-sortwrap label { font-size: 13px; color: var(--c97-muted); }
.c97mm-sortwrap select { border: 1px solid var(--c97-line); border-radius: 10px; background: #fff; padding: 9px 13px; font-size: 14px; font-family: inherit; color: var(--c97-ink); cursor: pointer; outline: none; }

.c97mm-count { font-size: 13px; color: var(--c97-muted); padding: 8px 2px 12px; }
.c97mm-count span[data-mm-shown] { color: var(--c97-ink); font-weight: 500; }

/* ---- Rows ---- */
.c97mm-list { border: 1px solid var(--c97-line-faint); border-radius: 16px; overflow: hidden; }
.c97mm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; cursor: pointer; background: #fff; border: none; border-top: 1px solid #f0f0f2; width: 100%; text-align: left; font-family: inherit; transition: background .15s; color: #c2c2ca; }
/* Author display:flex overrides the UA [hidden] rule — re-assert it so the
   filter's hidden rows actually disappear. */
.c97mm-row[hidden] { display: none !important; }
/* First VISIBLE row loses its top border (JS marks it after reorder). */
.c97mm-row.is-first { border-top: none; }
.c97mm-row.is-odd { background: var(--c97-wash-2); }
.c97mm-row:hover { background: #f0f6fd; }
.c97mm-row:hover .c97mm-row__name, .c97mm-row:hover > svg { color: var(--c97-blue); }
.c97mm-row__main { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.c97mm-row__name { font-size: 16px; line-height: 1.4; color: var(--c97-ink); transition: color .15s; }
.c97mm-row__price { flex: none; font-size: 17px; font-weight: 600; color: var(--c97-ink); white-space: nowrap; }
.c97mm-row > svg { flex: none; }
.c97mm-newbadge { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--c97-green-fg); background: var(--c97-green-bg); border: 1px solid var(--c97-green-bd); border-radius: 6px; padding: 3px 7px; }

/* Empty state */
.c97mm-empty { padding: 44px 24px; text-align: center; }
.c97mm-empty__t { font-size: 16px; color: var(--c97-ink); font-weight: 500; }
.c97mm-empty__s { margin-top: 6px; font-size: 14px; color: var(--c97-muted); }
.c97mm-reset { margin-top: 16px; background: var(--c97-blue-tint); color: var(--c97-blue); border: 1px solid #d7e5f5; border-radius: var(--c97-r-pill); padding: 9px 18px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; }
.c97mm-reset:hover { background: var(--c97-blue-tint-2); }

.c97mm-fine { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--c97-muted); }
.c97mm-comments { padding-top: 8px; }

/* ---- Shop modal ---- */
.c97mm-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 22px; }
.c97mm-modal[hidden] { display: none; }
.c97mm-modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.42); animation: c97fade .2s ease; }
.c97mm-modal__card { position: relative; width: 384px; max-width: 100%; background: #fff; border-radius: 20px; padding: 16px; box-shadow: 0 34px 80px -22px rgba(0,0,0,.55); animation: c97fade .24s ease; }
.c97mm-modal__x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.06); border: none; cursor: pointer; color: #5a5a60; font-size: 17px; line-height: 1; }
.c97mm-modal__x:hover { background: rgba(0,0,0,.12); }
.c97mm-modal__img { position: relative; aspect-ratio: 1 / 1; background: var(--c97-wash) center/contain no-repeat; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.c97mm-modal__img .c97mm-newbadge { position: absolute; top: 12px; left: 12px; }
.c97mm-modal__ph { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #c2c2ca; font-size: 12px; }
.c97mm-modal__name { margin-top: 16px; font-size: 17px; font-weight: 600; line-height: 1.32; color: var(--c97-ink); }
.c97mm-modal__price { margin-top: 8px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--c97-ink); }
.c97mm-modal__shop { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; background: #0a2540; color: #fff; border-radius: 12px; padding: 15px; font-size: 16px; font-weight: 600; transition: background .2s; }
.c97mm-modal__shop:hover { background: #0d305a; color: #fff; text-decoration: none; }
.c97mm-modal__fine { margin-top: 12px; font-size: 12px; line-height: 1.5; color: #a1a1a6; text-align: center; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
	.c97mm-layout { grid-template-columns: 1fr; }
	.c97mm-rail { position: static; top: auto; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 760px) {
	.c97mm-h1 { font-size: 42px; }
	.c97mm-picksgrid { grid-template-columns: 1fr; }
	.c97mm-sortwrap { margin-left: 0; }
}

/* Belt-and-braces: nothing served into the main column's band may ever
   bleed into the rail, whatever size TPD sends. */
.c97mm-main .c97-adbar .c97-adslot { max-width: 100%; overflow: hidden; }
