:root {
  --phone-line: #e6ebf0;
  --phone-muted: #748092;
  --phone-ink: #162232;
}

.phone-price-panel {
  margin-top: 14px;
}

.phone-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, .7fr) minmax(150px, .7fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 0 16px 16px;
}

.phone-search-field,
.phone-filter-select {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.phone-search-field {
  position: relative;
}

.phone-search-field svg {
  position: absolute;
  top: 31px;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #81909f;
  pointer-events: none;
}

.phone-search-field input,
.phone-filter-select select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--phone-line);
  border-radius: 6px;
  outline: none;
  color: var(--phone-ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.phone-search-field input {
  padding: 0 12px 0 36px;
}

.phone-filter-select span {
  color: var(--phone-muted);
  font-size: 10px;
}

.phone-filter-select select {
  padding: 0 28px 0 10px;
}

.phone-search-field input:focus,
.phone-filter-select select:focus {
  border-color: #83bdb9;
  box-shadow: 0 0 0 3px rgba(19, 126, 128, .1);
}

.phone-filter-reset {
  min-height: 40px;
  white-space: nowrap;
}

.phone-filter-reset svg {
  width: 14px;
  height: 14px;
  vertical-align: -3px;
}

.phone-filter-summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--phone-muted);
  font-size: 11px;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phone-price-groups {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.phone-model-toggle-wrap {
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
}

.phone-model-toggle {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--phone-teal);
  background: #fff;
  border: 1px solid #9bc9c5;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
}

.phone-model-toggle:hover {
  color: #075c57;
  background: #edf8f7;
  border-color: var(--phone-teal);
}

.phone-model-toggle svg {
  width: 16px;
  height: 16px;
}

.phone-brand-group {
  overflow: hidden;
  background: #fbfcfd;
  border: 1px solid var(--phone-line);
  border-radius: 8px;
}

.phone-brand-heading,
.phone-series-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.phone-brand-heading {
  min-height: 66px;
  padding: 13px 16px;
  color: var(--phone-muted);
  background: #fff;
  border-bottom: 1px solid var(--phone-line);
  font-size: 12px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: #1b2028;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
}

.brand-oneplus .brand-badge {
  color: #171b22;
  background: #d9e5ff;
  font-size: 17px;
}

.brand-kicker,
.series-kicker {
  display: block;
  color: var(--phone-muted);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .08em;
}

.phone-brand-heading h3,
.phone-series-heading h4 {
  margin: 2px 0 0;
  color: var(--phone-ink);
}

.phone-brand-heading h3 {
  font-size: 18px;
  line-height: 1.15;
}

.phone-series-group {
  padding: 14px 16px 16px;
}

.phone-series-group + .phone-series-group {
  border-top: 1px solid var(--phone-line);
}

.phone-series-heading {
  margin-bottom: 10px;
  color: var(--phone-muted);
  font-size: 11px;
}

.phone-series-heading h4 {
  font-size: 14px;
}

.phone-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 10px;
}

.phone-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.phone-price-card {
  min-width: 0;
  min-height: 222px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--phone-line);
  border-radius: 6px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.phone-card-link:hover .phone-price-card,
.phone-price-card:hover {
  border-color: #9bc9c5;
  box-shadow: 0 8px 22px rgba(20, 65, 73, .08);
  transform: translateY(-1px);
}

.phone-price-card.is-out {
  background: #fafafa;
}

.phone-card-main {
  display: flex;
  align-items: center;
  min-height: 82px;
  gap: 12px;
}

.phone-card-media {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  place-items: center;
  overflow: hidden;
  background: #f6f8fa;
  border-radius: 5px;
}

.phone-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.phone-image-fallback {
  display: none;
  color: #9aa5b4;
  font-size: 12px;
  font-weight: 800;
}

.phone-model-media.image-missing .phone-image-fallback {
  display: block;
}

.phone-card-heading {
  min-width: 0;
}

