/* Pre-built PC list (action/select_custom_pc.php), design refresh item "pcpages".
   Every look rule is scoped html:is(.mr-all, .mr-pcpages), so shoppers see today's page until the item is released.
   New markup carries data-mr="pcpages", the old markup it replaces data-mr-old="pcpages". The first two rules repeat
   what common/header.twig and md_refresh.css do for the other items, so this page is safe on its own whichever
   file goes live first. Raise ?v= on the link in select_custom_pc.php with every edit. */
html:not(.mr-all):not(.mr-pcpages) [data-mr~="pcpages"] {
  display: none !important;
}
html:is(.mr-all, .mr-pcpages) [data-mr-old~="pcpages"] {
  display: none !important;
}

/* page: no grey panel around the list; title like the category pages (title, then the count in grey) */
html:is(.mr-all, .mr-pcpages) .mpc-page .product-detail-box {
  padding: 0;
  border-radius: 0;
  background: none;
}
html:is(.mr-all, .mr-pcpages) .mpc-page .section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 18px;
}
html:is(.mr-all, .mr-pcpages) .mpc-page .section-title h1 {
  margin: 0 !important; /* Bootstrap .mb-4 is !important */
  padding: 0;
  border: 0;
  color: var(--mr-ink, #1c1c1e);
  font: 700 28px/1.2 Roboto, system-ui, sans-serif;
  letter-spacing: -.01em;
}
html:is(.mr-all, .mr-pcpages) .mpc-page .section-title h1::after {
  display: none;
}
html:is(.mr-all, .mr-pcpages) .mpc-count {
  color: #6b7075;
  font-size: 14px;
}

/* grid: 4 / 3 / 2 cards a row, one wide card a row on phones (below) */
html:is(.mr-all, .mr-pcpages) .mpc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
@media (max-width: 1199px) {
  html:is(.mr-all, .mr-pcpages) .mpc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  html:is(.mr-all, .mr-pcpages) .mpc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* card: the look of the home page's pre-built row (item prebuilt): soft grey card, picture on a white square */
html:is(.mr-all, .mr-pcpages) .mpc-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border-radius: var(--mr-radius, 8px);
  background: #f5f6f7;
  color: var(--mr-ink, #1c1c1e);
  text-align: left;
}
/* heading block under the picture (round 3, 19 Nov 2026): series in small red capitals, processor + graphics as
   the heading, RAM · storage under it (md_pc_heading() in select_custom_pc.php; the full title stays as the link's title) */
html:is(.mr-all, .mr-pcpages) .mpc-head {
  min-height: 86px; /* series + two heading lines + the RAM line, so the prices of a row line up */
  margin-bottom: 10px;
}
html:is(.mr-all, .mr-pcpages) .mpc-series {
  margin: 0 0 4px;
  color: var(--mr-red, #e30613);
  font: 500 12px/1.2 Roboto, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html:is(.mr-all, .mr-pcpages) .mpc-name {
  margin: 0;
  padding: 0;
  font: 700 17px/1.3 Roboto, system-ui, sans-serif;
  color: inherit;
  text-transform: none;
}
html:is(.mr-all, .mr-pcpages) .mpc-sub {
  margin: 4px 0 0;
  color: #6b7075;
  font-size: 14px;
  line-height: 1.4;
}
html:is(.mr-all, .mr-pcpages) .mpc-name a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
html:is(.mr-all, .mr-pcpages) .mpc-name a:hover {
  color: var(--mr-red, #e30613);
}
html:is(.mr-all, .mr-pcpages) .mpc-img {
  display: block;
  aspect-ratio: 1;
  margin-bottom: 12px;
  border-radius: var(--mr-radius, 8px);
  background: #fff;
}
html:is(.mr-all, .mr-pcpages) .mpc-img img {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8%;
  object-fit: contain;
}

/* price block: price and MRP on one line, the saving and the tax note on the next */
html:is(.mr-all, .mr-pcpages) .mpc-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 13px;
  line-height: 1.4;
}
html:is(.mr-all, .mr-pcpages) .mpc-price::after { /* line break between the two lines */
  content: "";
  order: 2;
  flex-basis: 100%;
  height: 0;
}
html:is(.mr-all, .mr-pcpages) .mpc-now {
  order: 0;
  font-size: 20px;
  font-weight: 700;
}
html:is(.mr-all, .mr-pcpages) .mpc-mrp {
  order: 1;
  color: var(--mr-mrp, #5f6368);
}
html:is(.mr-all, .mr-pcpages) .mpc-save {
  order: 3;
  padding: 2px 8px;
  border-radius: 5px;
  background: #e8f5ec;
  color: var(--mr-green, #0a7d38);
  font-size: 12px;
  font-weight: 500;
}
html:is(.mr-all, .mr-pcpages) .mpc-tax {
  order: 4;
  color: #6b7075;
  font-size: 12px;
}

/* key parts: label and part name, at most two lines each */
html:is(.mr-all, .mr-pcpages) .mpc-specs {
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #e2e4e7;
}
html:is(.mr-all, .mr-pcpages) .mpc-specs > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.35;
}
html:is(.mr-all, .mr-pcpages) .mpc-specs dt {
  margin: 0;
  color: #6b7075;
  font-weight: 400;
}
html:is(.mr-all, .mr-pcpages) .mpc-specs dd {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
}

/* buttons at the bottom: Add All To Cart across the card, View build and Customize side by side below it.
   Outline, filled on hover; Customize grey so the card does not carry three red buttons */
html:is(.mr-all, .mr-pcpages) .mpc-btns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}
html:is(.mr-all, .mr-pcpages) .mpc-btn-cart {
  grid-column: 1 / -1;
}
html:is(.mr-all, .mr-pcpages) .mpc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--mr-red, #e30613);
  border-radius: var(--mr-radius, 8px);
  background: #fff;
  color: var(--mr-red, #e30613);
  font: 500 14px/1.2 Roboto, system-ui, sans-serif;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
html:is(.mr-all, .mr-pcpages) .mpc-btn:hover {
  border-color: var(--mr-red-hover, #b8040f);
  background: var(--mr-red-hover, #b8040f);
  color: #fff;
}
html:is(.mr-all, .mr-pcpages) .mpc-btn.md-pc-customize {
  border-color: #c4c7cc;
  color: var(--mr-ink, #1c1c1e);
}
html:is(.mr-all, .mr-pcpages) .mpc-btn.md-pc-customize:hover {
  border-color: var(--mr-ink, #1c1c1e);
  background: var(--mr-ink, #1c1c1e);
  color: #fff;
}
html:is(.mr-all, .mr-pcpages) .mpc-btn:focus-visible {
  outline: 2px solid var(--mr-ink, #1c1c1e);
  outline-offset: 2px;
}
html:is(.mr-all, .mr-pcpages) .mpc-btn[aria-busy="true"] {
  opacity: .6;
  cursor: progress;
}

/* phone: one card a row, picture beside the name and price, parts and buttons below */
@media (max-width: 575px) {
  html:is(.mr-all, .mr-pcpages) .mpc-page .section-title h1 {
    font-size: 22px;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "img name" "img price" "specs specs" "btns btns";
    column-gap: 12px;
    padding: 12px;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-head {
    grid-area: name;
    min-height: 0;
    margin-bottom: 6px;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-name {
    font-size: 16px;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-img {
    grid-area: img;
    align-self: start;
    margin: 0;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-price {
    grid-area: price;
    align-self: start;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-now {
    font-size: 18px;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-specs {
    grid-area: specs;
  }
  html:is(.mr-all, .mr-pcpages) .mpc-btns {
    grid-area: btns;
    padding-top: 12px;
  }
}
