/* Discover page-owned presentation.
   Keeps content, typography, grid structure and behavior unchanged. */

.main:has(> .discover-page){
  background:#f7f8fa;
}

.shell:has(.discover-page) .sidebar .nav-item.active{
  background:rgba(10,132,255,.075);
}

/* Search stays the one explicit field; make its chrome quieter and more focused. */
.discover-page .discover-search-row{
  max-width:880px;
}
.discover-page .search{
  border-color:rgba(60,60,67,.12);
  box-shadow:none;
  background:rgba(255,255,255,.9);
}
.discover-page .search:focus{
  box-shadow:0 0 0 3px rgba(10,132,255,.08);
}

/* Filters should read as a control group, not a row of mini cards. */
.discover-page .filters{
  gap:6px;
  margin-top:14px;
  margin-bottom:24px;
}
.discover-page .pill{
  border-color:transparent;
  background:transparent;
  padding-left:11px;
  padding-right:11px;
}
.discover-page .pill:hover{
  background:rgba(120,120,128,.08);
  border-color:transparent;
}
.discover-page .pill.active{
  border-color:transparent;
  background:rgba(10,132,255,.09);
}
.discover-page .pill:not(.active) .pill-icon{
  color:rgba(60,60,67,.68);
}
.discover-page .pill.active .pill-icon{
  color:#0a84ff;
}

.discover-page .offer-grid{
  column-gap:14px;
  row-gap:18px;
}

/* Offer cards remain the primary containers; reduce elevation and hard outlines. */
.discover-page .offer-card,
.discover-page .nb-offer-card{
  border-color:rgba(60,60,67,.07);
  border-radius:16px;
  box-shadow:0 1px 2px rgba(0,0,0,.018);
}
.discover-page .offer-card:hover,
.discover-page .nb-offer-card:hover{
  transform:translateY(-1px);
  border-color:rgba(60,60,67,.11);
  box-shadow:0 8px 22px rgba(0,0,0,.045);
}

/* Visual panel should support product art rather than feel like another card. */
.discover-page .nb-offer-card .nb-offer-visual,
.discover-page .offer-card .offer-top{
  background:rgba(244,245,247,.78);
}

/* Provider is context; remove extra badge chrome around plain-text fallback. */
.discover-page .nb-offer-card .nb-provider-text,
.discover-page .fallback-offer-card .provider{
  border-color:transparent;
  background:transparent;
  box-shadow:none;
  padding-left:0;
  padding-right:0;
}

/* Ordinary tags should feel like metadata, not nested pills. */
.discover-page .nb-offer-card .nb-tag,
.discover-page .fallback-offer-card .soft-tag{
  border:0;
  background:transparent;
  padding-left:0;
  padding-right:0;
}
.discover-page .nb-offer-card .nb-tag-row,
.discover-page .fallback-offer-card .tag-row{
  gap:12px;
}

/* Status is the one tag that keeps a contained treatment. */
.discover-page .nb-offer-card .nb-status-tag,
.discover-page .fallback-offer-card .status-tag{
  box-shadow:none;
  border:0;
}

/* Follow stays actionable without becoming another nested card. */
.discover-page .nb-offer-card .bookmark,
.discover-page .nb-offer-card .mock-bookmark,
.discover-page .offer-card .bookmark{
  border-color:transparent;
  box-shadow:none;
  background:transparent;
}
.discover-page .nb-offer-card .bookmark:hover,
.discover-page .nb-offer-card .mock-bookmark:hover,
.discover-page .offer-card .bookmark:hover{
  border-color:transparent;
  background:rgba(120,120,128,.08);
}
.discover-page .nb-offer-card .bookmark.saved,
.discover-page .nb-offer-card .mock-bookmark.saved{
  border-color:transparent;
  background:transparent;
}

@media(max-width:780px){
  .discover-page .filters{gap:4px;margin-bottom:20px}
  .discover-page .pill{padding-left:9px;padding-right:9px}
}

/* Mobile Discover: keep desktop search unchanged; collapse only the phone search control. */
@media(max-width:780px){
  .discover-page{position:relative}

  .discover-page .nb-primary-page-head{
    min-height:44px;
    margin-bottom:10px!important;
    padding-right:52px;
  }

  .discover-page .discover-search-row{
    position:absolute;
    top:0;
    right:0;
    z-index:8;
    width:44px;
    max-width:100%;
    margin:0;
    transition:width .18s ease;
  }

  .discover-page .discover-search-row:focus-within,
  .discover-page .discover-search-row.has-query{
    width:100%;
  }

  .discover-page .discover-search-row .search-wrap{
    width:100%;
  }

  .discover-page .discover-search-row .search{
    height:44px;
    border-radius:22px;
    padding:0 42px 0 44px;
    opacity:0;
    cursor:pointer;
    background:#fff;
    transition:opacity .12s ease,border-radius .18s ease,box-shadow .18s ease;
  }

  .discover-page .discover-search-row:focus-within .search,
  .discover-page .discover-search-row.has-query .search{
    opacity:1;
    cursor:text;
  }

  .discover-page .discover-search-row .search-icon{
    left:11px;
    width:22px;
    height:22px;
    color:rgba(60,60,67,.78);
    z-index:2;
  }

  .discover-page .discover-search-row .search-icon svg{
    width:22px;
    height:22px;
  }

  .discover-page .discover-search-row:not(:focus-within):not(.has-query) .search-wrap{
    width:44px;
    height:44px;
    border-radius:22px;
    background:rgba(118,118,128,.10);
  }

  .discover-page .discover-search-row:not(:focus-within):not(.has-query) .search{
    width:44px;
    padding:0;
    border-color:transparent;
    box-shadow:none;
  }

  .discover-page .discover-search-row:not(:focus-within):not(.has-query) .search::placeholder{
    color:transparent;
  }

  .discover-page .discover-search-row .search-clear{right:9px}
}