.phone-card-heading h5 {
  overflow: hidden;
  margin: 0;
  color: var(--phone-ink);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-card-heading p {
  margin: 5px 0 0;
  color: var(--phone-muted);
  font-size: 12px;
}

.phone-price-value {
  margin-top: 11px;
  color: #b42318;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.phone-price-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
}

.phone-price-details div {
  min-width: 0;
}

.phone-price-details dt {
  color: var(--phone-muted);
  font-size: 10px;
  white-space: nowrap;
}

.phone-price-details dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--phone-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-stock-state {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 14px;
  padding: 9px 10px;
  color: #8b5e00;
  background: #fff8e6;
  border: 1px solid #f5dfaa;
  border-radius: 4px;
}

.phone-stock-state strong {
  font-size: 16px;
}

.phone-stock-state span {
  color: #aa8a45;
  font-size: 12px;
}

.phone-gifts {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding-top: 9px;
  color: #586475;
  border-top: 1px solid #f0f2f5;
  font-size: 11px;
  line-height: 1.45;
}

.phone-gifts strong {
  flex: 0 0 auto;
  color: #ad6b00;
  font-weight: 700;
}

.phone-gifts ul {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phone-gifts li,
.gift-empty {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-gifts li::before {
  margin-right: 4px;
  color: #c68b25;
  content: "•";
}

@media (max-width: 620px) {
  .phone-filter-bar {
    grid-template-columns: 1fr 1fr;
    padding: 0 10px 10px;
  }

  .phone-search-field {
    grid-column: 1 / -1;
  }

  .phone-filter-reset,
  .phone-filter-summary {
    min-height: 38px;
  }

  .phone-price-groups {
    padding: 10px;
  }

  .phone-model-toggle-wrap {
    padding: 0 10px 10px;
  }

  .phone-model-toggle {
    width: 100%;
    justify-content: center;
  }

  .phone-brand-heading,
  .phone-series-group {
    padding-left: 12px;
    padding-right: 12px;
  }

  .phone-price-grid {
    grid-template-columns: 1fr;
  }
}

/* Model-level layout: one name on the left, all memory offers on the right. */
.phone-model-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.phone-model-card {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--phone-line);
  border-radius: 8px;
}

.phone-model-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 17px;
  background: linear-gradient(180deg, #f8fbfc, #eef4f5);
  border-right: 1px solid var(--phone-line);
}

.phone-model-media {
  display: grid;
  width: 92px;
  height: 110px;
  margin-bottom: 12px;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 7px;
}

.phone-model-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.model-kicker {
  color: var(--phone-muted);
  font-size: 10px;
  line-height: 1.4;
}

.phone-model-summary h4 {
  margin: 4px 0 7px;
  color: var(--phone-ink);
  font-size: 19px;
  line-height: 1.25;
}

.model-count {
  color: var(--phone-muted);
  font-size: 11px;
  line-height: 1.55;
}

.phone-model-summary > a {
  margin-top: auto;
  padding-top: 14px;
  color: #007c82;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.phone-model-summary > a:hover {
  text-decoration: underline;
}

.phone-model-configs {
  min-width: 0;
}

.phone-config-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--phone-muted);
  background: #fbfcfd;
  border-bottom: 1px solid var(--phone-line);
  font-size: 11px;
}

.phone-config-list {
  display: grid;
}

.phone-config-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.15fr) repeat(5, minmax(62px, 1fr)) minmax(112px, 1.15fr) minmax(135px, 1.3fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f5;
}

.phone-config-row:last-child {
  border-bottom: 0;
}

.phone-config-row:hover {
  background: #fcfefe;
}

.phone-config-memory,
.phone-config-stat,
.phone-config-gifts,
.phone-config-colors,
.phone-config-out-placeholder {
  min-width: 0;
}

.phone-config-memory {
  display: grid;
  gap: 4px;
}

.phone-config-memory strong {
  color: var(--phone-ink);
  font-size: 13px;
}

.phone-config-memory span,
.phone-config-stat span,
.phone-config-stat small,
.phone-config-gifts > span {
  color: var(--phone-muted);
  font-size: 10px;
}

.phone-config-stat {
  display: grid;
  gap: 3px;
}

