/* =====================================================================================================================
   GiftWithCrypto V17.0 — catalogue + home tile fixes (phones first).
   1. Buy Now on the home tiles (.gc) was painted behind the card art since V14 — it is positioned now, so the name,
      region and button stack cleanly at the bottom of the card.
   2. Phones: the "All gift cards" page shows two compact cards per row (it showed one huge card per row), the category
      list becomes a horizontal chip row above the cards, the "Why buy here" box is hidden, the top rail is smaller.
   3. Phones: home rails (Most popular / Top selling) — the name, "from" price and region no longer overlap the next card.
   4. Phones: the home tab grid (Popular / Shopping / Gaming …) — taller cards, no rating badge, smaller button.
   Loaded after gbc-v16.css on every page.
   ===================================================================================================================== */

/* ---- 1. home / related-card tiles (.grid .gc): the button is a real layer above the art ---- */
.grid .gc{aspect-ratio:auto;min-height:0}
.grid .gc .gclogo{position:relative;inset:auto;height:112px;flex:none;padding:14px 12px 4px}
.grid .gc .gclogo img{max-height:84px}
.grid .gc .gclogo.art,.grid .gc .gclogo.full{position:absolute;inset:0;height:auto;padding:0}
.grid .gc .gclogo.art img,.grid .gc .gclogo.full img{max-height:none}
.grid .gc .gclogo.art::after,.grid .gc .gclogo.full::after{content:"";position:absolute;left:0;right:0;bottom:0;height:64%;background:linear-gradient(to top,rgba(5,10,20,.94),rgba(5,10,20,.6) 55%,transparent);pointer-events:none}
.grid .gc .gcinfo{position:relative;z-index:1;padding:22px 14px 8px;background:none}
.grid .gc .gc-buy{position:relative;z-index:2;margin:0 12px 12px;align-self:stretch}
.grid .gc .brand{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grid .gc .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grid .gc .gclogo.art~.gcinfo,.grid .gc .gclogo.full~.gcinfo{margin-top:92px}

/* ---- 3. home rails: the meta row wraps instead of running into the next card ---- */
.hs-gc{overflow:hidden}
.hs-gc .nm{flex-wrap:wrap;row-gap:4px}
.hs-gc .nm>span:first-child,.hs-gc .nm{min-width:0}
.hs-gc .nm small{white-space:nowrap}
.hs-gc .nm small.gp-rgn{max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* ---- 2. catalogue page ---- */
.pgrid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:14px}
.topstrip.pgridstrip{grid-auto-columns:182px}
.catlist a{align-items:center}
.catlist a b{flex:none}
@media(max-width:860px){
  .shop{gap:14px;grid-template-columns:minmax(0,1fr)}
  .shop>aside,.shop>div{min-width:0;max-width:100%}
  .shop aside .card:first-child{padding:10px!important;border-radius:14px}
  .shop aside .card+.card{display:none}                      /* "Why buy here" — the same promises sit on the home page */
  .shop aside input[type=search]{padding:10px 12px;font-size:.9rem}
  .catlist{flex-direction:row;flex-wrap:nowrap;gap:6px;overflow-x:auto;margin-top:10px!important;padding:2px 2px 6px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .catlist::-webkit-scrollbar{display:none}
  .catlist a{flex:none;gap:6px;padding:8px 12px;border-radius:99px;border:1px solid var(--border);background:var(--surface);font-size:.82rem;white-space:nowrap;scroll-snap-align:start}
  .catlist a b{font-size:.72rem;padding:1px 6px;border-radius:99px;background:rgba(255,255,255,.08)}
  .catlist a.on{box-shadow:none;border-color:var(--accent);background:rgba(22,199,132,.14);color:#fff}
  .catlist a.on b{background:var(--accent);color:#062015}
  .toolrow{margin-bottom:10px}
  .toolrow .n{font-size:.8rem}
}
@media(max-width:760px){
  .pgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .ptile{padding:7px;border-radius:13px}
  .ptile .art{border-radius:9px}
  .ptile .art img{max-height:58%;max-width:70%}
  .ptile .art.full img{border-radius:9px}
  .ptile .pct{top:6px;right:6px;font-size:.66rem;padding:3px 7px;border-radius:7px}
  .ptile .soldout{top:6px;right:6px;font-size:.64rem;padding:3px 7px}
  .ptile .nm{margin:8px 2px 4px;font-size:.84rem}
  .ptile>span[style]{padding:0 4px!important}
  .ptile .gp-rgn{font-size:.64rem;padding:2px 7px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle}
  .ptile .small.muted{font-size:.72rem}
  .ptile .view{margin-top:6px;padding:8px 8px;font-size:.78rem;border-radius:9px}
  .topstrip.pgridstrip{grid-auto-columns:150px;gap:10px}
}
@media(max-width:460px){
  .topstrip.pgridstrip{grid-auto-columns:150px}
}

/* ---- 4. home tab grid on phones ---- */
@media(max-width:560px){
  .grid.c5{gap:10px}
  .grid.c5 .gc{border-radius:14px}
  .grid.c5 .gc .gclogo{height:88px}
  .grid.c5 .gc .gclogo.art,.grid.c5 .gc .gclogo.full{height:auto}
  .grid.c5 .gc .gclogo.art~.gcinfo,.grid.c5 .gc .gclogo.full~.gcinfo{margin-top:70px}
  .grid.c5 .gc .stock{display:none}
  .grid.c5 .gc .ribbon{top:8px;right:8px;font-size:.64rem;padding:3px 8px}
  .grid.c5 .gc .gcinfo{padding:18px 10px 6px}
  .grid.c5 .gc .brand{font-size:.86rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  .grid.c5 .gc .meta{font-size:.66rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .grid.c5 .gc .gc-buy{margin:0 8px 8px;padding:7px 8px;font-size:.76rem;border-radius:8px}
  .hs-gc{width:180px}
  .hs-gc .nm{font-size:.86rem;margin-top:10px}
  .hs-gc .nm small{font-size:.7rem}
}