/* Semantic link cards open merchant pages without changing the shared card art. */
.discover-page a.nb-dynamic-deal-card{
  color:inherit;
  text-decoration:none;
}
.discover-page a.nb-dynamic-deal-card:focus-visible{
  outline:2px solid var(--nb-system-blue);
  outline-offset:3px;
}

/* Shopping Deals: same card dimensions/image box, product/price-led content. */
.discover-page .nb-dynamic-deal-card .nb-offer-visual{
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.discover-page .nb-dynamic-deal-card .nb-offer-visual img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.discover-page .nb-dynamic-deal-card .nb-deal-featured{
  position:absolute;
  top:9px;
  left:9px;
  z-index:1;
  border-radius:999px;
  background:#f0eaff;
  color:#6444a1;
}
.discover-page .nb-dynamic-deal-card .nb-title-row{
  min-height:0;
  flex:0 0 auto;
}
.discover-page .nb-dynamic-deal-card .nb-offer-name{
  -webkit-line-clamp:3;
  line-clamp:3;
  min-height:calc(var(--nb-headline-leading) * 3);
  color:var(--nb-label-primary);
}
.discover-page .nb-dynamic-deal-card .nb-deal-prices{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:7px;
  row-gap:0;
  margin-top:8px;
  min-width:0;
}
.discover-page .nb-dynamic-deal-card .nb-deal-current-price{
  display:inline;
  flex:0 0 auto;
  margin:0;
  color:var(--nb-label-primary);
  font-variant-numeric:tabular-nums;
}
.discover-page .nb-dynamic-deal-card .nb-deal-original-price{
  color:#b64c31;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.discover-page .nb-dynamic-deal-card .nb-deal-price-fallback{
  color:var(--nb-label-secondary);
}
.discover-page .nb-dynamic-deal-card .nb-card-footer{
  padding-top:5px;
}
.discover-page .nb-dynamic-deal-card .nb-deal-merchant{
  display:block;
  color:var(--nb-label-secondary);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:780px){
  .discover-page .nb-dynamic-deal-card .nb-offer-name{
    min-height:calc(var(--nb-headline-leading) * 3);
  }
}
.nb-deals-status{margin:0 0 14px;padding:12px 14px;border-radius:9px;border:1px solid #d8e6f8;background:#f5f9ff;color:#3e5b7b;}
.nb-deals-status.is-error{border-color:#f6c2b9;background:#fff6f3;color:#9b3526}
.nb-deals-status button{padding:3px 9px;margin-left:8px;border:1px solid currentColor;color:inherit;border-radius:6px;background:transparent;cursor:pointer}

/* Show twenty cards per page; keep the existing responsive grid unchanged. */
.discover-page .discover-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:24px 0 10px}
.discover-page .discover-pagination-total{color:#788499}
.discover-page .discover-pagination-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.discover-page .discover-pagination-button{min-width:36px;height:36px;padding:0 10px;border:1px solid rgba(60,60,67,.12);border-radius:9px;background:#fff;color:#36445a;cursor:pointer}
.discover-page .discover-pagination-button:hover:not(:disabled):not(.is-active){background:rgba(10,132,255,.06);border-color:rgba(10,132,255,.25)}
.discover-page .discover-pagination-button.is-active{background:rgba(10,132,255,.10);border-color:rgba(10,132,255,.22);color:#086dc9}
.discover-page .discover-pagination-button:disabled{opacity:.4;cursor:default}
.discover-page .discover-pagination-button:focus-visible{outline:2px solid #0a84ff;outline-offset:2px}
@media(max-width:780px){.discover-page .discover-pagination{justify-content:center;gap:10px}.discover-page .discover-pagination-total{width:100%;text-align:center}.discover-page .discover-pagination-controls{justify-content:center}}

/* Discover sort uses the established type scale and card styling. */
.discover-page .filters{margin-bottom:10px}
.discover-page .discover-sort{display:flex;justify-content:flex-end;align-items:center;gap:6px;margin:0 0 14px}
.discover-page .discover-sort-button{padding:8px 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--nb-label-secondary,#718096);cursor:pointer}
.discover-page .discover-sort-button.is-active{background:rgba(10,132,255,.09);border-color:rgba(10,132,255,.15);color:#086dc9}
.discover-page .discover-sort-button:hover:not(.is-active){background:rgba(120,120,128,.08)}
.discover-page .discover-sort-button:focus-visible{outline:2px solid #0a84ff;outline-offset:2px}
@media(max-width:780px){.discover-page .discover-sort{justify-content:flex-start}}