.phone-config-stat strong {
  overflow: hidden;
  color: var(--phone-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-config-stat small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-config-paid strong {
  color: #b42318;
  font-size: 18px;
}

.phone-config-stat.has-discount strong {
  color: #a16207;
}

.phone-config-stat.is-empty strong {
  color: #64748b;
}

.phone-config-gifts {
  display: grid;
  gap: 5px;
}

.phone-config-gifts ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phone-config-gifts li {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  color: #536173;
  background: #f2f7f7;
  border-radius: 4px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-config-colors {
  display: grid;
  gap: 5px;
}

.phone-config-colors-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.phone-config-colors > span {
  color: var(--phone-muted);
  font-size: 10px;
}

.inventory-watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 7px;
  color: #176b67;
  background: #f2fbfa;
  border: 1px solid #a9d8d3;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.inventory-watch-button:hover {
  color: #075c57;
  background: #e4f5f3;
  border-color: #54a9a1;
}

.inventory-watch-button.is-enabled {
  color: #9a5b00;
  background: #fff8e7;
  border-color: #e8c77c;
}

.inventory-watch-button:disabled {
  cursor: wait;
  opacity: .6;
}

.inventory-watch-button svg {
  width: 13px;
  height: 13px;
}

.phone-config-colors ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phone-color-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 6px;
  color: #326764;
  background: #edf8f6;
  border: 1px solid #cce8e4;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.phone-color-stock strong {
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-color-stock span {
  color: #0f766e;
  font-weight: 700;
}

.phone-color-stock.is-out {
  color: #996515;
  background: #fff8e7;
  border-color: #f0d9a2;
}

.phone-color-stock.is-out span {
  color: #996515;
}

.color-stock-empty {
  color: var(--phone-muted);
  font-size: 11px;
}

.phone-config-state {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #8b5e00;
}

.phone-config-state strong {
  font-size: 16px;
}

.phone-config-state small {
  color: #aa8a45;
  font-size: 11px;
}

.phone-config-row.is-out {
  grid-template-columns: minmax(110px, 1fr) minmax(150px, 1fr) minmax(140px, 1.35fr);
  background: #fffdf7;
}

@media (max-width: 1050px) {
  .phone-model-card {
    grid-template-columns: 178px minmax(0, 1fr);
  }

  .phone-config-row {
    grid-template-columns: minmax(100px, 1fr) repeat(5, minmax(70px, 1fr));
  }

  .phone-config-gifts,
  .phone-config-price-change,
  .phone-config-colors {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid #f0f2f5;
  }
}

@media (max-width: 700px) {
  .phone-model-list {
    padding: 0 10px 10px;
  }

  .phone-model-card {
    grid-template-columns: 1fr;
  }

  .phone-model-summary {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    column-gap: 12px;
    min-height: 102px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--phone-line);
  }

  .phone-model-media {
    grid-row: span 4;
    width: 76px;
    height: 82px;
    margin: 0;
  }

  .phone-model-summary h4 {
    margin: 2px 0 0;
    font-size: 16px;
  }

  .phone-model-summary > a {
    margin: 0;
    padding: 0;
  }

  .phone-config-row,
  .phone-config-row.is-out {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 13px 12px;
  }

  .phone-config-memory,
  .phone-config-paid {
    grid-column: span 2;
  }

  .phone-config-gifts,
  .phone-config-price-change,
  .phone-config-colors {
    grid-column: span 2;
    margin-top: 2px;
  }
}

/* Inventory view: one product identity with every color SKU kept visible. */
.inventory-model-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.inventory-model-card {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--phone-line);
  border-radius: 8px;
}

.inventory-model-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px;
  background: #f5faf9;
  border-right: 1px solid var(--phone-line);
}

