/* PAC Products V7: marketplace-style cards. The existing V5 card designer CSS variables remain authoritative. */
.product-grid .pac-market-card{overflow:hidden;isolation:isolate;min-height:var(--pac-card-min-height,470px);box-shadow:0 8px 30px rgba(0,0,0,.12);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.product-grid .pac-market-card:hover{transform:translateY(-4px);box-shadow:0 18px 44px #0006}
.pac-market-card .pac-card-media{padding:0;min-width:0;background:#0a131f}
.pac-market-card .pac-card-main-image{position:relative;min-width:0}
.product-grid .pac-market-card .product-art{height:var(--pac-image-height,265px);border:0;overflow:hidden;border-radius:calc(var(--pac-card-radius,12px) - 2px) calc(var(--pac-card-radius,12px) - 2px) 0 0}
.pac-market-card .product-art .art-badge{position:absolute;z-index:4;left:auto;right:11px;top:11px;max-width:65%;text-align:center;letter-spacing:.06em;font-size:10px;padding:8px 11px;border-radius:5px;background:#db3d46;color:#fff;border:1px solid #ee6972;box-shadow:0 4px 15px #0005;pointer-events:none}
.pac-market-card .product-art .art-badge:empty{display:none}
.pac-card-image-link{position:absolute;z-index:2;inset:0;width:100%;height:100%;border:none;cursor:pointer;background:transparent;color:transparent}
.pac-card-image-link:focus-visible{outline:3px solid #58b2ff;outline-offset:-4px}
.pac-card-favorite{position:absolute;z-index:5;bottom:13px;left:13px;display:grid;place-items:center;width:39px;height:39px;border:1px solid #ffffff50;border-radius:50%;background:#0a1320cb;color:#fff;backdrop-filter:blur(6px);cursor:pointer;transition:background .15s,color .15s}
.pac-card-favorite:hover,.pac-card-favorite:focus-visible{background:#264f76;outline:2px solid #54a9f5;outline-offset:1px}
.pac-card-favorite.is-favorite{color:#ff7188;background:#491b2b}
.pac-card-favorite.is-favorite svg{fill:#ff718848}
.pac-card-thumbnails{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:9px 10px 0}
.pac-card-thumb{position:relative;display:block;height:clamp(40px,4vw,66px);padding:0;min-width:0;background:#15243b;border:2px solid #293b54;border-radius:5px;overflow:hidden;cursor:pointer}
.pac-card-thumb.is-selected{border-color:#45a7ff;box-shadow:0 0 0 1px #4bacff42}
.pac-card-thumb:hover{border-color:#7cc8ff}
.pac-card-thumb:focus-visible{outline:2px solid #7cc8ff;outline-offset:2px}
.pac-card-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.pac-card-thumb.has-more img{filter:brightness(.33)}
.pac-thumb-more{position:absolute;inset:0;display:grid;place-items:center;font-size:17px;font-weight:900;color:#fff;text-shadow:0 2px 4px #000}
.product-grid .pac-market-card .pac-card-content{padding:var(--pac-card-padding,20px);gap:0;display:flex;flex-direction:column;flex:1;min-width:0}
.product-grid .pac-market-card .pac-card-meta{justify-content:flex-start;gap:7px;flex-wrap:wrap;font-size:10px;font-weight:850;letter-spacing:.04em;color:#8793a6;line-height:1.4;text-transform:uppercase}
.pac-market-card .pac-card-meta i{color:#4f5b6c;font-size:11px;font-style:normal}
.pac-market-card .pac-card-meta .pac-card-accent-meta{color:#ed6876}
.product-grid .pac-market-card h3{font-size:var(--pac-title-size,18px);margin:10px 0 12px;min-height:0;line-height:1.33;letter-spacing:-.03em}
.pac-market-card h3 a{color:inherit;text-decoration:none}
.pac-market-card h3 a:hover{color:#8bcbff}
.pac-card-tags{display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start;margin:0 0 12px}
.pac-card-tag{font-size:10px;color:#b2becf;font-weight:750;line-height:1.2;border:1px solid #384250;border-radius:99px;background:#ffffff05;padding:7px 10px;overflow-wrap:anywhere;max-width:100%;text-transform:uppercase}
.product-grid .pac-market-card .pac-card-footer{display:flex;align-items:baseline;gap:8px;margin-top:auto!important;padding-top:8px!important;border:0!important}
.product-grid .pac-market-card .pac-card-price{font-size:23px!important;font-weight:900;letter-spacing:-.045em;color:var(--pac-price-color,#42a7fa);white-space:nowrap}
.pac-card-details{margin-left:auto;white-space:nowrap;padding:8px 10px!important;width:auto!important;height:var(--pac-button-height,38px)!important;min-height:var(--pac-button-height,38px)!important;font-size:var(--pac-button-font-size,11px)!important;border:var(--pac-button-border-width,1px) solid var(--pac-details-border,#28486d)!important;border-radius:var(--pac-button-radius,6px)!important;background:var(--pac-details-fill,#153251)!important;color:var(--pac-details-text,#a8d1ff)!important;letter-spacing:0!important}
.pac-card-details:hover{text-decoration:underline;filter:none!important}
.product-grid .pac-market-card .pac-card-cart{width:100%!important;min-height:var(--pac-button-height,42px);height:auto!important;padding:12px 10px!important;margin-top:13px;display:flex;align-items:center;justify-content:center;gap:11px;line-height:1.25;white-space:normal;font-size:var(--pac-button-font-size,11px)!important;font-weight:850;letter-spacing:.05em;background:var(--pac-add-fill,#267cec);border:var(--pac-button-border-width,1px) solid var(--pac-add-border,#358fff);border-radius:var(--pac-button-radius,6px);color:var(--pac-add-text,#ffffff)}
.product-grid .pac-market-card .pac-card-cart:hover{filter:brightness(1.16)}
.pac-market-card button:focus-visible,.pac-market-card a:focus-visible{outline:2px solid #70b9ff;outline-offset:3px}
@media(max-width:1100px){.pac-card-thumb{height:clamp(42px,8vw,70px)}}
@media(max-width:680px){.product-grid .pac-market-card .pac-card-content{padding:var(--pac-card-padding,20px)}.pac-card-thumb{height:clamp(48px,13vw,80px)}}
@media(prefers-reduced-motion:reduce){.product-grid .pac-market-card{transition:none}}

/* V12.1: Card Designer uses these values on real marketplace cards and the live preview. */
.pac-market-card .pac-card-description{font-size:var(--pac-body-size,12px);color:var(--pac-body-color,#9daec7)}

/* V12.2: keep the chosen card outline transparency even while hovering. */
.product-grid .pac-market-card:hover{border-color:var(--pac-card-hover-border,#5fa8f2)}

/* PAC Products V12.4: Showcase image auto-fit.
   Never crop the original uploaded showcase image, even when the card's
   image box and the source image have different aspect ratios.
   The unused area retains the card's dark backdrop. */
.product-grid .pac-market-card .product-art{background-color:#0a131f}
.product-grid .pac-market-card .product-art > img.product-uploaded-image{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain !important;
  object-position:center center;
}

/* PAC Products V12.5 — consistently aligned two-line product cards. */
.product-grid .pac-market-card .pac-card-thumbnails{display:none !important}
.product-grid .pac-market-card .product-art .art-badge.pac-red-badge{
  background:rgba(255,0,0,.25);
  color:#ff5252;
  border:1px solid #ff4242;
  text-shadow:0 1px 2px rgba(0,0,0,.7);
}
.product-grid .pac-market-card h3{
  min-height:calc(var(--pac-title-size,18px) * 1.33 * 2);
  max-height:calc(var(--pac-title-size,18px) * 1.33 * 2);
  line-height:1.33;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow-wrap:anywhere;
}
/* Reserve space for two chip rows even when only one tag or no tags exist.
   Very long tag names may need extra room; avoid hiding real tag text. */
.product-grid .pac-market-card .pac-card-tags{
  min-height:70px;
  flex-wrap:wrap;
  align-content:flex-start;
  align-items:flex-start;
  margin-bottom:12px;
}
.product-grid .pac-market-card .pac-card-tag{max-width:100%;box-sizing:border-box}
