/* public/browse/styles.css */
:root{
  color-scheme: light;
  --muted: #6b7280; /* safe even if global styles.css also defines it */
}

html, body { height: 100%; }

body{
  margin: 0;
  background: #fafafa;
  color: #111;
}

/* page layout so footer sits at bottom */
.page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page > main{
  flex: 1;
}

.wrap{
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto; padding-bottom: 40px;
}

.layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31%;
  gap: 20px;
  margin-top: 10px;
  align-items: start;
}

.layout.layout--specs{
  grid-template-columns: minmax(0, 1fr);
}

.layout.layout--specs .sidecol{
  display: none !important;
}

.browse-topbar--specs{
  justify-content: flex-start;
}

.browse-topbar__left--specs{
  flex-wrap: wrap;
  gap: 10px;
}

.spec-top-pill{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}

.spec-top-pill:hover{
  border-color: rgba(0,0,0,0.22);
}

.spec-top-pill.is-active{
  background: #111;
  color: #fff;
  border-color: #111;
}

.spec-card-pills{
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.spec-card-pills::-webkit-scrollbar{
  display: none;
}

.shortlist-rail[hidden]{
  display: none !important;
}

@media (min-width: 1280px){
  .browse-page .shortlist-mini::-webkit-scrollbar{
    width: 0;
    height: 0;
  }

  .browse-page .shortlist-mini-item--launch{
    margin-top: auto;
    height: 40px;
  }

  .browse-page .shortlist-mini-link--launch{
    padding-left: 14px;
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
    color: black;
    height: 40px;
  }

  .browse-page .shortlist-mini-launch-icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
  }

  .browse-page .shortlist-mini-launch-icon svg{
    width: 26px;
    height: 26px;
    fill: currentColor;
    display: block;
  }

  /* Title label — hidden until hover expands the item */
  .browse-page .shortlist-mini-title{
    flex: 1;
    min-width: 0;
    padding: 0 10px 0 8px;
    font-size: 12px;
    line-height: 1.3;
    color: #111;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    opacity: 0;
    transition: opacity 0.15s ease 0.05s;
  }
}

@media (max-width: 1279px){
  .browse-page .shortlist-rail{
    display: none !important;
  }
}

.spec-card-stat{
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.spec-card-stat-label{
  font-size: 12px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  white-space: nowrap;
}

.spec-card-stat-value{
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
}

.spec-card-main{
  min-width: 0;
}

.spec-card-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 28px;
  margin-top: 14px;
  align-items: start;
}

.spec-card-body{
  display: block;
  min-width: 0;
}

.spec-card-head{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: start;
}

.spec-card-titlewrap{
  min-width: 0;
}

.spec-card-price{
  font-size: 22px;
  line-height: 1;
  padding-right: 30px;
  padding-top: 2px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  text-align: right;
  justify-self: end;
}

