/* ================================================================
   Mix & Match (mix-match.php). Loaded only there, after redesign.css.
   The deals are rendered with the shop's own product-card markup
   (.product-card, .card-img-wrap, .card-thc-chip, .card-name …), so
   the look comes from the same rules as every other product card,
   and the "+" picker reuses the product weight sheet (.wsheet …).
   This file adds the hero, the "+" layer, the pick filter and the
   picker's list and footer.
   ================================================================ */

.mm-page { padding-bottom: 48px; }

/* ── Hero: a contained banner, not a full-bleed band ──────────────── */
.mm-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 24px;
  margin: 8px 0 22px; padding: 40px 44px;
  border-radius: 22px;
  background:
    radial-gradient(60% 90% at 88% 20%, rgba(52, 210, 122, .22), transparent 62%),
    radial-gradient(50% 70% at 0% 100%, rgba(52, 210, 122, .10), transparent 60%),
    linear-gradient(135deg, #0E3A24 0%, #07200F 100%);
  color: #fff;
}
.mm-hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7EE8A8; }
.mm-hero-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34D27A; box-shadow: 0 0 0 4px rgba(52, 210, 122, .2); }
.mm-hero h1 { margin: 12px 0 0; font-size: clamp(34px, 3.6vw, 50px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; color: #fff; text-transform: none; }
.mm-hero-sub { max-width: 440px; margin: 12px 0 0; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.mm-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.mm-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); font-size: 14px; font-weight: 600; color: #fff; }
.mm-steps span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #34D27A; color: #06200F; font-size: 12.5px; font-weight: 800; }
.mm-hero-art { position: relative; height: 230px; }
.mm-art { position: absolute; top: 50%; width: 190px; height: 190px; object-fit: cover; border-radius: 16px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6), 0 0 0 3px rgba(255, 255, 255, .9); }
.mm-art--1 { left: 4%;  transform: translateY(-50%) rotate(-8deg); z-index: 1; }
.mm-art--2 { left: 50%; transform: translate(-50%, -54%); z-index: 3; width: 210px; height: 210px; }
.mm-art--3 { right: 4%; transform: translateY(-50%) rotate(8deg); z-index: 2; }

/* ── Filter chips + count ─────────────────────────────────────────── */
.mm-page .category-pills .pill { font: inherit; cursor: pointer; }
.mm-count { margin: 14px 0 14px; font-size: 14px; font-weight: 600; color: #545454; }

/* ── Cards ────────────────────────────────────────────────────────── */
.mm-grid .mm-card[hidden] { display: none; }
/* An old phone rule sizes carousel cards to a fixed 160px; in a grid each card
   fills its column, as on the shop pages. */
.mm-grid > .mm-card { position: relative; width: auto; min-width: 0; }
/* The pick size sits where a product shows its THC. */
.mm-card .card-thc-chip { text-transform: uppercase; }
.mm-card .card-price .orig { color: #8A8A8A; text-decoration: line-through; margin-right: 4px; }
.mm-card .card-price .sale { color: #000; font-weight: 600; }
.mm-card .mm-meta { font-size: 13px; color: #545454; }
.mm-card .card-link:focus-visible { outline: 3px solid rgba(5, 148, 79, .35); outline-offset: 3px; border-radius: 12px; }

/* The "+" over the photo: the same square overlay a product card uses for its add button. */
.mm-plus-layer { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1 / 1; pointer-events: none; z-index: 2; }
.mm-plus {
  position: absolute; right: 12px; bottom: 12px;
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: #000; cursor: pointer; pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  transition: transform .15s, box-shadow .15s;
}
.mm-plus::before,
.mm-plus::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 2px; margin: -1px 0 0 -8px;
  border-radius: 1px; background: currentColor;
}
.mm-plus::after { transform: rotate(90deg); }
.mm-plus:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(0, 0, 0, .24); }
.mm-plus:active { transform: scale(.92); }
.mm-plus:focus-visible { outline: 2px solid #05944F; outline-offset: 2px; }

/* ── The picker (sits on the product weight sheet) ─────────────────── */
.mm-sheet .wsheet-panel { display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 769px) { .mm-sheet .wsheet-panel { width: min(520px, calc(100vw - 48px)); max-height: 86vh; } }
.mm-sheet .wsheet-title { font-size: 18px; }
.mm-sheet-price { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; color: #545454; }
.mm-sheet-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 12px 2px 12px; }
.mm-sheet-loading { margin: 18px 0; text-align: center; font-size: 14px; color: #545454; }
.mm-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border: 1.5px solid #E6E9E7; border-radius: 14px;
  background: #fff; color: #111; font: inherit; text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.mm-opt img { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #F4F4F4; }
.mm-opt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mm-opt-name { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; }
.mm-opt-label { font-size: 13px; color: #545454; }
.mm-opt-why { font-size: 12.5px; font-weight: 600; color: #9A6A00; }
.mm-opt-check { flex: 0 0 auto; position: relative; width: 24px; height: 24px; border: 2px solid #C9CFCB; border-radius: 50%; transition: background .15s, border-color .15s; }
.mm-opt.is-picked { border-color: #0E7A43; background: #F3FAF6; }
.mm-opt.is-picked .mm-opt-check { border-color: #0E7A43; background: #0E7A43; }
.mm-opt.is-picked .mm-opt-check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.mm-opt.is-full { opacity: .45; cursor: default; }
.mm-opt.is-off { opacity: .55; cursor: not-allowed; }
@media (hover: hover) { .mm-opt:not(.is-full):not(.is-off):not(.is-picked):hover { border-color: #B9C2BC; } }
.mm-opt:focus-visible { outline: 2px solid #0E7A43; outline-offset: 2px; }

.mm-sheet-note { margin: 0 0 2px; padding: 10px 12px; border-radius: 10px; background: #FFF6E5; color: #7A4B00; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.mm-sheet-foot { flex: 0 0 auto; padding: 12px 0 0; border-top: 1px solid #EEF1EF; background: #fff; }
.mm-sheet-err { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #FFF6E5; color: #7A4B00; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.mm-sheet-err[hidden] { display: none; }
.mm-sheet-status { margin: 0 0 10px; font-size: 14px; color: #545454; }
.mm-sheet-status b { color: #111; }
.mm-sheet-actions { display: flex; align-items: center; gap: 10px; }
.mm-qty { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; height: 50px; padding: 0 4px; border-radius: 999px; background: #F3F3F3; }
.mm-qty button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #111; font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; }
.mm-qty button:hover { background: #E6E6E6; }
.mm-qty span { min-width: 18px; text-align: center; font-size: 16px; font-weight: 700; }
.mm-add { flex: 1 1 auto; min-width: 0; height: 50px; padding: 0 16px; border: 0; border-radius: 999px; background: #111; color: #fff; font: inherit; font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .15s; }
.mm-add:hover:not(:disabled) { background: #2a2a2a; }
.mm-add:disabled { background: #C9CFCB; cursor: not-allowed; }
.mm-sheet-more { display: block; margin: 10px 0 2px; text-align: center; font-size: 13.5px; font-weight: 600; color: #111; text-decoration: underline; text-underline-offset: 3px; }

/* Short screens (a small phone, or a phone on its side): the whole sheet scrolls
   and the Add to cart bar stays pinned to the bottom, so every option can be
   reached; a fixed header and footer would otherwise leave the list no room. */
@media (max-height: 700px) {
  .mm-sheet .wsheet-panel { display: block; overflow-y: auto; max-height: 92vh; max-height: 92dvh; padding-bottom: 0; scroll-padding-bottom: 140px; }
  .mm-sheet-list { overflow: visible; padding-bottom: 10px; }
  .mm-sheet .wsheet-title { font-size: 16.5px; }
  .mm-sheet-price { font-size: 13px; }
  .mm-sheet-foot { position: sticky; bottom: 0; z-index: 2; margin: 0 -16px; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); box-shadow: 0 -8px 18px -12px rgba(0, 0, 0, .25); }
  .mm-sheet-status { margin-bottom: 8px; font-size: 13.5px; }
  .mm-sheet-more { margin-top: 6px; font-size: 13px; }
  .mm-opt { padding: 8px 10px; }
  .mm-opt img { width: 44px; height: 44px; }
}

/* ── Tablets and phones ───────────────────────────────────────────── */
/* Tablets and phones: the three deal photos fan out above the text instead of
   beside it. Sizes are % of the banner, so the fan fits down to 320px. */
@media (max-width: 960px) {
  .mm-hero { grid-template-columns: 1fr; gap: 18px; padding: 28px 28px 30px; }
  .mm-hero-art { order: -1; height: auto; aspect-ratio: 2.4 / 1; max-width: 560px; width: 100%; margin: 0 auto; }
  .mm-art { width: 38%; height: auto; aspect-ratio: 1 / 1; border-radius: 14px; }
  .mm-art--1 { left: 3%; }
  .mm-art--2 { width: 42%; height: auto; }
  .mm-art--3 { right: 3%; }
}
@media (max-width: 768px) {
  .mm-plus { right: 8px; bottom: 8px; width: 36px; height: 36px; }
  .mm-plus::before, .mm-plus::after { width: 14px; margin-left: -7px; }
  .mm-count { margin: 12px 0 10px; font-size: 13px; }
}
@media (max-width: 560px) {
  .mm-hero { margin: 4px 0 16px; padding: 22px 18px; border-radius: 18px; }
  .mm-hero-kicker { font-size: 11.5px; }
  .mm-hero h1 { margin-top: 8px; font-size: 32px; }
  .mm-hero-sub { margin-top: 8px; font-size: 15px; }
  .mm-steps { gap: 6px; margin-top: 16px; }
  .mm-steps li { padding: 5px 11px 5px 5px; font-size: 13px; gap: 6px; }
  .mm-steps span { width: 21px; height: 21px; font-size: 11.5px; }
  .mm-add { font-size: 15px; }
  .mm-hero { gap: 14px; }
  .mm-art { border-radius: 11px; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .9); }
}
/* Narrow phones: the kicker keeps to one line, and the three steps sit side by
   side (number over label) instead of stacking into three rows. */
@media (max-width: 480px) {
  .mm-k-deals { display: none; }
  .mm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mm-steps li { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 9px 4px 10px; border-radius: 12px; text-align: center; line-height: 1.25; font-size: 12.5px; }
}
@media (max-width: 360px) {
  .mm-hero h1 { font-size: 29px; }
  .mm-steps li { font-size: 12px; }
  .mm-qty { height: 46px; }
  .mm-qty button { width: 34px; height: 34px; }
  .mm-add { height: 46px; padding: 0 12px; font-size: 14px; }
}
