/* Client portal pages: catalog, product, express order, cart.
   Cards, pills and spacing follow biomed-pharma.ca's product catalogue. */

body.site-modern,body.portal,body.education{background:#fff;color:var(--ink);font:16px/1.65 var(--ui-font);-webkit-font-smoothing:antialiased}
.site-modern h1,.site-modern h2,.site-modern h3,.site-modern h4,.site-modern h5,.portal h1,.portal h2,.portal h3{font-family:var(--ui-font);font-weight:500;letter-spacing:-.02em;color:var(--ink);text-transform:none}
.site-main{min-height:60vh}

/* ---------- Page banner (light, like the main site's) ---------- */
.client-hero{background:var(--paper);border-bottom:1px solid var(--line)}
.client-hero-inner{display:flex;align-items:flex-end;justify-content:space-between;gap:24px 40px;flex-wrap:wrap;padding-top:clamp(32px,5vw,56px);padding-bottom:clamp(28px,4vw,44px)}
.site-modern .client-hero h1{margin:0;font-size:clamp(32px,4vw,48px);line-height:1.1;letter-spacing:-.03em}
.site-modern .client-hero-lead{max-width:56ch;margin:12px 0 0;color:var(--muted);font-size:16.5px;line-height:1.6}
.client-back{display:inline-flex;align-items:center;gap:8px;margin-bottom:16px;color:var(--muted);font-size:14px;font-weight:500;text-decoration:none}
.client-back:hover{color:var(--red)}

/* ---------- Filters ---------- */
.client-catalog{padding-top:28px;padding-bottom:clamp(56px,8vw,96px)}
.client-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 14px;margin:0 0 28px;padding:0 0 24px;border-bottom:1px solid var(--line)}
.client-filter{display:flex;flex-direction:column;gap:6px;flex:1 1 190px;max-width:260px}
.site-modern .client-filter label{margin:0;color:var(--muted);font-size:12.5px;font-weight:500;letter-spacing:0}
.site-modern .client-filter select{appearance:none;-webkit-appearance:none;width:100%;height:44px;padding:0 40px 0 16px;border:1px solid var(--line);border-radius:999px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2361656c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") right 16px center/12px no-repeat;color:var(--ink);font:500 14px/1 var(--ui-font);cursor:pointer;box-shadow:none;transition:border-color .2s}
.site-modern .client-filter select:hover{border-color:var(--ink-2)}
.site-modern .client-filter select:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.client-count{margin-left:auto;padding-bottom:11px;color:var(--muted);font-size:14px;white-space:nowrap}

/* ---------- Product cards ---------- */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px;margin:0;padding:0;list-style:none}
.product-card{min-width:0;margin:0;padding:0;background:none;border:0;list-style:none}
.product-card-link{display:flex;flex-direction:column;height:100%;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:#fff;color:inherit;text-decoration:none;transition:border-color .2s,box-shadow .25s var(--ease),transform .25s var(--ease)}
.product-card-link:hover{border-color:var(--line-strong);box-shadow:var(--shadow-md);transform:translateY(-2px);text-decoration:none;color:inherit}
.product-card-link:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
.product-card-media{position:relative;display:grid;place-items:center;height:190px;padding:20px;border-bottom:1px solid var(--line);background:#fff}
.site-modern .product-card-media img{width:auto;max-width:100%;max-height:150px;object-fit:contain;transition:transform .5s var(--ease),filter .2s,opacity .2s}
.product-card-link:hover .product-card-media img{transform:scale(1.04)}
.product-card-body{display:flex;flex-direction:column;flex:1;padding:20px 22px 22px}
.site-modern .product-card-kicker{margin:0 0 6px;color:var(--muted);font-size:13px;font-weight:400;letter-spacing:0;line-height:1.4}
.site-modern .product-card h2{margin:0;font-size:20px;line-height:1.3;letter-spacing:-.015em;font-weight:500;overflow-wrap:anywhere;transition:color .2s}
.product-card-link:hover h2{color:var(--red)}
.site-modern .product-card-format{margin:6px 0 18px;color:var(--muted);font-size:14.5px;line-height:1.5}
.site-modern .stock-line{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;white-space:nowrap;margin:auto 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:13.5px;line-height:1.4}
.stock-qty{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

/* Stock status: colour plus words, never colour alone. */
.stock-pill{display:inline-flex;align-items:center;gap:7px;padding:4px 11px 4px 9px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}
.stock-pill::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
.stock-pill.is-in{background:var(--green-50);color:var(--green)}
.stock-pill.is-out{background:var(--red);color:#fff}
.stock-pill.is-out::before{background:#fff}
.stock-pill.is-wholesaler{background:var(--paper-2);color:var(--ink-2)}
.stock-pill.is-restock{background:var(--amber-50);color:var(--amber)}

/* Out-of-stock cards are unmistakable: banner over the image, faded product. */
.stock-flag,.product-flag{position:absolute;top:14px;left:14px;z-index:1;display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;font-size:12.5px;font-weight:600;letter-spacing:.02em;line-height:1.3}
.stock-flag{background:var(--red);color:#fff;box-shadow:0 6px 16px -6px rgb(217 45 37/.6)}
.stock-flag::before{content:'';width:12px;height:12px;border:2px solid currentColor;border-radius:50%;background:linear-gradient(45deg,transparent 43%,currentColor 43% 57%,transparent 57%)}
.product-flag.is-new{background:rgb(15 127 140/.1);color:#0b6570}
.product-flag.is-promo{background:var(--red-50);color:var(--red-700)}
.product-card.is-out .product-card-media,.product-card.is-restock .product-card-media{background:repeating-linear-gradient(-45deg,#fff,#fff 10px,var(--paper) 10px,var(--paper) 20px)}
.site-modern .product-card.is-out .product-card-media img,.site-modern .product-card.is-restock .product-card-media img{filter:grayscale(1);opacity:.45}
.product-card.is-out .product-card-link,.product-card.is-restock .product-card-link{border-color:#f0c9c5}

.client-empty{padding:56px 24px;border:1px dashed var(--line-strong);border-radius:var(--radius);text-align:center}
.site-modern .client-empty h2{margin:0 0 20px;font-size:22px}

/* ---------- Pagination ---------- */
.client-pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;margin-top:40px}
.client-pagination a{display:inline-grid;place-items:center;min-width:44px;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:14px;font-weight:500;text-decoration:none;transition:border-color .2s,background-color .2s}
.client-pagination a:hover{border-color:var(--ink)}
.client-pagination a[aria-current=page]{background:var(--ink);border-color:var(--ink);color:#fff}
.client-pagination .client-page-all{margin-left:10px;border-color:transparent;color:var(--muted)}

@media(max-width:700px){
  .client-filter{max-width:none;flex-basis:calc(50% - 7px)}
  .client-count{margin-left:0;padding:0;flex-basis:100%}
  .product-grid{grid-template-columns:1fr 1fr;gap:14px}
  .product-card-media{height:140px;padding:14px}
  .site-modern .product-card-media img{max-height:110px}
  .product-card-body{padding:16px}
  .site-modern .product-card h2{font-size:17px}
  .stock-flag,.product-flag{top:10px;left:10px;font-size:11.5px;padding:5px 10px}
}
@media(max-width:460px){.product-grid{grid-template-columns:1fr}.client-filter{flex-basis:100%}}

/* ---------- Shared cards and fields ---------- */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.client-express{display:grid;gap:24px;padding-top:32px;padding-bottom:clamp(56px,8vw,96px)}
.client-express>form{display:grid;gap:24px;margin:0}
.client-card{border:1px solid var(--line);border-radius:var(--radius);background:#fff;overflow:hidden}
.client-card-head{display:flex;align-items:flex-start;gap:16px;padding:22px 24px 18px}
.site-modern .client-card-head h2{margin:2px 0 4px;font-size:21px;line-height:1.3}
.site-modern .client-card-head p{margin:0;color:var(--muted);font-size:14.5px;line-height:1.55}
.client-step-number{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:var(--red-50);color:var(--red-700);font-size:15px;font-weight:600}
.client-card-foot{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:12px;padding:18px 24px;border-top:1px solid var(--line);background:var(--paper);margin:0;float:none;width:auto}
.client-card-foot .ui-button{min-width:170px}
.site-modern .client-field{display:flex;flex-direction:column;gap:6px;margin:0;padding:0 24px 20px}
.site-modern .client-field label{margin:0;color:var(--ink-2);font-size:13.5px;font-weight:500}
.site-modern .client-field input,.site-modern .client-field textarea{width:100%;min-height:46px;padding:11px 14px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink);font:15px/1.5 var(--ui-font);box-shadow:none;transition:border-color .2s,box-shadow .2s}
.site-modern .client-field textarea{min-height:88px;resize:vertical}
.site-modern .client-field input:focus,.site-modern .client-field textarea:focus{outline:0;border-color:var(--teal);box-shadow:0 0 0 3px rgb(15 127 140/.15)}
.site-modern .client-error{color:var(--red-700);font-size:13px;margin:0}

/* ---------- Express order table ---------- */
.express-table-wrap{border-top:1px solid var(--line);overflow-x:auto}
.site-modern .express-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.45;background:#fff}
.site-modern .express-table thead th{padding:12px 16px;background:var(--paper);border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;text-align:left;white-space:nowrap}
.site-modern .express-table th.express-qty-head{text-align:right;padding-right:24px}
.site-modern .express-table td,.site-modern .express-table tbody th{padding:12px 16px;border-bottom:1px solid var(--line);vertical-align:middle;text-align:left;font-weight:400;background:none}
.site-modern .express-table tbody th:first-child,.site-modern .express-table thead th:first-child{padding-left:24px}
.express-family tr:not(:first-child) .express-name{color:var(--muted)}
.express-family:last-child tr:last-child>*{border-bottom:0}
.express-name{display:block;font-weight:500;color:var(--ink)}
.express-din{display:block;color:var(--muted);font-size:12.5px;letter-spacing:.02em}
.express-mobile-meta{display:none}
.express-format,.express-strength{color:var(--ink-2);white-space:nowrap}
.express-stock{white-space:nowrap}
.express-restock{display:block;margin-top:4px;color:var(--muted);font-size:12.5px}
.site-modern .express-qty{width:1%;padding-right:24px!important;text-align:right}
.site-modern .express-input{width:88px;height:44px;margin:0;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink);font:500 16px/1 var(--ui-font);text-align:right;font-variant-numeric:tabular-nums;box-shadow:none;transition:border-color .2s,box-shadow .2s,background-color .2s}
.site-modern .express-input::placeholder{color:#b9b3ab}
.site-modern .express-input:focus{outline:0;border-color:var(--teal);box-shadow:0 0 0 3px rgb(15 127 140/.15)}
.site-modern .express-input.error{border-color:var(--red);background:var(--red-50);box-shadow:0 0 0 3px rgb(217 45 37/.15)}
.express-row:hover>*{background:#fcfbf9}
.express-row.is-out>*,.express-row.is-restock>*{background:#fff8f7}
.express-row.is-out:hover>*,.express-row.is-restock:hover>*{background:#fff1ef}
.express-row.is-out th:first-child,.express-row.is-restock th:first-child{box-shadow:inset 4px 0 0 var(--red)}
.site-modern .express-row.is-out .express-input,.site-modern .express-row.is-restock .express-input{border-style:dashed}
.express-na{color:var(--muted)}

/* ---------- Summary ---------- */
.express-recap{border-top:1px solid var(--line)}
.summary-scroll{overflow-x:auto}
.site-modern .summary-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.45}
.site-modern .summary-table thead th{padding:12px 16px;background:var(--paper);border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;text-align:left;white-space:nowrap}
.site-modern .summary-table td,.site-modern .summary-table tbody th{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left;font-weight:400;vertical-align:middle}
.site-modern .summary-table th:first-child{padding-left:24px}
.site-modern .summary-table .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.summary-table .item-title{display:block;font-weight:500}
.recap-meta{display:block;margin-top:2px;color:var(--muted);font-size:13px}
.summary-table tr.is-out>*{background:#fff8f7}
.summary-table tr.is-out th:first-child{box-shadow:inset 4px 0 0 var(--red)}
.recap-remove{width:1%;padding-right:20px!important}
.recap-remove a{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:var(--muted);transition:background-color .2s,color .2s}
.recap-remove a:hover{background:var(--red-50);color:var(--red-700)}
.summary-total{display:flex;justify-content:flex-end;align-items:baseline;gap:24px;padding:18px 24px;font-size:15px;color:var(--muted)}
.summary-total strong{color:var(--ink);font-size:24px;font-weight:600;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.site-modern .summary-empty{margin:0;padding:22px 24px;color:var(--muted);font-size:15px}

/* ---------- Sales rep section ---------- */
.client-billto{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin:0 24px 20px;padding:16px 18px;border-radius:var(--radius-sm);background:var(--red-50)}
.site-modern .client-billto p{margin:0;font-size:15px}
.client-rep{margin:0 24px 22px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fff}
.client-rep summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:14px 18px;cursor:pointer;font-weight:500;list-style:none}
.client-rep summary::-webkit-details-marker{display:none}
.client-rep summary::before{content:'+';display:inline-grid;place-items:center;width:22px;height:22px;border:1px solid var(--line-strong);border-radius:50%;font-size:15px;line-height:1;color:var(--muted)}
.client-rep[open] summary::before{content:'–'}
.client-rep summary span{color:var(--muted);font-size:13.5px;font-weight:400}
.client-rep-grid{display:grid;grid-template-columns:1fr 1fr;padding-top:4px;border-top:1px solid var(--line)}
.site-modern .client-rep-grid .client-field{padding:14px 18px 4px}
.site-modern .client-rep-grid .client-field-wide{grid-column:1/-1;padding-bottom:18px}

/* ---------- Dialogs and cart (legacy tractrBox, restyled) ---------- */
.site-modern .tractrOverlay{background:rgb(23 24 27/.55);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.site-modern .tractrBox{top:50%;left:50%;width:min(720px,calc(100vw - 32px))!important;max-height:calc(100dvh - 48px);margin:0;padding:0;transform:translate(-50%,-50%);border:0;border-radius:20px;background:#fff;box-shadow:var(--shadow-lg);overflow:hidden}
.site-modern .tractrBox .box-content{width:100%;max-height:calc(100dvh - 48px);padding:32px;border:0;overflow:auto;font-size:15px;line-height:1.6;color:var(--ink)}
.site-modern .tractrBox .close{top:14px;right:14px;width:40px;height:40px;border-radius:50%;background:var(--paper);z-index:3;transition:background-color .2s}
.site-modern .tractrBox .close:hover{background:var(--paper-2)}
.site-modern .tractrBox .close:before{display:none}
.site-modern .tractrBox .close:after{content:'';position:absolute;inset:0;left:0;top:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317181b' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center/18px no-repeat}
.client-dialog .box-content{text-align:center}
.site-modern .client-dialog h3{margin:8px 0 6px;font-size:24px;font-weight:500;letter-spacing:-.02em;text-transform:none}
.site-modern .client-dialog h4{margin:0 0 12px;font-size:16px;font-weight:600;text-transform:none}
.client-dialog-text{max-width:56ch;margin:0 auto 24px;color:var(--ink-2);text-align:left;font-size:14.5px}
.client-dialog-icon{display:inline-grid;place-items:center;width:56px;height:56px;border-radius:50%;font-size:26px;font-weight:600}
.client-dialog-icon.is-success{background:var(--green-50);color:var(--green)}
.client-dialog-icon.is-error{background:var(--red-50);color:var(--red-700)}

.client-cart-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 20px;margin:0 48px 18px 0}
.site-modern .client-cart-head h2{margin:0;font-size:24px;font-weight:500;letter-spacing:-.02em}
.site-modern .client-cart .tractrBox-modify-info{margin:0;color:var(--red-700);font:500 14px/1.4 var(--ui-font);text-align:left}
.site-modern .client-cart .tractrBox-modify-info:before{display:none}
.client-cart-scroll{margin:0 -32px;overflow-x:auto;border-top:1px solid var(--line)}
.site-modern .client-cart .list-order{width:100%;min-width:560px;display:table;border-collapse:collapse;font-size:14px}
.site-modern .client-cart .list-order th{padding:10px 12px;background:var(--paper);border-bottom:1px solid var(--line);color:var(--muted);font-size:11.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;text-align:left}
.site-modern .client-cart .list-order td{padding:12px;border-bottom:1px solid var(--line);vertical-align:middle;color:var(--ink-2);white-space:nowrap;font-variant-numeric:tabular-nums}
.site-modern .client-cart .list-order td:first-child{white-space:normal;color:var(--ink);font-weight:500;min-width:180px}
.site-modern .client-cart .list-order td.available{color:var(--green);font-weight:500}
.site-modern .client-cart .list-order .big-total td{color:var(--ink);font-size:16px;font-weight:600;background:var(--paper)}
.site-modern .client-cart .list-order th:first-child,.site-modern .client-cart .list-order td:first-child{padding-left:32px}
.site-modern .client-cart .list-order td.delete img{width:28px;height:28px;padding:6px;border-radius:50%;cursor:pointer;opacity:.6}
.site-modern .client-cart .list-order td.delete img:hover{background:var(--red-50);opacity:1}
.site-modern .client-cart .total td,.site-modern .client-cart .big-total td{border-top:0;padding:8px 12px;font-weight:500}
.site-modern .client-cart .cart-action{display:grid;gap:12px;margin-top:20px}
.site-modern .client-cart .cart-action-comment{width:auto;float:none;padding:0}
.site-modern .client-cart .cart-action-legend{margin:0;color:var(--muted);font:13px/1.4 var(--ui-font)}
.site-modern .client-cart .cart-action-button{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;width:auto;margin:0;text-align:right}
.site-modern .client-cart .cart-action-button .valid,.site-modern .client-cart .cart-action-button .continue{width:auto;margin:0}
.site-modern .client-cart .cart-action-billto{margin:0;padding:12px 14px;border-radius:var(--radius-sm);background:var(--red-50)}
.site-modern .client-cart .order-empty{text-align:center;padding:48px 32px}

@media(max-width:760px){
  .client-card-head{padding:18px 18px 14px}
  .site-modern .client-field{padding:0 18px 18px}
  .client-card-foot{padding:16px 18px}
  .client-card-foot .ui-button{flex:1 1 100%}
  .client-billto,.client-rep{margin-left:18px;margin-right:18px}
  .client-rep-grid{grid-template-columns:1fr}
  /* Express rows become compact cards with the quantity on the right. */
  .site-modern .express-table thead{display:none}
  .site-modern .express-table,.site-modern .express-table tbody{display:block}
  .site-modern .express-table tr{display:grid;grid-template-columns:1fr auto;grid-template-areas:"name qty" "meta qty" "stock qty";gap:2px 14px;padding:14px 18px;border-bottom:1px solid var(--line)}
  .site-modern .express-table td,.site-modern .express-table tbody th{display:block;padding:0!important;border:0;background:none!important}
  .express-format,.site-modern td.express-din{display:none!important}
  .site-modern .express-table tbody th.express-strength{grid-area:name;font-weight:600}
  .express-mobile-meta{display:block;color:var(--ink-2);font-size:14px}
  .express-stock{grid-area:stock;margin-top:6px}
  .site-modern .express-qty{grid-area:qty;align-self:center;width:auto}
  .express-row.is-out,.express-row.is-restock{background:#fff8f7;box-shadow:inset 4px 0 0 var(--red)}
  .express-row.is-out th:first-child,.express-row.is-restock th:first-child{box-shadow:none}
  .site-modern .express-table tr.express-family-head{display:block;padding:16px 18px 6px;background:#fbfaf8;border-bottom:1px solid var(--line)}
  .site-modern .express-table tr.express-family-head th{display:block;padding:0!important}
  .site-modern .tractrBox .box-content{padding:24px 20px}
  .client-cart-scroll{margin:0 -20px}
  .site-modern .client-cart .list-order th:first-child,.site-modern .client-cart .list-order td:first-child{padding-left:20px}
  .summary-total{padding:16px 18px}
}

/* ---------- Product detail ---------- */
.client-hero-compact .ui-container{padding-top:clamp(24px,4vw,40px);padding-bottom:clamp(24px,4vw,36px)}
.site-modern .client-hero-compact h1{margin:0;font-size:clamp(30px,3.6vw,44px);line-height:1.1;letter-spacing:-.03em}
.site-modern .client-hero-compact .client-hero-lead{margin-top:8px}
.site-modern .client-product{background:none;padding-top:32px;padding-bottom:clamp(56px,8vw,96px)}
.client-product-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(24px,4vw,48px);align-items:start}
.product-gallery{position:sticky;top:calc(var(--header-h) + 24px)}
.product-gallery-main{position:relative;display:grid;place-items:center;aspect-ratio:1/1;max-height:460px;width:100%;padding:32px;border:1px solid var(--line);border-radius:var(--radius);background:#fff}
.site-modern .product-gallery-main img{width:auto;max-width:100%;max-height:340px;object-fit:contain}
.product-gallery-main.is-out{background:repeating-linear-gradient(-45deg,#fff,#fff 12px,var(--paper) 12px,var(--paper) 24px);border-color:#f0c9c5}
.site-modern .product-gallery-main.is-out img{filter:grayscale(1);opacity:.45}
.site-modern .client-product .product-thumbnails{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 0;padding:0;list-style:none}
.site-modern .client-product .product-thumb{float:none;width:auto;margin:0;padding:0}
.site-modern .client-product .product-thumb-link{display:flex;align-items:center;gap:10px;height:56px;padding:6px 14px 6px 6px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink-2);font-size:14px;font-weight:500;text-decoration:none;transition:border-color .2s}
.site-modern .client-product .product-thumb-link:hover{border-color:var(--ink-2)}
.site-modern .client-product .product-thumb-link[aria-current]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink);color:var(--ink)}
.site-modern .client-product .product-thumb-img{width:44px;height:44px;padding:4px;border-radius:50%;background:var(--paper);object-fit:contain}
.product-thumb-desc{white-space:nowrap}

.product-info{display:grid;gap:20px;min-width:0}
.site-modern .product-facts{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0;padding:6px 22px;border-radius:var(--radius);background:var(--paper)}
.site-modern .product-facts>div:not(.product-facts-pair),.product-facts-pair>div{padding:14px 0;border-bottom:1px solid var(--line)}
.product-facts>div:nth-child(odd):not(.product-facts-pair){padding-right:16px}
.product-facts-pair{display:contents}
.site-modern .product-facts dt{margin:0 0 2px;color:var(--muted);font-size:12.5px;font-weight:500;letter-spacing:0;text-transform:none}
.site-modern .product-facts dd{margin:0;color:var(--ink);font-size:15px;font-weight:500;line-height:1.45}
.product-pdf{justify-self:start}

.site-modern .client-product .product-order{margin:0;padding:0;border:1px solid var(--line);background:#fff}
.site-modern .client-product .product-order-tab{display:flex;gap:4px;margin:0;padding:6px;border-bottom:1px solid var(--line);background:var(--paper)}
.site-modern .client-product .product-order-tab-link{flex:1;display:grid;place-items:center;min-height:42px;margin:0;padding:8px 14px;border:0;border-radius:10px;background:none;color:var(--muted);font-size:14.5px;font-weight:500;text-decoration:none;text-transform:none;float:none;width:auto;transition:background-color .2s,color .2s}
.site-modern .client-product .product-order-tab-link:hover{color:var(--ink)}
.site-modern .client-product .product-order-tab-link.actif{background:#fff;color:var(--ink);box-shadow:var(--shadow-sm)}
.site-modern .client-product .tab{padding:0;border:0;background:none}
.product-order-scroll{overflow-x:auto}
.site-modern .product-formats{width:100%;border-collapse:collapse;font-size:15px;line-height:1.45}
.site-modern .product-formats thead th{padding:12px 16px;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;text-align:left;white-space:nowrap;background:none}
.site-modern .product-formats td,.site-modern .product-formats tbody th{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;font-weight:400;background:none}
.site-modern .product-formats tbody th{font-weight:600;white-space:nowrap}
.site-modern .product-formats :is(th,td):first-child{padding-left:22px}
.site-modern .product-formats :is(th,td):last-child{padding-right:22px}
.site-modern .product-formats .num{text-align:right}
.product-formats tr.is-out>*{background:#fff8f7!important}
.product-formats tr.is-out>th:first-child{box-shadow:inset 4px 0 0 var(--red)}
.site-modern .product-formats tr.is-out .express-input{border-style:dashed}
.stock-qty-line{margin-left:8px;color:var(--muted);font-size:13px;white-space:nowrap}
.site-modern .product-formats td:nth-child(3){white-space:nowrap}
.site-modern .product-order-action{display:flex;justify-content:flex-end;margin:0;padding:18px 22px;background:var(--paper);border-top:0}
.product-added{display:flex;align-items:center;gap:16px;padding:22px}
.product-added .client-dialog-icon{width:44px;height:44px;font-size:20px}
.site-modern .product-added p{margin:2px 0 0;font-size:14.5px}
.product-added a{color:var(--red-700);font-weight:500}
.product-login{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;padding:22px}
.site-modern .product-login p{margin:0}
.site-modern .product-empty-note{margin:0;padding:0 22px 22px;color:var(--muted)}

/* Product-level stock warning. */
.stock-alert{display:flex;align-items:flex-start;gap:14px;margin:0 0 24px;padding:16px 20px;border:1px solid #f0c9c5;border-left:4px solid var(--red);border-radius:var(--radius-sm);background:#fff8f7}
.stock-alert-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--red);color:#fff;font-weight:700;font-size:15px}
.stock-alert strong{display:block;color:var(--red-700);font-size:16px;font-weight:600}
.site-modern .stock-alert p{margin:2px 0 0;color:var(--ink-2);font-size:14.5px;line-height:1.55}

@media(max-width:900px){
  .client-product-grid{grid-template-columns:1fr}
  .product-gallery{position:static}
  .product-gallery-main{aspect-ratio:auto;height:280px}
  .site-modern .product-gallery-main img{max-height:220px}
}
@media(max-width:600px){
  .site-modern .product-facts{grid-template-columns:1fr}
  .product-facts>div:nth-child(odd):not(.product-facts-pair){padding-right:0}
  .site-modern .product-formats :is(th,td){padding-left:12px;padding-right:12px}
  .site-modern .product-order-action .ui-button{width:100%}
}
.client-hero .client-back{display:flex;width:max-content}
.site-modern .client-product .product-thumbnails[hidden]{display:none!important}
.site-modern .product-formats tr,.site-modern .express-table tr,.site-modern .summary-table tr{background:none!important}
.site-modern .product-formats tbody th{font-size:15px;color:var(--ink)}
.site-modern .product-formats td{color:var(--ink-2);font-size:15px}
.site-modern #msg_addedItem,.site-modern #msg_addedItem *{font-style:normal}
.site-modern #msg_addedItem strong{font-weight:600;font-size:16px;color:var(--ink)}

/* ---------- Older page banners (account, contact, registration…) ---------- */
:root{--surface:var(--paper)}
.site-modern .page-header{min-height:0;padding:clamp(32px,5vw,56px) 0 clamp(28px,4vw,40px);background:var(--paper)!important;border-bottom:1px solid var(--line)}
.site-modern .page-header:after{display:none}
.site-modern .page-header-container{max-width:calc(var(--max) + var(--gutter)*2);padding:0 var(--gutter)}
.site-modern .page-header-title{margin:0;color:var(--ink);font-size:clamp(32px,4vw,48px);font-weight:500;letter-spacing:-.03em;line-height:1.1}
.site-modern :is(.page-content,.page-contentbg,.news,.express,.account,.jobs,.team){background:#fff}

/* ---------- Portal pages (sign-in, orders) ---------- */
.portal .button{min-height:44px;padding:10px 22px;border-radius:999px;font-weight:500;font-size:14.5px;transition:background-color .2s,border-color .2s,box-shadow .2s}
.portal .primary:hover{background:var(--red-600);box-shadow:0 8px 20px -8px rgb(217 45 37/.55)}
.portal .secondary{border-color:var(--line)}
.portal .secondary:hover{background:var(--paper);border-color:var(--line-strong)}
.portal .card{border-color:var(--line);border-radius:var(--radius);box-shadow:none}
.portal input:not([type=checkbox]):not([type=radio]),.portal select,.portal textarea{border-color:var(--line-strong);border-radius:var(--radius-sm)}

/* ---------- Sign-in ---------- */
.portal .auth-layout{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);max-width:1080px;margin:clamp(32px,6vw,72px) auto;gap:clamp(32px,6vw,88px);padding:0 var(--gutter)}
.portal .auth-layout.auth-single{grid-template-columns:minmax(0,460px);justify-content:center}
.portal .auth-intro h1{margin:0 0 18px;font-size:clamp(34px,4vw,52px);line-height:1.08;letter-spacing:-.035em;font-weight:500}
.portal .auth-intro>p:not(.ui-eyebrow){color:var(--muted);font-size:17px;line-height:1.6}
.portal .auth-points{margin:36px 0 0;padding:28px 0 0;list-style:none;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr);gap:20px;color:var(--muted);font-size:13.5px;line-height:1.5}
.portal .auth-points strong{display:block;margin:0 0 4px;color:var(--ink);font-size:15px;font-weight:500}
.portal .auth-card{padding:clamp(24px,3vw,36px);border-radius:20px;box-shadow:var(--shadow-md)}
.portal .auth-card h2{margin:0 0 22px;font-size:26px;font-weight:500;letter-spacing:-.02em}
.portal .password-field{border-color:var(--line-strong);border-radius:var(--radius-sm)}
.portal .password-field .text-button{white-space:nowrap;flex:none;color:var(--red-700);font-weight:500}
.portal .auth-card .quiet-link{color:var(--red-700)}
.portal .auth-register{margin-top:24px;padding-top:20px}
.portal .auth-register p{margin:0 0 12px;color:var(--muted)}
@media(max-width:900px){.portal .auth-layout{grid-template-columns:1fr}.portal .auth-points{display:none}}
.portal .auth-intro>p.ui-eyebrow{color:var(--red);font-size:12.5px;max-width:none}

/* ---------- Sending state ---------- */
.ui-button.is-sending,.ui-button:disabled{opacity:.7;cursor:progress;box-shadow:none}
.site-modern .client-dialog-order{margin:0 0 16px;color:var(--muted);font-size:15px}
.site-modern .client-dialog-order strong{color:var(--ink);font-weight:600}

/* ---------- One card per product: its formats listed inside ---------- */
.site-modern .variant-list{display:grid;gap:0;margin:14px 0 0;padding:0;list-style:none;border-top:1px solid var(--line)}
.site-modern .variant{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:10px 0;border-bottom:1px solid var(--line);font-size:14px;line-height:1.35;list-style:none}
.site-modern .variant:last-child{border-bottom:0;padding-bottom:0}
.variant-name{min-width:0;color:var(--ink-2)}
.variant-name small{display:block;margin-top:2px;color:var(--muted);font-size:12px}
.variant-stock{display:inline-flex;align-items:center;gap:6px;flex:none;white-space:nowrap;font-size:13px;font-weight:600}
.variant-stock::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
.variant-stock.is-in{color:var(--green)}
.variant-stock.is-out{padding:3px 10px 3px 8px;border-radius:999px;background:var(--red);color:#fff}
.variant-stock.is-out::before{background:#fff}
.variant-stock.is-wholesaler{color:var(--muted)}
.site-modern .variant.is-out .variant-name{color:var(--muted)}
.site-modern .product-card h2{margin-bottom:0}

/* ---------- Express order grouped by product ---------- */
.site-modern .express-table .express-family-head th{padding:18px 24px 8px!important;background:#fbfaf8!important;border-bottom:1px solid var(--line);color:var(--ink);font-size:16.5px;font-weight:600;letter-spacing:-.01em;text-transform:none;text-align:left}
.site-modern .express-table tbody th.express-strength{padding-left:24px;font-weight:500;color:var(--ink);white-space:nowrap}
.site-modern .express-table td.express-din{display:table-cell;color:var(--muted);font-size:13.5px;font-variant-numeric:tabular-nums;white-space:nowrap}
.site-modern .express-stock{white-space:nowrap}
.express-mobile-meta{display:none}
@media(max-width:760px){.express-mobile-meta{display:block;margin-top:2px;color:var(--muted);font-size:13px;font-weight:400}}
@media(max-width:760px){
  .site-modern .express-table .express-family-head th{background:none!important;border:0;font-size:16px}
  .site-modern .express-table tr.express-row{grid-template-columns:minmax(0,1fr) auto}
}

/* ---------- Cart pop-up: editable lines ---------- */
.site-modern .client-cart .cart-lines{margin:0 -32px;padding:0;list-style:none;border-top:1px solid var(--line)}
.site-modern .cart-line{display:grid;grid-template-columns:minmax(0,1fr) auto 96px 40px;align-items:center;gap:14px;margin:0;padding:14px 32px;border-bottom:1px solid var(--line);list-style:none;transition:opacity .2s}
.cart-line.is-out{background:#fff8f7;box-shadow:inset 4px 0 0 var(--red)}
.cart-line.is-removing{opacity:.4;pointer-events:none}
.cart-line-info{min-width:0}
.cart-line-title{display:block;font-weight:500;color:var(--ink);font-size:15px;line-height:1.35;overflow-wrap:anywhere}
.cart-line-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:6px}
.cart-line-meta .stock-pill{padding:2px 9px 2px 8px;font-size:12px}
.cart-line-unit{color:var(--muted);font-size:13px;white-space:nowrap}
.cart-stepper{display:inline-flex;align-items:center;border:1px solid var(--line-strong);border-radius:999px;background:#fff;overflow:hidden}
.site-modern .cart-step{display:grid;place-items:center;width:36px;height:38px;margin:0;padding:0;border:0;background:none;color:var(--ink);font:500 18px/1 var(--ui-font);cursor:pointer;transition:background-color .2s}
.site-modern .cart-step:hover{background:var(--paper)}
.site-modern .cart-qty{width:46px;height:38px;margin:0;padding:0;border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);border-radius:0;background:#fff;color:var(--ink);font:600 15px/1 var(--ui-font);text-align:center;font-variant-numeric:tabular-nums;box-shadow:none}
.site-modern .cart-qty:focus{outline:2px solid var(--teal);outline-offset:-2px}
.cart-line-total{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.site-modern .cart-remove{display:grid;place-items:center;width:40px;height:40px;margin:0;padding:0;border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer;transition:background-color .2s,color .2s}
.site-modern .cart-remove:hover{background:var(--red-50);color:var(--red-700)}
.site-modern .cart-remove:focus-visible,.site-modern .cart-step:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.site-modern .cart-error{margin:12px 0 0;padding:10px 14px;border-radius:var(--radius-sm);background:var(--red-50);color:var(--red-700);font-size:14px}
.site-modern .cart-totals{display:grid;gap:4px;margin:16px 0 0 auto;max-width:300px;font-size:14.5px}
.site-modern .cart-totals>div{display:flex;justify-content:space-between;gap:24px}
.site-modern .cart-totals dt{margin:0;color:var(--muted);font-weight:400}
.site-modern .cart-totals dd{margin:0;font-variant-numeric:tabular-nums}
.site-modern .cart-totals .cart-grand{margin-top:6px;padding-top:8px;border-top:1px solid var(--line);font-size:17px}
.site-modern .cart-totals .cart-grand dt,.site-modern .cart-totals .cart-grand dd{color:var(--ink);font-weight:600}
.site-modern .client-cart .order-empty h2{margin:0 0 8px;font-size:24px;font-weight:500}
.site-modern .client-cart .order-empty p{margin:0 0 20px;color:var(--muted)}
@media(max-width:760px){
  .site-modern .client-cart .cart-lines{margin:0 -20px}
  .site-modern .cart-line{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"info remove" "stepper total";padding:14px 20px;gap:10px}
  .cart-line-info{grid-area:info}.cart-remove{grid-area:remove}.cart-stepper{grid-area:stepper;justify-self:start}.cart-line-total{grid-area:total}
  .site-modern .cart-totals{max-width:none}
}


/* ---------- Express order: automatic saving ---------- */
.site-modern .express-qty{position:relative}
.express-row-status{display:block;min-height:0;margin-top:4px;font-size:12px;line-height:1.3;text-align:right;white-space:nowrap}
.express-row-status:empty{display:none}
.express-row-status.is-saving{color:var(--muted)}
.express-row-status.is-saved{color:var(--green)}
.express-row-status.is-error{color:var(--red-700);font-weight:500}
.express-row.is-saving .express-input{border-color:var(--line-strong);background:var(--paper)}
.site-modern .express-row.has-error .express-input{border-color:var(--red);box-shadow:0 0 0 3px rgb(217 45 37/.15)}
.express-unavailable{display:inline-block;padding:10px 0;color:var(--muted);font-size:13.5px;white-space:nowrap}

/* Stock notice from the legacy add-to-cart script: a small card that fades out. */
.cart-toast{position:fixed;left:50%;bottom:24px;z-index:1000;max-width:min(520px,calc(100vw - 32px));padding:14px 18px 14px 44px;border-radius:14px;background:var(--ink);color:#fff;font:500 14.5px/1.45 var(--ui-font);box-shadow:var(--shadow-lg);opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:opacity .25s var(--ease),transform .25s var(--ease)}
.cart-toast::before{content:'!';position:absolute;left:14px;top:50%;display:grid;place-items:center;width:20px;height:20px;margin-top:-10px;border-radius:50%;background:var(--red);font-weight:700;font-size:12px}
.cart-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:760px){.express-row-status{text-align:left}.express-row-status.is-error{max-width:none}}

/* ---------- Order history (account/orders) ---------- */
.portal-client .portal-main{max-width:none;margin:0;padding:0}
.portal-client .client-hero h1{margin:0;font-size:clamp(32px,4vw,48px);font-weight:500;line-height:1.1;letter-spacing:-.03em}
.portal-client .client-hero-compact h1{font-size:clamp(28px,3.4vw,40px)}
.portal-client .client-hero-lead{max-width:60ch;margin:12px 0 0;color:var(--muted);font-size:16px;line-height:1.6}
.portal-client .client-hero-compact .client-hero-lead{margin-top:8px}
.portal-client .ui-button svg{flex:none}
.client-orders,.client-order{padding-top:28px;padding-bottom:clamp(56px,8vw,96px)}
.client-notice{margin:0 0 24px;padding:14px 18px;border:1px solid #bfe0cc;border-radius:var(--radius-sm);background:var(--green-50);color:#174f31;font-size:14.5px;line-height:1.55}
.client-notice strong{font-weight:600}
.client-notice.is-warning{border-color:#f0d6a8;background:var(--amber-50);color:#6b4100}
.client-dialog-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:18px}

.order-status{display:inline-flex;align-items:center;gap:7px;padding:4px 12px 4px 10px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap;background:var(--paper-2);color:var(--ink-2)}
.order-status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.order-status.is-waiting{background:var(--amber-50);color:var(--amber)}
.order-status.is-making{background:#e7f3f4;color:var(--teal)}
.order-status.is-shipped{background:var(--green-50);color:var(--green)}
.order-status.is-cancelled{background:var(--paper-2);color:var(--muted)}

.order-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 20px;margin-bottom:22px}
.order-tabs{display:flex;flex-wrap:wrap;gap:8px}
.order-tab{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink-2);font-size:14px;font-weight:500;text-decoration:none;transition:border-color .2s var(--ease),background-color .2s var(--ease)}
.order-tab:hover{border-color:var(--line-strong);color:var(--ink);text-decoration:none}
.order-tab span{min-width:22px;padding:1px 7px;border-radius:999px;background:var(--paper-2);color:var(--muted);font-size:12px;font-weight:600;text-align:center}
.order-tab[aria-current]{border-color:var(--ink);background:var(--ink);color:#fff}
.order-tab[aria-current] span{background:rgb(255 255 255/.18);color:#fff}
.order-search{position:relative;flex:0 1 280px;margin:0}
.order-search svg{position:absolute;left:15px;top:50%;margin-top:-9px;color:var(--muted);pointer-events:none}
.portal-client .order-search input{width:100%;height:42px;min-height:0;padding:0 16px 0 42px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:400 14.5px/1 var(--ui-font)}
.portal-client .order-search input:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

.order-cards{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.order-card{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px 28px;padding:20px 24px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;transition:border-color .2s var(--ease),box-shadow .2s var(--ease)}
.order-card:hover{border-color:var(--line-strong);box-shadow:var(--shadow-sm)}
.order-card.is-cancelled{background:#fcfbf9}
.order-card-main{min-width:0;flex:1}
.order-card-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.portal-client .order-card-link{color:var(--ink);font-size:17px;font-weight:600;text-decoration:none;letter-spacing:-.01em}
.order-card-link::after{content:"";position:absolute;inset:0;border-radius:inherit}
.portal-client .order-card-link:hover{color:var(--red);text-decoration:none}
.order-card-link:focus-visible{outline:none}
.order-card-link:focus-visible::after{outline:2px solid var(--teal);outline-offset:2px}
.order-card-date{margin:6px 0 0;color:var(--muted);font-size:14px}
.order-card-items{margin:4px 0 0;color:var(--ink-2);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-card-more{color:var(--muted)}
.order-card-side{display:flex;align-items:center;gap:20px;flex:none}
.order-card-total{font-size:18px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.order-card-actions{position:relative;z-index:1;display:flex;gap:8px}
.order-card-actions .ui-button{min-height:42px;padding:8px 16px;font-size:14px}
.order-reorder{margin:0}
.order-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px;color:var(--muted);font-size:14px}
.order-pagination .ui-button{min-height:42px;font-size:14px}
.order-empty-state{max-width:460px;margin:24px auto 0;padding:48px 24px;border:1px dashed var(--line-strong);border-radius:var(--radius);text-align:center;color:var(--muted)}
.order-empty-state svg{width:36px;height:36px;color:var(--line-strong)}
.portal-client .order-empty-state h2{margin:12px 0 6px;font-size:21px}
.order-empty-state p{margin:0 0 20px}

/* One order */
.order-hero-inner{padding:0!important;align-items:center}
.order-hero-title{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.order-progress{padding:24px 28px}
.order-steps{list-style:none;display:flex;margin:0 0 16px;padding:0}
.order-steps li{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;color:var(--muted);font-size:14px;font-weight:500}
.order-steps li::before{content:"";position:absolute;top:15px;right:50%;left:-50%;height:2px;background:var(--line)}
.order-steps li:first-child::before{display:none}
.order-steps li.is-done::before,.order-steps li.is-current::before{background:var(--red)}
.order-step-dot{position:relative;z-index:1;display:grid;place-items:center;width:32px;height:32px;border:2px solid var(--line);border-radius:50%;background:#fff;font-size:13px;font-weight:600}
.order-steps .is-done .order-step-dot{border-color:var(--red);background:var(--red);color:#fff}
.order-steps .is-current .order-step-dot{border-color:var(--red);color:var(--red);box-shadow:0 0 0 5px var(--red-50)}
.order-steps .is-done,.order-steps .is-current{color:var(--ink)}
.order-progress-note{margin:0;padding-top:14px;border-top:1px solid var(--line);color:var(--ink-2);font-size:14.5px;text-align:center}
.order-progress.is-cancelled .order-progress-note{padding-top:0;border:0;color:var(--muted)}
.order-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start;margin-top:20px}
.order-items{padding:0}
.order-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:20px 24px 14px}
.portal-client .order-section-head h2,.portal-client .order-info h2{margin:0;font-size:19px;font-weight:500}
.order-section-head span{color:var(--muted);font-size:14px}
.order-lines{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.order-line{display:grid;grid-template-columns:minmax(0,1fr) auto 110px;align-items:center;gap:6px 20px;padding:16px 24px;border-bottom:1px solid var(--line)}
.order-line-info{display:flex;flex-direction:column;min-width:0}
.order-line-info strong{font-weight:600;font-size:15px}
.order-line-info span{color:var(--muted);font-size:13.5px}
.order-line-info .order-line-flag{align-self:flex-start;margin-top:6px;padding:2px 10px;border-radius:999px;background:var(--red-50);color:var(--red-700);font-size:12.5px;font-weight:600}
.order-line-qty{color:var(--muted);font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.order-line-total{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.order-totals{padding:16px 24px 22px;display:flex;flex-direction:column;gap:6px;max-width:360px;margin:0 0 0 auto}
.order-totals div{display:flex;justify-content:space-between;gap:20px;font-size:14.5px;color:var(--ink-2)}
.order-totals dt{font-weight:400}
.order-totals dd{margin:0;font-variant-numeric:tabular-nums}
.order-totals .is-total{margin-top:6px;padding-top:12px;border-top:1px solid var(--line);color:var(--ink);font-size:18px;font-weight:600}
.order-aside{display:flex;flex-direction:column;gap:12px}
.order-info{padding:18px 22px}
.order-info p{margin:8px 0 0;color:var(--ink-2);font-size:14.5px;line-height:1.6}
.order-help{background:var(--paper)}
.portal-client .order-help a{color:var(--red);font-weight:500}

@media (max-width:900px){
  .order-detail-grid{grid-template-columns:1fr}
  .order-card{flex-direction:column;align-items:stretch}
  .order-card-side{justify-content:space-between}
}
@media (max-width:600px){
  .order-search{flex-basis:100%}
  .order-tabs{flex-wrap:nowrap;overflow-x:auto;margin:0 calc(var(--gutter)*-1);padding:2px var(--gutter);scrollbar-width:none}
  .order-tab{flex:none}
  .order-card{padding:18px}
  .order-card-items{white-space:normal}
  .order-card-side{flex-wrap:wrap;gap:12px}
  .order-card-actions{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr)}
  .order-card-actions .ui-button{width:100%;padding:8px 14px}
  .order-progress{padding:20px 16px}
  .order-steps li{font-size:12.5px}
  .order-line{grid-template-columns:minmax(0,1fr) auto;padding:14px 18px}
  .order-line-qty{grid-row:2;grid-column:1}
  .order-line-total{grid-row:2;grid-column:2}
  .order-section-head,.order-totals{padding-left:18px;padding-right:18px}
  .order-hero-actions{width:100%}
  .order-hero-actions>*{flex:1}
  .order-hero-actions .ui-button{width:100%}
}
@media print{
  .portal-client .ui-header,.portal-client .ui-footer,.portal-client .ui-skip,.order-hero-actions,.client-back,.order-help{display:none!important}
  .portal-client .client-hero{background:none;border:0}
  .order-detail-grid{grid-template-columns:1fr 240px}
  .client-card{break-inside:avoid}
}

/* Back-in-stock reminder: replaces the quantity box on out-of-stock formats. */
.restock-reminder{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 14px 7px 11px;border:1px solid var(--line-strong);border-radius:999px;background:#fff;color:var(--ink-2);font:500 13.5px/1.2 var(--ui-font);white-space:nowrap;cursor:pointer;transition:background .15s var(--ease),border-color .15s var(--ease),color .15s var(--ease)}
.restock-reminder svg{width:16px;height:16px;flex:none}
.restock-reminder:hover{border-color:var(--ink-2);color:var(--ink)}
.restock-reminder:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.restock-reminder .restock-reminder-on{display:none}
.restock-reminder[aria-pressed="true"]{border-color:transparent;background:var(--green-50);color:var(--green)}
.restock-reminder[aria-pressed="true"] .restock-reminder-on{display:inline}
.restock-reminder[aria-pressed="true"] .restock-reminder-off{display:none}
.restock-reminder[aria-pressed="true"] svg path:first-child{fill:currentColor}
.restock-reminder.is-busy{opacity:.6;cursor:progress}
@media (max-width:640px){.restock-reminder{width:40px;height:40px;min-height:0;padding:0;justify-content:center}.restock-reminder .restock-reminder-off,.restock-reminder[aria-pressed="true"] .restock-reminder-on{display:none}.restock-reminder svg{width:18px;height:18px}}
.cart-toast.is-success::before{content:'✓';background:var(--green)}

/* ---------- Product page: wholesaler codes under the order table ---------- */
.site-modern .product-wholesaler{border-top:1px solid var(--line)}
.site-modern .product-wholesaler-summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:16px 22px;cursor:pointer;list-style:none;color:var(--ink);font-size:15px}
.site-modern .product-wholesaler-summary::-webkit-details-marker{display:none}
.site-modern .product-wholesaler-summary::before{content:"";flex:none;align-self:center;width:7px;height:7px;margin-right:2px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(-45deg);transition:transform .2s var(--ease)}
.site-modern details[open]>.product-wholesaler-summary::before{transform:rotate(45deg)}
.site-modern .product-wholesaler-summary:hover .product-wholesaler-title{color:var(--red-700)}
.site-modern .product-wholesaler-summary:focus-visible{outline:2px solid var(--red);outline-offset:-2px}
.site-modern .product-wholesaler-title{font-weight:600}
.site-modern .product-wholesaler-names{color:var(--muted);font-size:13.5px}
.site-modern .product-wholesaler-note{margin:0;padding:0 22px 10px;color:var(--ink-2);font-size:14.5px}
.site-modern div.product-wholesaler .product-wholesaler-note{padding-top:18px}
.site-modern .wholesaler-codes thead th a{color:inherit;text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:3px}
.site-modern .wholesaler-codes thead th a:hover{color:var(--red-700)}
.site-modern .wholesaler-codes td{font-variant-numeric:tabular-nums;white-space:nowrap}
.site-modern .wholesaler-codes tbody tr:last-child>*{border-bottom:0}
.wholesaler-codes-format{display:block;color:var(--muted);font-size:13px;font-weight:400}
