/* V26: demand-led catalogue order and one consistent purchase interface. */

html {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select {
  font-family: var(--font);
  font-optical-sizing: auto;
  font-kerning: normal;
}

.icon {
  stroke-width: 1.75;
}

/* The primary navigation follows shopping demand. Utility destinations stay last. */
.site-header .main-nav {
  gap: 22px;
}

.site-header .main-nav .nav-used {
  margin-left: 0;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 7px;
  background: #f3efe8;
  color: #3f3429;
  font-weight: 650;
}

.site-header .main-nav .nav-used:hover,
.site-header .main-nav .nav-used.is-active {
  background: #e8dfd3;
  color: #241e19;
}

.site-header .main-nav .nav-all {
  min-height: 24px;
  padding: 8px 0 8px 20px;
  border-right: 0;
  border-left: 1px solid var(--line);
  color: #5d6470;
  font-weight: 550;
}

.category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 18px;
}

.category-tile--used .category-photo {
  padding: 0;
  background: #f3efe8;
}

.category-tile--used .category-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
}

.category-tile--used:hover .category-photo {
  background: #e8dfd3;
}

/* Cards keep a stable rhythm; complete copy remains available in product details. */
.product-card .product-title {
  min-height: 3em;
}

.product-card .product-title h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card .product-description,
.product-card--games .product-description {
  display: -webkit-box;
  min-height: calc(1.65em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card--games .favorite-btn,
.product-card--used .favorite-btn {
  display: grid;
}

.product-card--games .condition-label {
  display: inline-flex;
}

.product-card--games .card-specs {
  display: grid;
}

.product-card--games .add-btn > .icon {
  display: block;
}

.product-card .add-btn {
  width: auto;
  min-width: 118px;
  padding: 0 15px;
}

.product-card .add-btn > span {
  display: inline;
}

.product-card .variant-card-button {
  min-width: 118px;
}

.product-price,
.detail-price,
.cart-line-price,
.summary-total strong {
  font-variant-numeric: tabular-nums;
}

/* Colour names are announced once in the legend; controls remain visual swatches. */
.product-dialog .variant-colors {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
}

.product-dialog .variant-color {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 6px;
  border: 1px solid #d9dce2;
  border-radius: 50%;
  background: #fff;
  color: inherit;
}

.product-dialog .variant-color > span:first-child {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 16%);
}

/* Older gallery styles exposed the accessible label next to the swatch. */
.product-dialog .variant-color > .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.product-dialog .variant-color[aria-pressed="true"] {
  border-color: #2438bb;
  background: #fff;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3d5afe;
}

.product-dialog .variant-selection-label {
  position: absolute !important;
  display: block !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Purchase decisions stay above the long description on every screen size. */
.product-dialog .detail-price {
  margin-top: 16px;
}

.product-dialog .variant-selector {
  margin-top: 12px;
}

.detail-service-list {
  display: grid;
  gap: 0;
  margin: 15px 0 0;
  padding: 0;
  border-block: 1px solid #e7e3eb;
  list-style: none;
}

.detail-service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 2px;
  color: #5e5865;
  font-size: .8125rem;
  line-height: 1.45;
}

.detail-service-list li + li {
  border-top: 1px solid #efecf1;
}

.detail-service-list .icon {
  width: 18px;
  height: 18px;
  color: #3f54d9;
}

.product-dialog .detail-summary {
  margin-top: 18px;
}

.product-dialog .detail-highlights {
  margin-top: 15px;
}

.product-dialog .gallery-arrow .icon {
  width: 21px;
  height: 21px;
}

.product-price .promotion-reference,
.detail-price .promotion-reference {
  font-size: .75rem;
  line-height: 1.55;
}

@media (max-width: 1200px) {
  .category-grid {
    display: flex;
    gap: 15px;
  }
}

@media (max-width: 660px) {
  .site-header .main-nav.is-open .nav-used {
    background: #eee7dc;
  }

  .site-header .main-nav.is-open .nav-all {
    padding-left: 12px;
    border-left: 0;
  }

  .product-card .product-description,
  .product-card--games .product-description {
    min-height: calc(1.65em * 2);
    -webkit-line-clamp: 2;
  }

  .product-card .product-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .product-card .add-btn,
  .product-card .variant-card-button,
  .product-card .pending-details {
    width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  .product-card .promotion-reference,
  .detail-price .promotion-reference {
    font-size: .75rem;
  }

  .detail-service-list li {
    min-height: 44px;
    font-size: .8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card img,
  .category-tile img {
    transition: none;
  }
}
