/* =============================================================================
 * erp-cards.css — THE shared catalog product card (Nov 2026 source redesign).
 *
 * The source replaced its listing card everywhere in Nov 2026: the old
 * `.product-wrap` (image + name + price, no buying) became
 * `article.catalog-card.classic-product-card` with an inline specification
 * picker, a live price, an add-to-cart that turns into a quantity stepper, and
 * a promotion ribbon. It renders on the homepage rails, /products, every
 * category and every warehouse archive.
 *
 * Two sources, concatenated in the source's own order:
 *   1. its `/css/catalog-cards.css`  — the card itself
 *   2. the PROMOTION block, which the source ships in an INLINE <style> on each
 *      listing page rather than in any stylesheet. (Second time this has
 *      bitten: the homepage hero's fixed-header clearance was inline-only too.
 *      Always grep the page's <style> blocks, not just its <link>s.)
 *
 * Values are the source's; only this header and the section comments are added.
 *
 * ⚠️ `.catalog-card .classic-card-link` is a stretched overlay at z-index 1, and
 * the select/buttons sit at z-index 2 so they stay clickable through it. Do not
 * "simplify" those z-indexes.
 *
 * @package erppeptide
 * ========================================================================== */

/* ------------------------------------------------- 1. the card (source CSS) */

.catalog-card{position:relative;border:1px solid #e5dfd4;border-radius:16px;min-width:0;overflow:hidden;background:#fff;display:flex;flex-direction:column;scroll-snap-align:start}
.catalog-card .classic-product-image{height:148px;background:#f6f5f2;position:relative;display:flex;align-items:center;justify-content:center;padding:12px}
.catalog-card .classic-product-image img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.catalog-card .classic-product-image>span{position:absolute;top:8px;left:8px;background:#fff4cf;border:1px solid #f6db7b;color:#0a1a3b;border-radius:30px;font-size:9px;padding:3px 7px}
.catalog-card .classic-product-info{padding:13px;display:flex;flex-direction:column;flex:1}
.catalog-card .classic-product-info h3{color:#0a1a3b;font-size:17px;line-height:1.3;min-height:44px;margin:0 0 4px;overflow-wrap:anywhere}
.catalog-card .classic-product-info form{margin-top:auto}
.catalog-card .classic-product-info select,.catalog-card .classic-product-info input{background:#fff;border:1px solid #d8d2c6;border-radius:7px;color:#0a1a3b;font-size:11px;padding:5px 7px;min-height:34px;max-width:100%;min-width:0}
.catalog-card .classic-product-info select[data-card-spec]{width:100%;min-height:34px;background:#f8f8f6;border-color:#e5e5e0;margin-bottom:6px}
.catalog-card .classic-product-price{display:flex;flex-direction:column;min-height:34px;justify-content:center;margin-bottom:7px}
.catalog-card .classic-product-price strong{font-size:20px;color:#0a1a3b}
.catalog-card .classic-buy-row button,.catalog-card .classic-signin{border:1px solid #f6db7b;border-radius:999px;background:#f6db7b;color:#0a1a3b;min-height:44px;min-width:0;font-size:12px;padding:7px 4px;font-weight:500}
.catalog-card .classic-product-info .classic-signin{display:block;text-align:center;border:none;background:transparent;font-size:12px;padding:10px 0;min-height:0}
.catalog-card .classic-card-link{position:absolute;inset:0;z-index:1;border-radius:inherit}
.catalog-card .classic-card-link:focus-visible{outline:3px solid #f6db7b;outline-offset:-3px}
.catalog-card:has(.classic-card-link:hover){border-color:#f6db7b}
.catalog-card .classic-product-info select,.catalog-card .classic-product-info input,.catalog-card .classic-buy-row button{position:relative;z-index:2}
.catalog-card .classic-product-info select:focus-visible,.catalog-card .classic-product-info input:focus-visible,.catalog-card .classic-buy-row button:focus-visible{outline:2px solid #f6db7b;outline-offset:2px}
.catalog-card{height:100%}
.catalog-card [data-cart-card]{margin-top:auto}
.catalog-card .classic-card-link{z-index:1}
.catalog-card select,.catalog-card button{position:relative;z-index:2}
.catalog-card [hidden]{display:none!important}
.catalog-card .card-purchase{position:relative;z-index:2;display:flex;justify-content:center;align-items:center;min-height:34px}
.catalog-card .card-add,.catalog-card .card-stepper{width:100%;min-height:34px;border:1px solid #dce0e5;border-radius:7px;background:#fff;color:#334155;font-size:11px}
.catalog-card .card-stepper{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;align-items:center}
.catalog-card .card-stepper button{border:0;background:transparent;color:#0a1a3b;font-size:18px;height:32px;padding:0;border-radius:50%}
.catalog-card .card-stepper output{font-size:12px;text-align:center;font-weight:500}
.catalog-card .card-add{width:auto;min-height:28px;padding:3px 10px;font-size:10px;background:#f6db7b;border-color:#f6db7b;color:#0a1a3b}
.catalog-card .card-add:hover:not(:disabled){background:#efd06a;border-color:#efd06a}
.catalog-card .card-add:disabled{background:#eee;color:#9a9fa7;border-color:#e4e4e4;cursor:not-allowed}
.catalog-card .card-stepper button:disabled{opacity:.4;cursor:default}
.catalog-card .card-feedback{font-size:10px;line-height:1.5;color:#b63a35;margin:7px 0 0}
.catalog-card .card-unavailable{font-size:12px;color:#708096;margin:10px 0}
.catalog-card select:focus-visible,.catalog-card button:focus-visible{outline:2px solid #b99d54;outline-offset:2px}
@media(max-width:767px){
 .catalog-card .classic-product-image{height:112px;padding:10px}
 .catalog-card .classic-product-info{padding:10px}
 .catalog-card .classic-product-info h3{font-size:14px;min-height:37px;margin-bottom:2px}
 .catalog-card .classic-product-price{min-height:28px;margin-bottom:5px}
 .catalog-card .classic-product-price strong{font-size:16px;line-height:1.3}
 .catalog-card .classic-product-info select[data-card-spec]{font-size:10px;padding:6px 3px;margin-bottom:7px}
 .catalog-card .card-add{font-size:10px}
 .catalog-card .card-stepper{grid-template-columns:34px minmax(0,1fr) 34px}
 .catalog-card .card-stepper button{font-size:18px}
 .catalog-card .classic-product-image>span{font-size:8px;padding:2px 5px;top:6px;left:6px}
}

#offcanvas-right-cart[aria-busy="true"] .offcanvas-body,#offcanvas-right-cart[aria-busy="true"] .offcanvas-footer{opacity:.6;pointer-events:none}

/* --------------------------------- 2. promotions (source INLINE <style>)
 * `.catalog-card[data-catalog-promotion]` — the attribute is '' | 'sku' |
 * 'product'. The source uses BOTH scopes: 8 products flag individual specs,
 * and one (Melanotan 2) is flagged whole-product with no flagged sku at all.
 * The selector is attribute-presence, so it covers both.
 * ---------------------------------------------------------------------- */

.catalog-promotion-section {
    padding: clamp(.8rem, 2vw, 1.6rem);
    border: 1px solid #f1cdbb;
    border-radius: 1rem;
    background: #fff8f0;
  }

  .catalog-promotion-section h2 { color: #88273b; }

  .catalog-card[data-catalog-promotion], .product-promotion-variants {
    --promotion-bg: #fff3ce;
    --promotion-border: #d99b2c;
    --promotion-ink: #713d00;
    --promotion-ribbon: #ffdc83;
    --promotion-ribbon-text: #4d2900;
  }

  .catalog-card[data-catalog-promotion] {
    border: 2px solid var(--promotion-border);
    background: var(--promotion-bg);
  }

  .catalog-card[data-catalog-promotion] .classic-product-image {
    background: radial-gradient(ellipse at top right, #fff, transparent 65%), var(--promotion-bg);
  }

  .catalog-promotion-ribbon {
    position: absolute;
    inset: auto .4rem .4rem;
    padding: .3rem .2rem;
    border-radius: .35rem;
    background: var(--promotion-ribbon);
    color: var(--promotion-ribbon-text);
    font-size: clamp(.65rem, 1.25vw, .85rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
  }

  .product-promotion-variants {
    padding: .8rem 1rem;
    border: 1px solid var(--promotion-border);
    border-radius: .65rem;
    background: var(--promotion-bg);
    color: var(--promotion-ink);
  }

  .product-promotion-variants-title {
    margin: 0;
    color: inherit;
    font-size: .9rem;
    font-weight: 800;
  }

  .product-promotion-options {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: .55rem 0 0;
    padding: 0;
    list-style: none;
  }

  .product-promotion-option {
    display: inline-block;
    padding: .35rem .65rem;
    border: 1px solid var(--promotion-border);
    border-radius: .4rem;
    background: #fff;
    color: var(--promotion-ink);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
  }

  a.product-promotion-option:hover, a.product-promotion-option[aria-current="true"] {
    background: var(--promotion-ribbon);
    color: var(--promotion-ribbon-text);
  }

  .product-promotion-image-badge {
    padding: .55rem .75rem;
    font-size: .85rem;
    white-space: normal;
    text-align: left;
  }
