/* Shared catalogue card layout, also used by the unsaved product preview. */
.product-card [hidden]{display:none!important}
.product-card{display:flex;flex-direction:column;min-width:0;height:100%;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff);color:var(--ink)}
.product-card .tile{display:block;position:relative;width:100%;aspect-ratio:1/1;padding:0;overflow:hidden;border:0;border-radius:0;background:var(--tile,#f8f8f8)}
.product-card .tile>img{display:block;width:100%;height:100%;max-height:none;object-fit:contain}
.product-card .card-body{display:flex;flex:1;flex-direction:column;gap:16px;padding:16px;min-width:0;container-type:inline-size}
.product-card .brand{font:600 11.5px/1.3 var(--font-display,system-ui,sans-serif);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);overflow-wrap:anywhere}
.product-card .pname{font:700 19px/1.35 var(--font-display,system-ui,sans-serif);margin:5px 0 0;overflow-wrap:anywhere}
.product-card .pname-btn{all:unset;cursor:pointer}
.product-card .pname-btn:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.product-card .cat{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.product-card .card-body p{font-size:13px;color:var(--muted);margin:8px 0 0;overflow-wrap:anywhere}
.product-card .card-body p:empty{display:none}
.product-card .row{display:flex;flex-direction:column;align-items:stretch;justify-content:start;gap:14px;margin-top:auto;min-width:0}
.product-card .swatches{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:4px;scrollbar-width:thin}
.product-card .swatch{position:relative;display:inline-block;flex:0 0 44px;min-width:44px;width:44px;height:44px;margin:0;padding:0;border:2px solid var(--surface,#fff);border-radius:50%;background:var(--c,#888);box-shadow:0 0 0 1px var(--line)}
.product-card .swatch[aria-pressed=true]{box-shadow:0 0 0 2px var(--ink)}
.product-card .swatch.sold-out::after{content:'';position:absolute;left:3px;right:3px;top:50%;height:3px;border-radius:2px;background:#e02929;transform:rotate(-45deg)}
.product-card .price{display:block;order:0;flex:none;min-width:0;margin:0;font:700 clamp(12px,8cqi,22px)/1.4 var(--font-display,system-ui,sans-serif);font-variant-numeric:tabular-nums;white-space:nowrap;overflow-wrap:normal}
.product-card .price del{font-size:.7em;font-weight:400;color:var(--sale-ink,#bd2420);opacity:1;margin-right:6px}
.product-card .price del:empty{display:none}
.product-card .btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;height:auto;padding:12px 16px;border:0;border-radius:10px;background:var(--ink);color:var(--bg);font-size:14px;font-weight:600;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-align:center}
.product-card .product-badges{position:absolute;top:12px;left:12px;display:flex;align-items:start;gap:6px;pointer-events:none}
.product-card .product-badges.right{left:auto;right:12px}
.product-card .product-badges img{object-fit:contain;max-height:none}
.product-card .product-badges span{padding:5px 8px;border-radius:6px;background:#ffe044;color:#171916;font-size:12px;font-weight:700}
.product-card .brand-logo{position:absolute;right:10px;top:10px;width:56px;height:56px;display:grid;place-items:center;pointer-events:none;z-index:2}
.product-card .brand-logo img{width:100%;height:100%;max-height:none;object-fit:contain}

.product-card .no-photo{display:grid;place-items:center;height:100%;color:var(--muted);font-size:13px}
.product-editor-layout .preview-side{max-width:340px;width:100%}
.preview-side .product-card{--surface:#fff;--tile:#f8f8f8;--ink:#0b0b0b;--muted:#5f5f5a;--line:#deded8;--bg:#f6f6f3;--font-display:'Montserrat','Noto Sans Georgian',system-ui,sans-serif}
.preview-side .product-card .btn:disabled{opacity:1;cursor:default}
.preview-side .product-card .btn{background:var(--ink);color:var(--bg);border:0}
.preview-side .product-card .btn.is-sold-out{opacity:.4}
html[data-panel-theme=dark] .preview-side .product-card{--surface:#181817;--tile:#f8f8f8;--ink:#f4f4f1;--muted:#a3a39d;--line:#2c2c2a;--bg:#0e0e0d}
@media(max-width:640px){
  .product-card .card-body{padding:12px;gap:12px}.product-card .pname{font-size:15px}.product-card .brand{font-size:10px}.product-card .cat,.product-card .card-body p{font-size:12px}.product-card .price{font-size:clamp(12px,10cqi,18px)}.product-card .btn{font-size:12px;padding:10px 8px}.product-card .row{gap:12px}.product-card .swatches{gap:6px}
  .product-card .brand-logo{width:40px;height:40px;right:8px;top:8px}.product-card .product-badges{top:8px;left:8px}.product-card .product-badges.right{right:8px}.product-card .product-badges span{font-size:10px;padding:3px 5px}
}

/* Discounts are visible before selecting a colour and stand apart from NEW badges. */
:root{--sale-ink:#bd2420}
html[data-theme=dark],html[data-panel-theme=dark]{--sale-ink:#ff7777}
.product-card .product-badges .badge-sale,.product-badges .badge-sale,.product-card .product-badges .badge-new,.product-badges .badge-new{background:#c5221f;color:#fff}
.d-price del{color:var(--sale-ink,#bd2420);opacity:1}
.product-card .price:has(del.price-range){font-size:clamp(10px,5cqi,20px)}

.brand-logo[data-position="top-left"]{top:var(--brand-inset,10px);left:var(--brand-inset,10px);right:auto;bottom:auto}
.brand-logo[data-position="top-right"]{top:var(--brand-inset,10px);right:var(--brand-inset,10px);left:auto;bottom:auto}
.brand-logo[data-position="bottom-left"]{bottom:var(--brand-inset,10px);left:var(--brand-inset,10px);right:auto;top:auto}
.brand-logo[data-position="bottom-right"]{bottom:var(--brand-inset,10px);right:var(--brand-inset,10px);left:auto;top:auto}
.tile:has(.brand-logo[data-position="top-left"]:not([hidden])) .product-badges:not(.right),.tile:has(.brand-logo[data-position="top-right"]:not([hidden])) .product-badges.right{top:78px}
@media(max-width:640px){.brand-logo{--brand-inset:8px}.tile:has(.brand-logo[data-position="top-left"]:not([hidden])) .product-badges:not(.right),.tile:has(.brand-logo[data-position="top-right"]:not([hidden])) .product-badges.right{top:58px}}