.inventory-model-media {
  display: grid;
  width: 82px;
  height: 92px;
  margin-bottom: 11px;
  place-items: center;
  overflow: hidden;
  color: #607080;
  background: #fff;
  border: 1px solid #e5ecef;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.inventory-model-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventory-model-summary > span,
.inventory-model-summary > small,
.inventory-memory-group header span,
.inventory-color small,
.inventory-quantity span {
  color: var(--phone-muted);
  font-size: 10px;
}

.inventory-model-summary h4 {
  margin: 4px 0 7px;
  color: var(--phone-ink);
  font-size: 17px;
  line-height: 1.25;
}

.inventory-model-summary > a {
  margin-top: auto;
  padding-top: 12px;
  color: #007c82;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.inventory-model-summary > a:hover,
.inventory-sku-link:hover {
  text-decoration: underline;
}

.inventory-configs {
  display: grid;
  min-width: 0;
}

.inventory-memory-group + .inventory-memory-group {
  border-top: 1px solid var(--phone-line);
}

.inventory-memory-group header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 39px;
  padding: 0 14px;
  background: #fbfcfd;
  border-bottom: 1px solid #eef1f4;
}

.inventory-memory-group header strong {
  color: var(--phone-ink);
  font-size: 13px;
}

.inventory-memory-group ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inventory-variant-row {
  display: grid;
  grid-template-columns: minmax(176px, 1.25fr) minmax(76px, .55fr) minmax(130px, .75fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f5;
}

.inventory-variant-row:last-child {
  border-bottom: 0;
}

.inventory-variant-row:hover {
  background: #fcfefe;
}

.inventory-color {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.inventory-color > div,
.inventory-quantity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventory-color strong {
  overflow: hidden;
  color: var(--phone-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-color-swatch {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background: linear-gradient(135deg, var(--inventory-color-start, #cfd8dc), var(--inventory-color-end, #eef2f3));
  border: 1px solid rgb(29 43 57 / 15%);
  border-radius: 50%;
}

.inventory-availability {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.inventory-availability.in-stock {
  color: #126940;
  background: #e9f8ef;
}

.inventory-availability.out-of-stock {
  color: #a8362e;
  background: #fff0ee;
}

.inventory-availability.unknown-stock {
  color: #7c6219;
  background: #fff8df;
}

.inventory-quantity strong {
  color: #1f3947;
  font-size: 12px;
}

.inventory-quantity.not-public strong {
  color: #7a8794;
  font-weight: 600;
}

.inventory-sku-link {
  color: #007c82;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .inventory-model-card {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .inventory-variant-row {
    grid-template-columns: minmax(160px, 1fr) minmax(72px, auto) minmax(120px, auto);
  }

  .inventory-sku-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .inventory-model-list {
    padding: 10px;
  }

  .inventory-model-card {
    grid-template-columns: 1fr;
  }

  .inventory-model-summary {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    column-gap: 11px;
    min-height: 99px;
    border-right: 0;
    border-bottom: 1px solid var(--phone-line);
  }

  .inventory-model-media {
    grid-row: span 4;
    width: 70px;
    height: 76px;
    margin: 0;
  }

  .inventory-model-summary h4 {
    margin: 2px 0 0;
    font-size: 16px;
  }

  .inventory-model-summary > a {
    margin: 0;
    padding: 0;
  }

  .inventory-variant-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px 12px;
  }

  .inventory-quantity,
  .inventory-sku-link {
    grid-column: 1 / -1;
  }
}

/* Compact rounded modules for the live price board. */
:root {
  --phone-line: #dce6ef;
  --phone-muted: #6b7b90;
  --phone-ink: #14243a;
  --phone-soft: #f5f8fb;
  --phone-accent: #087b78;
}

.monitor-command,
.monitor-panel,
.monitor-metrics article {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgb(21 48 74 / 5%);
}

.monitor-command {
  padding: 18px 20px;
}

.monitor-command .monitor-actions > .small,
.phone-price-panel > .panel-title > .small,
.monitor-grid .panel-title > .small,
.coupon-panel > .panel-title > .small {
  display: none;
}

.primary,
.secondary,
.icon-button,
.monitor-back-button {
  border-radius: 10px;
}

.phone-price-panel {
  overflow: hidden;
  margin-top: 18px;
  background: #fff;
  border-color: #d7e2eb;
}

.phone-price-panel > .panel-title {
  min-height: 0;
  padding: 20px 22px 14px;
  border-bottom: 0;
}

.phone-price-panel > .panel-title h3 {
  color: var(--phone-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .01em;
}

.phone-filter-bar {
  grid-template-columns: minmax(240px, 1.5fr) minmax(140px, .7fr) minmax(140px, .7fr) auto auto;
  margin: 0 22px 18px;
  padding: 11px;
  background: var(--phone-soft);
  border: 1px solid #e6edf3;
  border-radius: 12px;
}

.phone-search-field input,
.phone-filter-select select {
  min-height: 42px;
  background: #fff;
  border-color: #d8e3ec;
  border-radius: 10px;
}

.phone-filter-select span {
  color: #52657d;
  font-size: 11px;
  font-weight: 800;
}

.phone-filter-reset {
  min-height: 42px;
  padding: 0 12px;
  color: #52657d;
  background: #fff;
  border: 1px solid #d8e3ec;
  border-radius: 10px;
  font-weight: 700;
}

.phone-filter-reset:hover {
  color: var(--phone-accent);
  border-color: #88c5c0;
  background: #f0faf9;
}

.phone-filter-summary {
  justify-self: end;
  min-height: 42px;
  padding: 0 10px;
  color: #52657d;
  font-size: 11px;
  font-weight: 800;
}

.phone-price-groups {
  gap: 14px;
  padding: 0 22px 22px;
}

.phone-brand-group {
  overflow: hidden;
  background: #f8fafc;
  border-color: #d9e4ec;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgb(30 56 80 / 4%);
}

.phone-brand-heading {
  min-height: 72px;
  padding: 14px 18px;
  background: #fff;
  border-bottom-color: #e2eaf1;
}

.brand-title {
  gap: 11px;
}

.brand-badge {
  width: 44px;
  height: 44px;
  color: #244b80;
  background: #e3edff;
  border-radius: 12px;
  font-size: 12px;
}

.brand-oneplus .brand-badge {
  color: #244b80;
  background: #e3edff;
  font-size: 17px;
}

.brand-kicker,
.series-kicker {
  display: none;
}

.phone-brand-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.phone-brand-heading > span,
.phone-series-heading > span {
  padding: 5px 9px;
  color: #61738a;
  background: #f3f6fa;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.phone-series-group {
  padding: 16px 18px 18px;
}

.phone-series-heading {
  margin-bottom: 11px;
}

.phone-series-heading h4 {
  margin: 0;
  color: var(--phone-ink);
  font-size: 15px;
  font-weight: 800;
}

.phone-model-list {
  gap: 12px;
  padding: 0;
}

.phone-model-card {
  grid-template-columns: 206px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border-color: #dbe5ed;
  border-radius: 14px;
  box-shadow: 0 5px 16px rgb(29 55 78 / 4%);
}

.phone-model-summary {
  padding: 19px;
  background: #f7fafc;
  border-right-color: #e1e9f0;
}

.phone-model-media {
  width: 104px;
  height: 122px;
  margin-bottom: 13px;
  background: #fff;
  border-color: #e3eaf0;
  border-radius: 12px;
}

.model-kicker {
  color: #6b7b90;
  font-size: 10px;
}

.phone-model-summary h4 {
  margin: 4px 0 7px;
  color: var(--phone-ink);
  font-size: 20px;
  font-weight: 850;
}

.model-count {
  color: #718198;
  font-size: 11px;
}

.phone-model-summary > a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin-top: auto;
  padding: 0 10px;
  color: #087b78;
  background: #eaf7f6;
  border-radius: 8px;
  font-size: 11px;
}

.phone-model-summary > a:hover {
  background: #d9f1ef;
  text-decoration: none;
}

.phone-config-heading {
  min-height: 44px;
  padding: 0 16px;
  color: #718198;
  background: #f7f9fb;
  border-bottom-color: #e3eaf0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.phone-config-heading span:last-child {
  color: #52657d;
}

.phone-config-list {
  gap: 8px;
  padding: 10px;
  background: #f7f9fb;
}

.phone-config-row {
  grid-template-columns: minmax(126px, 1.15fr) repeat(5, minmax(62px, .8fr)) minmax(106px, 1fr) minmax(112px, 1fr) minmax(150px, 1.25fr);
  gap: 12px;
  padding: 13px 12px;
  background: #fff;
  border: 1px solid #e1e9f0;
  border-radius: 12px;
}

.phone-config-row:last-child {
  border-bottom: 1px solid #e1e9f0;
}

.phone-config-row:hover {
  background: #fbfefe;
  border-color: #b9d9d7;
  box-shadow: 0 5px 14px rgb(20 92 88 / 5%);
}

.phone-config-memory {
  gap: 5px;
  padding-left: 10px;
  border-left: 3px solid #8fb5de;
}

.phone-config-memory strong {
  color: var(--phone-ink);
  font-size: 14px;
  font-weight: 850;
}

.phone-config-memory span,
.phone-config-stat span,
.phone-config-stat small,
.phone-config-gifts > span,
.phone-config-colors-heading > span {
  color: #708198;
  font-size: 10px;
}

.phone-config-stat {
  gap: 4px;
}

.phone-config-stat strong {
  color: #253b55;
  font-size: 13px;
  font-weight: 800;
}

.phone-config-stat small {
  color: #8a99aa;
}

.phone-config-paid strong {
  color: #bf332a;
  font-size: 20px;
  letter-spacing: -.01em;
}

.phone-config-paid .phone-config-updated {
  color: #728095;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.phone-config-stat.has-discount strong {
  color: #a16207;
}

.phone-config-stat.is-empty strong {
  color: #7b8a9b;
}

.phone-config-gifts {
  gap: 6px;
}

.phone-config-gifts ul {
  gap: 4px;
}

.phone-config-gifts li {
  max-width: 100%;
  padding: 4px 7px;
  color: #586b80;
  background: #f1f5f8;
  border-radius: 7px;
}

.phone-config-gifts .gift-empty {
  color: #9aa7b5;
  font-size: 14px;
}

.phone-config-price-change {
  display: grid;
  min-height: 54px;
  min-width: 0;
  gap: 4px;
  align-content: center;
  padding: 7px 9px;
  border-left: 3px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.phone-config-price-change span,
.phone-config-price-change small {
  overflow: hidden;
  color: #708198;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-config-price-change strong {
  overflow: hidden;
  color: #52657d;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-config-price-change.is-down strong {
  color: #0f766e;
}

.phone-config-price-change.is-down {
  border-left-color: #0f766e;
  background: #effaf8;
}

.phone-config-price-change.is-up strong {
  color: #b42318;
}

.phone-config-price-change.is-up {
  border-left-color: #b42318;
  background: #fff4f2;
}

.phone-config-price-change.is-same strong {
  color: #52657d;
}

.phone-config-price-change.is-unknown strong {
  color: #7b8a9b;
  font-size: 12px;
}

.phone-config-colors {
  gap: 6px;
}

.phone-config-colors-heading {
  min-height: 28px;
}

.phone-config-colors-heading > span {
  font-weight: 800;
}

.phone-config-colors ul {
  gap: 5px;
}

.phone-color-stock {
  min-height: 24px;
  padding: 3px 7px;
  color: #216f6b;
  background: #eaf8f6;
  border-color: #c5e5e1;
  border-radius: 999px;
  font-size: 10px;
}

.phone-color-stock strong {
  max-width: 58px;
}

.phone-color-stock span {
  color: #14736d;
}

.phone-color-stock.is-out {
  color: #996515;
  background: #fff6df;
  border-color: #f0d79b;
}

.phone-color-stock.is-out span {
  color: #996515;
}

.phone-config-state {
  min-height: 44px;
  align-items: center;
  padding: 8px 10px;
  color: #94600b;
  background: #fff8e8;
  border: 1px solid #f0d69e;
  border-radius: 10px;
}

.phone-config-state strong {
  font-size: 15px;
}

.phone-config-state small {
  color: #aa8240;
  font-size: 10px;
}

.phone-config-row.is-out {
  grid-template-columns: minmax(126px, 1.15fr) repeat(5, minmax(62px, .8fr)) minmax(106px, 1fr) minmax(112px, 1fr) minmax(150px, 1.25fr);
  background: #fffdf7;
}

.phone-config-out-placeholder {
  min-height: 54px;
  visibility: hidden;
}

@media (max-width: 1100px) {
  .phone-config-row {
    grid-template-columns: minmax(118px, 1fr) repeat(5, minmax(64px, 1fr));
  }

  .phone-config-row.is-out {
    grid-template-columns: minmax(118px, 1fr) repeat(5, minmax(64px, 1fr));
  }

  .phone-config-gifts,
  .phone-config-price-change,
  .phone-config-colors {
    grid-column: 1 / -1;
    padding-top: 9px;
    border-top: 1px solid #edf1f4;
  }
}

@media (max-width: 700px) {
  .phone-price-panel > .panel-title {
    padding: 16px 14px 12px;
  }

  .phone-price-panel > .panel-title h3 {
    font-size: 18px;
  }

  .phone-filter-bar {
    grid-template-columns: 1fr 1fr;
    margin: 0 14px 14px;
    padding: 9px;
  }

  .phone-search-field {
    grid-column: 1 / -1;
  }

  .phone-price-groups {
    padding: 0 14px 14px;
  }

  .phone-brand-heading,
  .phone-series-group {
    padding-left: 13px;
    padding-right: 13px;
  }

  .phone-brand-heading > span,
  .phone-series-heading > span {
    padding: 4px 7px;
    font-size: 10px;
  }

  .phone-model-card {
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

  .phone-model-summary {
    padding: 14px;
  }

  .phone-model-media {
    width: 78px;
    height: 86px;
  }

  .phone-model-summary h4 {
    font-size: 17px;
  }

  .phone-config-heading {
    display: none;
  }

  .phone-config-list {
    padding: 8px;
  }

  .phone-config-row,
  .phone-config-row.is-out {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 12px;
    border-radius: 10px;
  }

  .phone-config-memory,
  .phone-config-paid {
    grid-column: span 2;
  }

  .phone-config-row.is-out .phone-config-memory,
  .phone-config-row.is-out .phone-config-state {
    grid-column: span 1;
  }

.phone-config-out-placeholder {
  display: none;
}

  .phone-config-gifts,
  .phone-config-colors {
    grid-column: span 2;
  }
}

/* Price history: one chart per exact model / memory / package / color SKU. */
.price-history-panel {
  margin-top: 14px;
}

.price-history-title {
  align-items: center;
}

.price-history-title .eyebrow {
  margin-bottom: 2px;
}

.price-history-title h3 {
  margin: 0;
}

.price-history-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-history-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(116px, .62fr)) minmax(260px, 1.25fr) auto;
  gap: 10px;
  align-items: end;
  padding: 0 16px 14px;
}

.price-history-search-field,
.price-history-select {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.price-history-search-field {
  position: relative;
}

.price-history-search-field svg {
  position: absolute;
  top: 31px;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #81909f;
  pointer-events: none;
}

.price-history-search-field input,
.price-history-select select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--phone-line);
  border-radius: 6px;
  outline: none;
  color: var(--phone-ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.price-history-search-field input {
  padding: 0 12px 0 36px;
}

.price-history-select span {
  color: var(--phone-muted);
  font-size: 10px;
}

.price-history-select select {
  overflow: hidden;
  padding: 0 28px 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-history-search-field input:focus,
.price-history-select select:focus {
  border-color: #4f91d2;
  box-shadow: 0 0 0 3px rgba(45, 124, 197, .12);
}

.price-history-reset {
  min-height: 40px;
  white-space: nowrap;
}

.price-history-query {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  white-space: nowrap;
}

.price-history-query svg {
  width: 15px;
  height: 15px;
}

.price-history-reset svg {
  width: 14px;
  height: 14px;
  vertical-align: -3px;
}

.price-history-periods {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--phone-line);
}

.price-history-periods button {
  min-width: 58px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #758498;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.price-history-periods button:hover,
.price-history-periods button.is-active {
  color: #166b9d;
  border-bottom-color: #2585c2;
}

.price-history-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  min-height: 356px;
}

.price-history-chart-card {
  min-width: 0;
  padding: 18px 18px 12px;
}

.price-history-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
}

.price-history-chart-heading strong,
.price-history-chart-heading span {
  display: block;
}

.price-history-chart-heading strong {
  overflow: hidden;
  color: var(--phone-ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-history-chart-heading span {
  margin-top: 5px;
  color: var(--phone-muted);
  font-size: 11px;
}

.price-history-chart-heading .price-history-latest {
  flex: none;
  margin: 0;
  color: #0b6e6d;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 16px;
  font-weight: 800;
}

.price-history-chart {
  display: grid;
  min-height: 272px;
  place-items: center;
}

.price-history-chart svg {
  display: block;
  width: 100%;
  max-width: 840px;
  height: auto;
  overflow: visible;
}

.price-history-grid {
  stroke: #e5edf3;
  stroke-dasharray: 3 4;
}

.price-history-axis {
  stroke: #cbd7e2;
}

.price-history-axis-label,
.price-history-date {
  fill: #8090a2;
  font-size: 11px;
}

.price-history-line {
  fill: none;
  stroke: #2080bb;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.price-history-point {
  fill: #fff;
  stroke: #2080bb;
  stroke-width: 2;
}

.price-history-point.is-down {
  fill: #18826f;
  stroke: #18826f;
}

.price-history-point.is-up {
  fill: #d55a45;
  stroke: #d55a45;
}

.price-history-value-label {
  fill: #26465e;
  font-size: 12px;
  font-weight: 800;
}

.price-history-events {
  min-width: 0;
  padding: 18px 16px;
  border-left: 1px solid var(--phone-line);
  background: #fbfdff;
}

.price-history-events-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef3;
}

.price-history-events-heading strong {
  color: var(--phone-ink);
  font-size: 14px;
}

.price-history-events-heading span {
  color: var(--phone-muted);
  font-size: 11px;
}

.price-history-events ol {
  display: grid;
  gap: 1px;
  max-height: 286px;
  margin: 0;
  padding: 8px 0 0;
  overflow: auto;
  list-style: none;
}

.price-history-event {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #edf2f6;
}

.price-history-event-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #d55a45;
}

.price-history-event.is-down .price-history-event-dot {
  background: #18826f;
}

.price-history-event strong,
.price-history-event small {
  display: block;
}

.price-history-event strong {
  color: #b64a37;
  font-size: 12px;
}

.price-history-event.is-down strong {
  color: #087166;
}

.price-history-event small {
  margin-top: 3px;
  color: #7f8da0;
  font-size: 10px;
  line-height: 1.45;
}

.price-history-events .empty {
  padding: 18px 0;
}

@media (max-width: 1260px) {
  .price-history-filter-bar {
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(120px, .7fr));
  }

  .price-history-config-select {
    grid-column: span 2;
  }
}

@media (max-width: 880px) {
  .price-history-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 14px 12px;
  }

  .price-history-search-field,
  .price-history-config-select {
    grid-column: 1 / -1;
  }

  .price-history-workspace {
    grid-template-columns: 1fr;
  }

  .price-history-events {
    border-top: 1px solid var(--phone-line);
    border-left: 0;
  }

  .price-history-events ol {
    max-height: 220px;
  }
}

@media (max-width: 560px) {
  .price-history-title-actions .small {
    display: none;
  }

  .price-history-periods {
    justify-content: space-between;
    padding-left: 12px;
    padding-right: 12px;
  }

  .price-history-periods button {
    min-width: 0;
    padding: 0 6px;
  }

  .price-history-chart-card,
  .price-history-events {
    padding-left: 12px;
    padding-right: 12px;
  }

  .price-history-chart-heading strong {
    max-width: 190px;
  }
}