.spec-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--spec-pill-bg, #f3f4f6);
  color: var(--spec-pill-text, #111);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* Hide sidebar scrollbar but keep scroll */
@media (min-width: 861px){
  body.has-detail .sidecol::-webkit-scrollbar{
    width: 0;
    height: 0;
  }

  body.has-detail .sidecol::-webkit-scrollbar-thumb{
    background: transparent;
  }
}

@media (min-width: 861px){
  body.has-detail .sidecol{
    position: sticky;
    top: var(--pc-detail-top, 66px);
    height: calc(100vh - var(--pc-detail-top, 68px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    -ms-overflow-style: auto;
  }

  body.has-detail #detailPanel.side-panel.detail{
    max-height: none;
  }
}

.sidecard{
  padding: 16px;
  margin-bottom: 16px;
}

.sidecard .side-title{
  font-size: 28px;
  font-weight:500;
  margin: 0;
}

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

.price-from{
  font-weight: 400;
  color: #86868b;
  font-size: 17px;
}

.price-amt{
  font-weight: 600;     /* keep the actual number bold */
}

.seller-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.seller-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

@media (min-width: 861px){
  body.has-detail #detailPanel.side-panel.detail{
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-bottom: 6px;
  }
}

.seller-icon-badge {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
}

.sidecard .side-sub{
  font-size: 16px;
  color: var(--muted);
}

.sidecard .pillrow{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.swatchbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  cursor: pointer;
}

.swatchbtn:hover{
  border-color: rgba(0,0,0,0.16);
}

.swatchbtn.is-active{
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.pc-swatch {
  display: inline-block;
  width: 35px;
  height: 35px;
  border-radius: 999px;
  background: var(--pc-swatch, #9ca3af);
  border: 1px solid var(--pc-swatch-border, rgba(0,0,0,0.12));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset;
}

.sidecard .pillbtn:hover{
  border-color: rgba(0,0,0,0.16);
}

.sidecard .pillbtn:active{
  transform: translateY(1px);
}

.pillbtn.is-active {
  outline: 1px solid #86868b;
}

.side-block { margin-top: 12px; }
.side-label { font-size: 16px; opacity: 0.7; margin: 18px 0 8px 0; }

#conditionFilter {
  border-radius: 14px;
  margin-bottom: 10px;
  display: none;
}

.browse-topbar__left{
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #6b7280;
}

#conditionFilter[hidden] { display: none; }

.condition-seg {
  display: inline-flex !important;
  border: 1px solid rgba(0,0,0,0.14) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  gap: 0 !important;
}

.browse-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.browse-topbar__left,
.browse-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.browse-sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.browse-sort__label {
  font-size: 13px;
  color: var(--muted, #6b7280);
  white-space: nowrap;
}

.browse-sort__select {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  color: #6b7280;
  border: 1px solid rgba(0,0,0,0.12);
  background: transparent;
  font-size: 14px;
}

.browse-sort__select:hover {
  border-color: rgba(0,0,0,0.16);
  color: #111;
}

.condition-seg__btn {
  padding: 5px 12px 4px 12px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  background: transparent !important;
  border: none !important;
  border-right: 1px solid rgba(0,0,0,0.14) !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.condition-seg__btn:last-child {
  border-right: none !important;
}

.condition-seg__btn:hover {
  border-color: rgba(0, 0, 0, 0.16 ) !important;
    color: #111 !important;
}

.condition-seg__btn.is-active {
  background: var(--ink) !important;
  color: #fff !important;
  font-weight: 500 !important;
}

.sidecard .mini{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111;
  font-size: 12px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 16px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.card-badge--refurb {
  background: #fef3c7;
  color: #92400e;
}

.card-badge--bundle {
  background: #ede9fe;
  color: #5b21b6;
}

/* Hide sidebar on tablet/mobile (keeps your current grid switch) */
@media (max-width: 860px){
  .layout{
    display: block;
  }
  .sidecol{
    display: none;
  }
}

h1{
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.muted{
  color: var(--muted);
}

/* Inline empty state under H1 (desktop + mobile) */
.empty-inline{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 20px;
}

.card.item .kbd{
  padding: 4px 9px;
  top: -3px;
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.8);
  color: #111;
  font-size: 14px;
  line-height: 1;
  user-select: none;
  margin-left: 4px;
}

#detailPanel.side-panel.detail{
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: #fff;

  position: sticky;
  top: 16px;

  /* Do not clip content */
  max-height: none;
  overflow: visible;
}

/* ── Detail panel action toolbar ─────────────────────── */
.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 6px;
}

.detail-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 20px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  padding: 0;
  flex-shrink: 0;
}

.detail-action-btn:hover {
  color: #111;
}

.detail-action-btn[aria-pressed="true"] {
  color: #111;
}

/* Remove old individual button styles */
.detail-close,
.detail-expand {
  all: unset;
}

/* Keep the head layout clean */
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.detail-close {
  border: none;
  padding: 0;
  border-radius: 10px;
  background-color: #fff;
  height: 34px;
  line-height: 1;
  cursor: pointer;
}

.detail-head-brand {
  font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-top {
  margin-bottom: 10px;
}

.browse-page .pc-tabs,
.browse-page .pc-tabs-inner{
  display:none !important;
}

.browse-page .browse-rail[hidden]{
  display:none !important;
}

.browse-rail__placeholder{
  width:22px;
  height:22px;
  display:block;
  border-radius:999px;
  border:1.5px dashed currentColor;
  opacity:.35;
}

@media (min-width: 1280px){
  .browse-page .wrap {
    box-sizing: border-box;
    min-height: 100vh;
    width: min(1280px, calc(100% - 112px));
    margin: 0 auto;
    padding: 0px 24px 90px;
  }

  .browse-page .browse-rail{
    position:fixed;
    left:0;
    top:55px;
    bottom:0;
    height:calc(100dvh - 55px);
    width:56px;
    z-index:50;
  }

  .browse-page .browse-rail__inner{
    display:flex;
    flex-direction:column;
    align-items:center;
    box-sizing:border-box;
    height:100%;
    padding:12px 8px;
    border:1px solid rgba(15,23,42,.08);
    border-left:0;
  }

  .browse-page .browse-rail__main{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    flex:1 1 auto;
    width:100%;
  }

  .browse-page .browse-rail__tabs{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    width:100%;
  }

  .browse-page .browse-rail__pager{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:14px;
    flex:0 0 auto;
    width:100%;
  }

  .browse-page .browse-rail__btn{
    width:40px;
    height:40px;
    border:0;
    border-radius:12px;
    background:transparent;
    color:#6b7280;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:background .16s ease, color .16s ease, transform .16s ease;
  }

  .browse-page .browse-rail__btn:hover{
    background:#f3f4f6;
    color:#111827;
    transform:translateX(1px);
  }

  .browse-page .browse-rail__btn.is-active{
    background: #E8F0FE;
    color: #4285F4;
  }

  .browse-page .browse-rail__btn:disabled{
    opacity:.45;
    cursor:default;
    transform:none;
  }

  .browse-page .browse-rail__btn svg{
    width:22px;
    height:22px;
    display:block;
    fill:currentColor;
  }

  .browse-page .browse-rail__arrow svg{
    width:26px;
    height:26px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  .browse-page .browse-rail__arrow--prev svg{
    transform:rotate(180deg);
  }
}

@media (max-width: 1279px){
  .browse-page .browse-rail{
    display:none !important;
  }
}

.detail-title {
  font-size: 24px;
  font-weight: 500;
}

.detail-img-wrap {
  margin: 10px 0 12px;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
}

.detail-img {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  object-fit: contain;
}

.offer-price{
  white-space: nowrap;
}

.offer-icon{
  flex: 0 0 auto;
}

.detail-offer-price {
  white-space: nowrap;
  text-align: right;
}

.offer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  text-decoration: none;
}

.offer-icon svg {
  display: block;
}

/* keeps alignment when no link exists */
.offer-icon-spacer {
  width: 28px;
  height: 28px;
  display: inline-block;
}

@media (max-width: 1100px){
  .browse-tip-top {
    display: none;
  }

  .brand-icon-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px){
  .card.item .kbd{ display: none; }
}

.empty-inline .msg{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-inline .msg strong{
  color: #111;
  font-weight: 600;
}

.card-variants .morelink {
  border: none;
  background: none;
  cursor: pointer;
}

.price-row{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: auto;
}

.price{
  margin-top: 0;
}

.store-badge{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  display: block;
}

.store-stack{
  margin-left: 10px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
}

.store-stack > *{
  display: block;
}

.store-stack > * + *{
  margin-left: -6px;
}

.store-badge-more,
.store-badge-fallback{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

.detail-about{
  margin-top: 18px;
}

.detail-about-paragraphs p{
  margin: 0 0 12px 0;
  font-size: 16px;
  line-height: 1.55;
  color: #3c4043;
}

.detail-about-paragraphs p:last-child{
  margin-bottom: 0;
}

.card-variants{
  display: flex;
  flex-wrap: nowrap; 
  gap: 8px;
  padding: 8px 1px 1px 1px;
  overflow: hidden;      
  min-width: 0;  
}

.btn--outline { white-space: nowrap; }

.card-variants .pillbtn{
  flex: 0 0 auto; 
  white-space: nowrap;
  overflow: visible; 
  text-overflow: clip;
  max-width: none; 
}

.pillbtn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #111;
}

.pillbtn:hover{
  border-color: rgba(0,0,0,0.16);
}

.pillbtn:active{
  transform: translateY(1px);
}

#detailPanel .detail-variants{
  margin-top: 6px;
}

#detailPanel .pillrow{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 10px;
}

.offer-row:first-child{
  border-top: 0;
}

.offer-store{
  min-width: 0;
  flex: 1;
  font-size: 18px;
}

.offer-right{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-icon-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-width: 100%;
}

.brand-icon-btn{
  width: 48px;
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  border: none;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.brand-icon-btn:hover{
  border-color: rgba(0,0,0,0.16);
}

.brand-icon-img{
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.brand-icon-fallback{
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #111;
  font-size: 24px;
  font-weight: 500;
}

.offer-price{
  font-weight: 550;
  font-size: 20px;
  white-space: nowrap;
}

.offer-tag{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.offer-link a{
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.offer-link a:hover{
  text-decoration: underline;
}

/* Coupon line spans full width under the row */
.offer-coupon{
  margin-top: -4px;
  font-size: 13px;
  flex: 0 0 100%;
}

/* Small screens: collapse to 2 columns */
@media (max-width: 520px){
  .offer-tag{
    text-align: left;
    white-space: normal;
    overflow: visible;
    flex: 0 0 100%;
    text-overflow: clip;
  }

  .offer-link{
    text-align: right;
  }
}

.empty-inline a.pc-dym{
  color: #111;
  text-decoration: underline;
  font-weight: 600;
}

.empty-inline .kbd{
  padding: 8px 10px;
  margin-top: 1px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.8);
  color: #111;
  font-size: 16px;
  line-height: 1;
  user-select: none;
}

/* Optional: make it feel tighter on small screens */
@media (max-width: 520px){
  .empty-inline{ font-size: 20px; }
  .empty-inline .kbd{ display: none; }
  .store-stack {
    display: none;
  }
}

.browse-card-score{
  position:absolute;
  right:10px;
  bottom:10px;
  z-index:2;
  width:32px;
  height:32px;
  border-radius:10px;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
  font-weight:700;
  color:#fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.10);
}

.browse-card-score--great{ background:#67c27d; }
.browse-card-score--good{ background:#84cc16; }
.browse-card-score--mixed{ background:#f59e0b; }
.browse-card-score--low{ background:#ef4444; }

@media (max-width:530px){
  .browse-card-score{
    right:8px;
    bottom:8px;
    width:38px;
    height:38px;
    border-radius:10px;
    font-size:18px;
  }
}

/* card base */
.card{
  background: #fff;
  border-radius: 14px;
  box-shadow: none;
}

.controls .row{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pager{
  justify-content: space-between;
  margin-top: 20px;
  align-items: center;
  gap: 10px;
}

.pill{
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  cursor: pointer;
}

.pill:disabled{
  opacity: 0.45;
  cursor: default;
}

.grid{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card.item{
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: stretch;
  gap: 40px;
  height: 220px;
  padding: 8px 22px;
  box-sizing: border-box;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

/* shortlist save button on product cards */
.card.item{
  position: relative;
}

.card-shortlist-btn{
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .14s ease, color .14s ease, background .14s ease;
  padding: 0;
}

.card.item.spec-card .card-shortlist-btn{
  opacity: 0.55;
}

.card.item.spec-card:hover .card-shortlist-btn{
  opacity: 1;
}

.card.item.spec-card .card-shortlist-btn.is-active{
  opacity: 1;
}

.card.item:hover .card-shortlist-btn{
  opacity: 1;
}

.card-shortlist-btn:hover{
  color: #111;
  background: #fff;
}

.card-shortlist-btn.is-active{
  opacity: 1;
  color: #34A853;
  background: #E6F4EA;
}

.card-shortlist-btn svg{
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

.thumb{
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browse-tip-side{
  padding: 0 8px 0 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #7a7f87;
}

.img{
  width: 100%;
  height: 204px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.img.ph{
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f3f4f6, #eef2f7);
}

.body{
  padding: 0;
  padding-bottom: 10px;
  padding-top: 6px;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-snippet{
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.35;
  color: #5f6368;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subtitle{
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name{
  font-weight: 500;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.name--with-about{
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.name--no-about{
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.right{
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  white-space: nowrap;
}

.price{
  font-weight: 600;
  font-size: 22px;
  white-space: nowrap;
}

.warn{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7e6;
  border: 1px solid #ffe2a8;
  color: #7a5a00;
  white-space: nowrap;
}

/* Hide mobile-only row on desktop */
.row2{ display: none; }

@media (max-width: 350px){
  .browse-sort {
    display: none;
  }
}

/* ===== Mobile/Tablet: switch back to cards ===== */
@media (max-width: 860px){
  .wrap{ width: calc(100% - 28px);}

  .card{
    border-radius: 18px;
  }

  .card.item{
    gap: 0;
    padding: 0;
  }

  .about-snippet{
    display: none;
  }

  .thumb{
    width: 100%;
    height: auto;
    border-radius: 0;
  }

  .img{
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .body{
    padding: 12px 12px 14px;
  }

  .name{
    margin-top: 6px;
    font-size: 18px;
    white-space: normal;
    text-overflow: clip;
  }
  
  .price-from {
    font-size: 16px;
  }

  .price {
    font-size: 20px;
  }

  .warn {
    display: none;
  }

  .right{ display: none; }

  .row2{
    display: flex;
    margin-top: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .pager{ margin-left: 0; width: 100%; justify-content: flex-end; }
}

.card.item.spec-card{
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  padding: 20px;
  gap: 20px;
  align-items: start;
}

.card.item.spec-card .thumb{
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 150px;
  height: 150px;
}

.spec-card-stat-value:empty::after{
  content: "—";
  color: #9ca3af;
}

.card-spec-squares{
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.card-spec-square{
  aspect-ratio: 1 / 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fafafa;
  display: grid;
  grid-template-rows: 24px 30px;
  align-content: center;
  justify-items: center;
  row-gap: 5px;
  text-align: center;
  padding: 8px 6px;
  box-sizing: border-box;
}

.card-spec-square__value{
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
}

.card-spec-square__label{
  height: 30px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1.12;
  font-weight: 500;
  color: #6b7280;
  text-wrap: balance;
}

.card.item .name--no-about{
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (max-width: 1079px){
  .card-spec-squares{
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .card-spec-square{
    aspect-ratio: auto;
    height: 58px;
    min-height: 0;
    grid-template-rows: 20px 22px;
    row-gap: 2px;
    padding: 6px 5px;
  }

  .card-spec-square:nth-child(5){
    display: none;
  }

  .card-spec-square__value{
    height: 20px;
    font-size: 16px;
    line-height: 1;
  }

  .card-spec-square__label{
    height: 22px;
    line-height: 1.05;
  }
}

@media (max-width: 500px){
  .card-spec-squares{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-spec-square:nth-child(n + 4){
    display: none;
  }

  .model-year{
    font-size: 14px;
  }
}

@media (max-width: 400px){
  .card-spec-squares{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-spec-square:nth-child(n + 3){
    display: none;
  }
}

.card-spec-square--value-only{
  grid-template-rows: 1fr;
  align-content: center;
}

.card-spec-square--value-only .card-spec-square__value{
  height: auto;
  min-height: 24px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
} 

.browse-infinite-sentinel{
  min-height: 1px;
  display: flex;
  justify-content: center;
  padding: 18px 0 26px;
  box-sizing: border-box;
}

.browse-infinite-status{
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.browse-infinite-status[hidden]{
  display: none !important;
}

.browse-side-head{
  margin-bottom: 18px;
}

.browse-side-title{
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.browse-side-count{
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 500;
  color: #86868b;
}

.browse-side-group{
  margin-top: 22px;
}

.browse-side-heading{
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
  color: #111;
}

.browse-side-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.browse-side-chip{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 8px 11px;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
}

.browse-side-chip:hover{
  border-color: rgba(0,0,0,0.22);
}

.browse-side-chip.is-active{
  background: #111;
  color: #fff;
  border-color: #111;
}

.browse-price-bars{
  height: 54px;
  display: flex;
  align-items: end;
  gap: 5px;
  margin: 2px 0 10px;
}

.browse-price-bar{
  flex: 1;
  height: var(--bar-h, 12px);
  min-height: 10px;
  border: 0;
  border-radius: 6px 6px 2px 2px;
  background: #d1d5db;
  cursor: pointer;
}

.browse-price-bar:hover{
  background: #111;
}

.browse-side-chips--price .browse-side-chip{
  font-size: 14px;
  padding: 7px 10px;
}

.browse-side-head{
  margin-bottom: 18px;
}

.browse-side-head--compact{
  margin-bottom: 8px;
}

.browse-side-title{
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.browse-side-count{
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 500;
  color: #86868b;
}

.browse-main-filter-group{
  margin-top: 18px;
}

.browse-main-filter-title{
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
  color: #111;
}

.browse-side-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.browse-side-chip{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 8px 11px;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
}

.browse-side-chip:hover{
  border-color: rgba(0,0,0,0.22);
}

.browse-side-chip.is-active{
  background: #111;
  color: #fff;
  border-color: #111;
}

.browse-spec-list{
  display: flex;
  flex-direction: column;
}

.browse-spec-row{
  border-top: 1px solid rgba(0,0,0,0.08);
}

.browse-spec-row:first-child{
  border-top: 0;
}

.browse-spec-row__head{
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 13px 0;
  font: inherit;
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.browse-spec-row__head span:first-child{
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
}

.browse-spec-row__chevron{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  flex: 0 0 auto;
}

.browse-spec-row__chevron-icon{
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.browse-spec-row.is-open .browse-spec-row__chevron{
  transform: none;
}

.sidecard--specs {
  padding-top: 0;
  padding-bottom: 0;
}

.browse-spec-row__body{
  padding: 0 0 13px;
}

.browse-spec-row__body[hidden]{
  display: none !important;
}

.browse-spec-row--open-static .browse-spec-row__head--static{
  cursor: default;
}

.browse-spec-row--open-static .browse-spec-row__chevron{
  transform: rotate(0deg);
}

.browse-spec-row--open-static .browse-spec-row__body{
  padding: 0 0 13px;
}

.browse-card-title-line {
  display: block;
  min-width: 0;
}

.browse-card-title-text {
  display: inline;
}

.model-year {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: 0.12em;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  color: #8a94a6;
  white-space: nowrap;
}