/* Shared V2 presentation for the dedicated deals route and category landing surfaces. */
.catalog-route-v2 {
  --route-panel: #121219;
  --route-panel-raised: #191922;
  --route-line: rgba(255,255,255,.1);
  --route-muted: #a4a4b1;
  --route-radius: 16px;
}

.catalog-route-v2 .catalog-head {
  padding-block: 30px 20px;
}
.catalog-route-v2 .catalog-head h1 {
  margin: 7px 0 5px;
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.catalog-route-v2 .catalog-head p {
  margin: 0;
  color: var(--route-muted);
  line-height: 1.75;
}
.catalog-route-v2 .catalog-section {
  padding-bottom: 56px;
}

.deals-route-v2 .xbox-deals-layout {
  display: grid;
  grid-template-columns: minmax(235px,255px) minmax(0,1fr);
  align-items: start;
  gap: 28px;
}
.deals-route-v2 .xbox-deals-filters {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 15px;
  border: 1px solid var(--route-line);
  border-radius: var(--route-radius);
  background: var(--route-panel);
  scrollbar-width: thin;
}
.deals-route-v2 .xbox-deals-filter-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--route-line);
}
.deals-route-v2 .xbox-deals-filter-head h2 { font-size: 1.05rem; }
.deals-route-v2 .xbox-deals-filters form { gap: 13px; }
.deals-route-v2 .xbox-deals-filters input,
.deals-route-v2 .xbox-deals-filters select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border-color: var(--route-line);
  border-radius: 10px;
  background: #0d0d12;
}
.deals-route-v2 .xbox-deals-price-inputs { gap: 7px; }
.deals-route-v2 .xbox-deals-quick a {
  border-color: var(--route-line);
  border-radius: 9px;
  color: #d6d6de;
}
.deals-route-v2 .xbox-deals-quick a:hover,
.deals-route-v2 .xbox-deals-quick a:focus-visible,
.deals-route-v2 .xbox-deals-filters input:focus-visible,
.deals-route-v2 .xbox-deals-filters select:focus-visible {
  outline: 2px solid rgba(249,115,22,.65);
  outline-offset: 2px;
  border-color: var(--accent);
}
.deals-route-v2 .xbox-deals-filter-actions { gap: 7px; }
.deals-route-v2 .xbox-deals-filter-actions .button { min-height: 42px; border-radius: 10px; }
.deals-route-v2 .xbox-deals-filter-actions .button-secondary { color: #fff; }
.deals-route-v2 .xbox-deals-results { min-width: 0; }
.deals-route-v2 .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}
.deals-route-v2 .filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--route-line);
  border-radius: 999px;
  background: var(--route-panel);
  color: #e8e8ed;
  font-size: .75rem;
}
.deals-route-v2 .filter-chip-reset { border-color: rgba(249,115,22,.35); color: #ffad76; font-weight: 800; }
.deals-route-v2 .product-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  align-items: stretch;
  gap: 14px;
}
.deals-route-v2 .product-card,
.category-route-v2 .latest-preview .product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--route-line);
  border-radius: var(--route-radius);
  background: linear-gradient(145deg,var(--route-panel),#0d0d13);
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}
.deals-route-v2 .product-card:hover,
.deals-route-v2 .product-card:focus-within,
.category-route-v2 .latest-preview .product-card:hover,
.category-route-v2 .latest-preview .product-card:focus-within {
  border-color: rgba(249,115,22,.4);
  box-shadow: 0 16px 34px rgba(0,0,0,.24);
}
.deals-route-v2 .product-image,
.category-route-v2 .latest-preview .product-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #0b0b10;
}
.deals-route-v2 .product-card:not(.product-card-service) .product-image img,
.category-route-v2 .latest-preview .product-card:not(.product-card-service) .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.deals-route-v2 .product-card-service .product-image,
.category-route-v2 .latest-preview .product-card-service .product-image {
  aspect-ratio: 1/1;
  padding: 10px;
}
.deals-route-v2 .product-card-service .product-image img,
.category-route-v2 .latest-preview .product-card-service .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.deals-route-v2 .card-discount,
.category-route-v2 .latest-preview .card-discount {
  direction: ltr;
  unicode-bidi: isolate;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  text-align: center;
}
.deals-route-v2 .product-body,
.category-route-v2 .latest-preview .product-body { gap: 7px; padding: 13px; }
.deals-route-v2 .product-kind,
.category-route-v2 .latest-preview .product-kind { min-height: 1.4em; color: var(--route-muted); font-size: .7rem; }
.deals-route-v2 .product-card h3,
.category-route-v2 .latest-preview .product-card h3 {
  min-height: 2.9em;
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
}
.deals-route-v2 .product-card h3 a,
.category-route-v2 .latest-preview .product-card h3 a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.deals-route-v2 .card-details,
.category-route-v2 .latest-preview .card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 1.5em;
  color: #9a9aa6;
  font-size: .68rem;
  line-height: 1.4;
}
.deals-route-v2 .card-details > span,
.category-route-v2 .latest-preview .card-details > span { max-width: 100%; overflow-wrap: anywhere; }
.deals-route-v2 .price-row,
.category-route-v2 .latest-preview .price-row { margin-top: auto; }
.deals-route-v2 .price-row strong,
.category-route-v2 .latest-preview .price-row strong { font-size: 1.12rem; }
.deals-route-v2 .discount-expiry-card,
.deals-route-v2 .flash-card-status { min-height: 1.4em; color: #ffbf8e; font-size: .66rem; line-height: 1.4; }
.deals-route-v2 .product-card .button-small,
.category-route-v2 .latest-preview .product-card .button-small { width: 100%; min-height: 40px; margin-top: 3px; border-radius: 10px; padding: 8px 10px; font-size: .74rem; }
.deals-route-v2 .empty-state { padding: 54px 24px; border-color: var(--route-line); background: rgba(255,255,255,.025); }
.deals-route-v2 .pagination { margin-top: 22px; }
.deals-route-v2 .pagination a { border-color: var(--route-line); border-radius: 9px; background: var(--route-panel); }
.deals-route-v2 .pagination a.active,
.deals-route-v2 .pagination a:hover,
.deals-route-v2 .pagination a:focus-visible { border-color: var(--accent); background: rgba(249,115,22,.1); color: #ffd1b2; }

.category-route-v2 .category-hero { margin-top: 16px; }
.category-route-v2 .section-discovery,
.category-route-v2 .latest-preview { padding-top: 34px; }
.category-route-v2 .section-card-grid { gap: 12px; }
.category-route-v2 .section-card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.category-route-v2 .section-card { min-height: 100px; padding: 16px 18px; border-radius: 13px; }
.category-route-v2 .section-card:hover,
.category-route-v2 .section-card:focus-visible { outline: none; }
.category-route-v2 .latest-preview .product-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }

@media (min-width: 900px) and (max-width: 1199px) {
  .deals-route-v2 .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .category-route-v2 .latest-preview .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 899px) {
  .deals-route-v2 .xbox-deals-layout { display: block; }
  .deals-route-v2 .xbox-deals-mobile-toggle { display: inline-flex; margin-bottom: 12px; }
  .deals-route-v2 .xbox-deals-filters {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(92vw,400px);
    max-height: none;
    padding: 18px 18px max(18px,env(safe-area-inset-bottom));
    border-radius: 20px 0 0 20px;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .2s ease, visibility .2s ease;
  }
  .deals-route-v2 .xbox-deals-filters.open { transform: none; visibility: visible; }
  .deals-route-v2 .xbox-deals-filter-head { position: sticky; top: -18px; z-index: 2; padding: 8px 0 12px; background: var(--route-panel); }
  .deals-route-v2 .xbox-deals-filters input,
  .deals-route-v2 .xbox-deals-filters select,
  .deals-route-v2 .xbox-deals-filters .button { min-height: 44px; }
  .deals-route-v2 .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .category-route-v2 .latest-preview .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .category-route-v2 .section-heading { align-items: flex-start; }
  .category-route-v2 .section-heading > div { width: 100%; text-align: right; }
  .category-route-v2 .section-heading > a { align-self: flex-start; }
  .category-route-v2 .section-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-route-v2 .section-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .catalog-route-v2 .catalog-head { padding-block: 24px 16px; }
  .catalog-route-v2 .catalog-head h1 { font-size: clamp(1.75rem,8vw,2.2rem); }
  .catalog-route-v2 .catalog-head p { font-size: .82rem; }
  .catalog-route-v2 .catalog-section { padding-bottom: 42px; }
  .deals-route-v2 .product-image,
  .category-route-v2 .latest-preview .product-image { aspect-ratio: 4/5; }
  .deals-route-v2 .product-body,
  .category-route-v2 .latest-preview .product-body { gap: 6px; padding: 10px; }
  .deals-route-v2 .product-kind,
  .category-route-v2 .latest-preview .product-kind { font-size: .62rem; }
  .deals-route-v2 .product-card h3,
  .category-route-v2 .latest-preview .product-card h3 { font-size: .78rem; line-height: 1.42; }
  .deals-route-v2 .card-details,
  .category-route-v2 .latest-preview .card-details { font-size: .6rem; }
  .deals-route-v2 .price-row strong,
  .category-route-v2 .latest-preview .price-row strong { font-size: .98rem; }
  .deals-route-v2 .product-card .button-small,
  .category-route-v2 .latest-preview .product-card .button-small { min-height: 38px; font-size: .67rem; }
  .category-route-v2 .section-card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 379px) {
  .category-route-v2 .section-card-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .deals-route-v2 .xbox-deals-filters,
  .deals-route-v2 .product-card,
  .category-route-v2 .latest-preview .product-card { transition: none; }
}
