/* 2.9: homepage and catalogue cards. This file owns their layout at every size. */
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products {
 display:grid; gap:18px; margin:0 0 12px; padding:0; align-items:stretch; clear:both;
}
.pp2-games .woocommerce ul.products { grid-template-columns:repeat(4,minmax(0,1fr)); }
.woocommerce .pp-catalog ul.products { grid-template-columns:repeat(3,minmax(0,1fr)); }
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products::before,
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products::after { display:none; }
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product {
 position:relative; display:flex; flex-direction:column; min-width:0; float:none;
 width:auto!important; margin:0!important; padding:14px;
 border:1px solid #345c70; border-radius:6px; background:linear-gradient(130deg,#0c222b,#04131c);
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .woocommerce-loop-product__link {
 display:flex; flex-direction:column; flex:1; min-width:0; width:100%;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .pp-card-media {
 display:flex; align-items:center; justify-content:center; position:relative; flex:none;
 box-sizing:border-box; width:100%; aspect-ratio:1 / 1.18; max-height:360px;
 margin:0 0 14px; padding:8px; overflow:hidden;
 background:radial-gradient(ellipse at center,#16405233,transparent 72%);
}
/* Reset Woo/plugin image dimensions only inside this media frame, including
   placeholder and starter-reference artwork. Important defeats Woo's auto height. */
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .pp-card-media img {
 display:block; box-sizing:border-box; width:100%!important; height:100%!important;
 max-width:100%!important; max-height:100%!important; min-width:0; min-height:0;
 object-fit:contain!important; object-position:center!important;
 margin:0!important; padding:0!important; border:0; border-radius:3px;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .pp-card-media>.pp-reference-cover {
 display:flex; align-items:center; justify-content:center; width:100%; height:100%;
 max-height:100%; margin:0; padding:0; flex:none;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .pp-card-media--portrait img { width:90%!important; margin-inline:auto!important; }
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .pp-card-media--square img { width:92%!important; height:92%!important; margin:auto!important; }
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .woocommerce-loop-product__title {
 font:600 17px/1.4 var(--pp-body); letter-spacing:0; text-transform:none; text-wrap:initial;
 margin:0 0 8px; padding:0; min-height:2.8em; color:#f7fbff;
 white-space:normal; overflow-wrap:anywhere; overflow:visible; display:block; -webkit-line-clamp:unset;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .pp-product-meta {
 font-size:14px; line-height:1.45; gap:6px; margin-bottom:3px;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .price {
 font:600 21px/1.35 var(--pp-body); color:#f7fbff; margin: auto 0 0; padding-top:12px;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .button {
 display:flex; align-items:center; justify-content:center; flex:none; gap:6px;
 box-sizing:border-box; width:100%; max-width:100%; min-height:46px; margin:10px 0 0;
 padding:10px 8px; font:600 16px/1.25 var(--pp-body); text-transform:none;
 white-space:nowrap; border-radius:4px; background:var(--pp-blue,#078cff); color:#fff;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .button>.pp-icon {
 flex:none; width:18px; height:18px;
}
/* TI Wishlist's wrapper and link both need positioning resets. No image spacer. */
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .tinvwl-above_thumb-add-to-cart {
 position:absolute!important; inset:8px 8px auto auto!important; width:44px!important;
 height:44px!important; margin:0!important; padding:0!important; z-index:3;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .tinvwl-above_thumb-add-to-cart>a {
 display:flex!important; position:relative!important; inset:auto!important; align-items:center; justify-content:center;
 box-sizing:border-box; width:44px!important; height:44px!important; min-width:44px; min-height:44px;
 margin:0!important; padding:0!important; background:#071820ed; border:1px solid #355c6f; border-radius:5px;
}
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .tinvwl-above_thumb-add-to-cart>a::before { margin:0!important; }
:is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product a:focus-visible {
 outline:2px solid var(--pp-cyan); outline-offset:3px;
}
@media(max-width:1100px) {
 /* Keep the sidebar from squeezing three cards into narrow desktop columns. */
 .woocommerce .pp-catalog ul.products { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pp2-games .woocommerce ul.products { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:800px) {
 .pp2-games .woocommerce ul.products { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pp-catalog-layout { display:block; }
 .pp-catalog .pp-filter-panel { margin-bottom:18px; }
}
@media(max-width:640px) {
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products { gap:12px; }
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product { padding:10px; }
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .woocommerce-loop-product__title { font-size:16px; }
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .button { font-size:14px; }
 /* Submit and reset must not stretch alongside a tall filter fieldset. */
 .pp-catalog .pp-filter-panel form>.pp-button,
 .pp-catalog .pp-filter-panel form>.pp-clear-filters { grid-column:1/-1; align-self:start; }
}
@media(max-width:479px) {
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products { grid-template-columns:minmax(0,1fr); }
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product { padding:14px; }
 :is(.pp2-games .woocommerce,.woocommerce .pp-catalog) ul.products li.product .button { font-size:16px; }
 .pp-catalog .pp-filter-panel form { grid-template-columns:1fr; }
}
