/* Shared preview cards. Product photos keep their original proportions. */
.prod-g,.cat-grid,.pp-related-g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;align-items:stretch}
.pm-product-card.pc,.pm-product-card.sc{display:flex;flex-direction:column;min-width:0;height:100%;padding:0;border:1px solid #383f42;border-radius:12px;background:#202628;overflow:hidden;box-shadow:none;transform:none;opacity:1;transition:border-color .18s}
.pm-product-card[hidden]{display:none!important}
.pm-product-card:hover{border-color:#647075}
.pm-card-media{position:relative;aspect-ratio:4/3;flex:none;background:#252b2d;overflow:hidden}
.pm-card-photo,.pm-card-empty{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:12px;border:0;background:transparent;color:#bac2c7;border-radius:0}
.pm-card-photo{cursor:zoom-in}
.pm-card-photo img{display:block;width:100%;height:100%;object-fit:contain}
.pm-card-empty{flex-direction:column;gap:12px;text-decoration:none}
.pm-card-empty svg{width:40px;height:40px}
.pm-card-arrow{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:44px;border:1px solid #536066;border-radius:8px;background:rgba(13,19,23,.88);color:#fff;cursor:pointer;padding:0}
.pm-card-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor}
.pm-card-prev{left:8px}.pm-card-next{right:8px}
.pm-card-count{position:absolute;bottom:10px;right:12px;padding:4px 9px;border-radius:6px;background:rgba(13,19,23,.86);color:#e9edef;font-size:12px;line-height:1.4;pointer-events:none}
.pm-card-content{display:flex;flex:1;flex-direction:column;gap:14px;padding:20px;min-width:0}
.pm-card-meta{display:flex;align-items:center;gap:8px;min-height:30px;flex-wrap:wrap;font-size:11px;line-height:1.35}
.pm-card-brand{padding:5px 7px;background:#ffc619;border-radius:4px;color:#111;font-weight:700;text-transform:uppercase}
.pm-card-category{color:#c5cdd2}
.pm-card-title.sc-link{display:block;flex:none;min-height:4.2em;font-size:16px;font-weight:700;line-height:1.4;color:#f3f5f6;text-decoration:none;overflow-wrap:anywhere}
.pm-card-title:hover{color:#ffc619}
.pm-card-model{min-height:2.9em;margin:0!important;font-size:13px;line-height:1.45;color:#b9c1c6;overflow-wrap:anywhere}
.pm-card-model strong{font-weight:600;color:#dfe4e7}
.pm-card-purchase{display:flex;flex-direction:column;gap:12px;margin-top:auto;padding-top:16px;border-top:1px solid #384044}
.pm-card-stock{margin:0!important;font-size:13px;line-height:1.4;color:#d0ddd5;font-weight:600}
.pm-card-price{font-size:22px;line-height:1.2;font-weight:700;color:#f4f6f7}
.pm-card-price small{display:block;margin-top:5px;font-size:12px;line-height:1.4;color:#aeb8bf;font-weight:400}
.pm-product-card .pm-add-cart,.pm-card-details{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;width:100%;margin:0;padding:10px 12px;border:1px solid #ffc619;border-radius:8px;background:#ffc619;color:#111;font-size:14px;font-weight:600;line-height:1.35;text-decoration:none;box-sizing:border-box}
.pm-product-card .pm-add-cart svg{width:20px;height:20px;flex:none}
.pm-product-card .pm-add-cart.in-cart{background:transparent;color:#ffc619}
.pm-card-details{background:transparent;color:#ffc619}
.pm-card-note{margin:0!important;color:#aeb8bf;font-size:12px;line-height:1.5}
.pm-product-card :focus-visible{outline:2px solid #ffc619;outline-offset:3px}
.pm-card-photo:focus-visible{outline-offset:-4px}
.pm-card-dialog{padding:52px 60px 20px;margin:auto;border:1px solid #465056;border-radius:12px;width:min(1100px,95vw);max-width:95vw;max-height:94dvh;background:#171c1e;color:#fff;overflow:auto}
.pm-card-dialog::backdrop{background:rgba(0,0,0,.88)}
.pm-card-dialog figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:12px}
.pm-card-dialog img{display:block;max-width:100%;height:calc(80dvh - 90px);object-fit:contain}
.pm-card-dialog figcaption{font-size:14px;line-height:1.5;text-align:center;max-width:65ch}
.pm-card-dialog button{position:absolute;display:grid;place-items:center;background:#252d30;border:1px solid #57636a;border-radius:8px;color:#fff;width:44px;height:44px;font-size:32px;line-height:1;cursor:pointer}
.pm-card-dialog-close{right:10px;top:8px}.pm-card-dialog-prev{left:8px;top:45%}.pm-card-dialog-next{right:8px;top:45%}
.pm-card-dialog button[hidden]{display:none}
.pm-card-dialog button:focus-visible{outline:2px solid #ffc619;outline-offset:3px}
/* Neighbouring cards share intrinsic row heights, including unusually long names. */
@supports(grid-template-rows:subgrid){
  @media(min-width:641px){
    .pm-product-card.pc,.pm-product-card.sc{display:grid;grid-template-rows:subgrid;grid-row:span 5;row-gap:0}
    .pm-card-content{display:contents}
    .pm-card-meta{margin:20px 20px 14px}
    .pm-card-title.sc-link{margin:0 20px 14px;min-height:0}
    .pm-card-model{margin:0 20px 14px!important;min-height:0}
    .pm-card-purchase{margin:0 20px 20px}
  }
}
@media(max-width:1080px){.prod-g,.cat-grid,.pp-related-g{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.prod-g,.cat-grid,.pp-related-g{grid-template-columns:minmax(0,1fr)}.pm-card-title.sc-link{min-height:0;font-size:17px}.pm-card-model{min-height:0}.pm-card-content{padding:18px;gap:12px}.pm-card-dialog{padding:54px 46px 18px}.pm-card-dialog img{height:65dvh}.pm-card-dialog-prev{left:2px}.pm-card-dialog-next{right:2px}}
@media(prefers-reduced-motion:reduce){.pm-product-card.pc,.pm-product-card.sc{transition:none}}
