/* Frontend styles for the merck_search shortcode */

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-latin-400.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-latin-700.woff2') format('woff2');
}


:root {
    --primary: var(--ast-color-primary, #003366);
    --secondary: var(--ast-color-secondary, #00509e);
    --accent: #0066cc;
    --teal: #0e7c74;
    --bg-light: #f8f9fa;
    --bg-lighter: #ffffff;
    --border-light: #e0e6ed;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #6b7280;
    --success: #28a745;
    --danger: #cc0000;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Search page palette - ASIS Scientific's own blue and green, so the Merck page
       sits inside the site rather than fighting it. Milli-Q keeps its own water blue. */
    --mk-brand: #234196;
    --mk-brand-deep: #19306f;
    --mk-brand-hover: #2c4fae;
    --mk-accent: #97c03a;
    --mk-accent-deep: #5f8a17;
    --mk-action: #234196;
    --mk-action-hover: #19306f;
    --mk-blue: #0f69af;
    --mk-blue-deep: #0b4f86;
    --mk-water: #eaf4fb;
    --mk-wash: #f3f6fb;
    --mk-ink: #1b2235;
    --mk-text: #55607a;
    --mk-line: #e1e6ef;
}

* {
    box-sizing: border-box;
}

.merck-dependency-error {
    color: var(--danger);
    font-weight: 600;
}

/* ========== SHORTCODE WRAPPER & SECTIONS ========== */

/* ========== SEARCH PAGE (2.11) ==========
   Top to bottom: how ordering works, search, brand ribbon, Milli-Q, Lab essentials.
   ASIS colours (see :root). Everything is scoped to the wrapper so the theme's
   buttons/headings don't leak in. */

.merck-shortcode-wrapper {
    --primary: var(--mk-brand);
    --secondary: var(--mk-brand-deep);
    --accent: var(--mk-brand);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 56px;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--mk-ink);
}

.merck-shortcode-wrapper button {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
}

html.merck-modal-open {
    overflow: hidden;
}

/* The theme's own page title ("Merck Life Science") is switched off on this page in
   shortcodes.php; this catches themes that ignore that filter. */
.merck-search-page-body .entry-header,
.merck-search-page-body .page-header .entry-title {
    display: none;
}

/* How ordering works - a compact strip above the search */

.mk-steps {
    margin: 0 0 18px;
}

.merck-shortcode-wrapper .mk-steps-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mk-text);
    margin: 0 0 10px;
}

/* 1px gaps over a line-coloured background draw the dividers in any column count */
.merck-shortcode-wrapper .mk-steps-list {
    counter-reset: mk-step;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--mk-line);
    border: 1px solid var(--mk-line);
    border-radius: 16px;
    overflow: hidden;
}

.merck-shortcode-wrapper .mk-steps-list li {
    counter-increment: mk-step;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
    background: #fff;
    padding: 14px 18px 16px;
    margin: 0;
}

.merck-shortcode-wrapper .mk-steps-list li::before {
    content: counter(mk-step);
    grid-row: span 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mk-wash);
    color: var(--mk-brand);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merck-shortcode-wrapper .mk-steps-list h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--mk-ink);
    margin: 5px 0 3px;
}

.merck-shortcode-wrapper .mk-steps-list p {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--mk-text);
    margin: 0;
}

/* Search */

.merck-shortcode-wrapper .mk-hero {
    position: relative;
    /* Above the sections after it (the brand ribbon's mask/animation and the result
       cards make their own layers), so the autocomplete dropdown isn't covered.
       Still far below the details modal (99999). */
    z-index: 20;
    background: var(--mk-wash);
    border: 1px solid var(--mk-line);
    border-radius: 20px;
    padding: 40px 40px 32px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--mk-ink);
}

/* ASIS blue-to-green rule along the top edge */
.merck-shortcode-wrapper .mk-hero::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 40px;
    right: 40px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--mk-brand), var(--mk-accent));
}

.mk-hero-inner {
    max-width: 780px;
    margin: 0 auto;
}

.merck-shortcode-wrapper .mk-hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mk-brand);
    margin: 0 0 10px;
}

.merck-shortcode-wrapper .mk-hero-title {
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--mk-ink);
    margin: 0 0 10px;
}

.merck-shortcode-wrapper .mk-hero-sub {
    font-size: 16px;
    line-height: 1.55;
    color: var(--mk-text);
    max-width: 62ch;
    margin: 0 auto 24px;
}

.merck-shortcode-wrapper .mk-hero .search-wrapper {
    margin-bottom: 16px;
    text-align: left;
}

.merck-shortcode-wrapper .merck-autocomplete-dropdown {
    color: var(--mk-ink);
    text-align: left;
}

.mk-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mk-popular-label {
    font-size: 14px;
    color: var(--mk-text);
    margin-right: 2px;
}

.merck-shortcode-wrapper .mk-popular-chip {
    background: #fff;
    color: var(--mk-brand);
    border: 1px solid var(--mk-line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    min-height: 34px;
    transition: border-color 150ms ease, color 150ms ease;
}

.merck-shortcode-wrapper .mk-popular-chip:hover,
.merck-shortcode-wrapper .mk-popular-chip:focus-visible {
    background: #fff;
    border-color: var(--mk-brand);
    color: var(--mk-brand-deep);
}

/* Results area - collapses to nothing until there's a search */

.merck-shortcode-wrapper .merck-search-panel {
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.mk-has-results .merck-search-panel {
    margin-bottom: 48px;
}

.mk-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mk-has-results .mk-results-bar {
    margin-bottom: 16px;
}

.mk-results-bar .merck-status {
    margin: 0;
    min-height: 0;
}

.merck-shortcode-wrapper .mk-results-clear {
    background: none;
    border: 0;
    padding: 6px 2px;
    color: var(--mk-brand);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.merck-shortcode-wrapper .mk-results-clear[hidden] {
    display: none;
}

.merck-shortcode-wrapper .mk-results-clear:hover {
    background: none;
    color: var(--mk-brand-deep);
}

.mk-has-results .mk-discovery {
    display: none;
}

/* Brand ribbon */

.mk-brands {
    overflow: hidden;
    padding: 16px 0;
    margin: 0 0 36px;
    border-top: 1px solid var(--mk-line);
    border-bottom: 1px solid var(--mk-line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.mk-brands-track {
    display: flex;
    width: max-content;
    animation: mk-marquee 45s linear infinite;
}

.mk-brands:hover .mk-brands-track {
    animation-play-state: paused;
}

.merck-shortcode-wrapper .mk-brands-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.merck-shortcode-wrapper .mk-brand {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-right: 32px;
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--mk-brand);
    white-space: nowrap;
}

.merck-shortcode-wrapper .mk-brand::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mk-accent);
}

.merck-shortcode-wrapper .mk-brand--milliq {
    color: var(--mk-blue);
}

@keyframes mk-marquee {
    to { transform: translateX(-50%); }
}

/* Section headings (Milli-Q, Lab essentials) */

.mk-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.merck-shortcode-wrapper .mk-section-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--mk-ink);
    margin: 0;
}

.merck-shortcode-wrapper .mk-section-sub {
    font-size: 15px;
    line-height: 1.55;
    color: var(--mk-text);
    max-width: 64ch;
    margin: 6px 0 0;
}

/* Milli-Q */

.mk-milliq {
    background: var(--mk-water);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 44px;
}

.merck-shortcode-wrapper .mk-milliq-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mk-blue);
    margin: 0 0 6px;
}

.mk-milliq-eyebrow svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.merck-shortcode-wrapper .mk-milliq-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mk-blue);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    min-height: 44px;
    transition: background-color 150ms ease;
}

.merck-shortcode-wrapper .mk-milliq-cta:hover,
.merck-shortcode-wrapper .mk-milliq-cta:focus-visible {
    background: var(--mk-blue-deep);
    color: #fff;
}

.merck-shortcode-wrapper .mk-milliq-cta:focus-visible {
    outline: 3px solid var(--mk-blue);
    outline-offset: 2px;
}

.mk-milliq-cta svg,
.mk-tile-sizes svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Shown when the monthly product lookup hasn't run yet */
.mk-milliq-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.merck-shortcode-wrapper .mk-milliq-quick-item {
    background: #fff;
    color: var(--mk-blue-deep);
    border: 1px solid rgba(15, 105, 175, 0.2);
    border-radius: 12px;
    padding: 18px 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    min-height: 64px;
}

.merck-shortcode-wrapper .mk-milliq-quick-item:hover {
    background: #fff;
    border-color: var(--mk-blue);
    color: var(--mk-blue-deep);
}

/* Product tiles (Milli-Q and Lab essentials) */

.mk-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.mk-essentials {
    margin-bottom: 16px;
}

.merck-shortcode-wrapper .mk-tile {
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--mk-ink);
    border: 1px solid var(--mk-line);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.merck-shortcode-wrapper .mk-tile:hover {
    border-color: var(--mk-brand);
    box-shadow: 0 8px 20px rgba(35, 65, 150, 0.12);
}

.merck-shortcode-wrapper .mk-milliq .mk-tile {
    border-color: rgba(15, 105, 175, 0.16);
}

.merck-shortcode-wrapper .mk-milliq .mk-tile:hover {
    border-color: var(--mk-blue);
    box-shadow: 0 8px 20px rgba(15, 105, 175, 0.14);
}

/* The picture and text open the product window; the buy row sits under it */
.merck-shortcode-wrapper .mk-tile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    width: 100%;
    text-align: left;
    background: none;
    color: inherit;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}

.merck-shortcode-wrapper .mk-tile-open:hover,
.merck-shortcode-wrapper .mk-tile-open:focus {
    background: none;
    color: inherit;
}

.merck-shortcode-wrapper .mk-tile-open:focus-visible {
    outline: 3px solid var(--mk-brand);
    outline-offset: -3px;
}

.mk-tile-media {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #fff;
    border-bottom: 1px solid var(--mk-line);
}

.merck-shortcode-wrapper .mk-tile-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mk-tile-media-empty,
.mk-tile-media.is-empty::before {
    content: '';
    display: block;
    width: 42%;
    aspect-ratio: 1511 / 726;
    background: url('../images/MRK.DE.svg') center / contain no-repeat;
    opacity: 0.12;
    filter: grayscale(1);
}

.mk-tile-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding: 12px 14px 0;
}

.mk-tile-brand {
    font-size: 12px;
    font-weight: 600;
    color: var(--mk-text);
}

/* Two lines, always - keeps the SKU and price rows level across a row of tiles */
.mk-tile-name {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    min-height: 2.7em;
    color: var(--mk-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-tile-meta {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12.5px;
    color: var(--mk-text);
}

.mk-tile-size {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mk-tile-sku {
    font-weight: 700;
    color: var(--mk-brand);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.mk-tile-buy {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px 14px;
}

.mk-tile-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-height: 26px;
}

.mk-tile-price {
    font-size: 19px;
    font-weight: 700;
    color: var(--mk-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mk-tile-price small {
    font-size: 12px;
    font-weight: 500;
    color: var(--mk-text);
    margin-left: 3px;
}

.mk-tile-price s {
    font-size: 13px;
    font-weight: 500;
    color: var(--mk-text);
    margin-right: 6px;
}

.merck-shortcode-wrapper .mk-tile-sizes {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: 0;
    padding: 2px 0;
    margin: 0;
    color: var(--mk-brand);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
}

.merck-shortcode-wrapper .mk-tile-sizes:hover,
.merck-shortcode-wrapper .mk-tile-sizes:focus-visible {
    background: none;
    color: var(--mk-brand-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mk-tile-sizes svg {
    width: 14px;
    height: 14px;
}

.merck-shortcode-wrapper .mk-tile-add,
.merck-shortcode-wrapper .mk-tile-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.merck-shortcode-wrapper .mk-tile-add {
    background: var(--mk-action);
    color: #fff;
    border: 0;
}

.merck-shortcode-wrapper .mk-tile-add:hover,
.merck-shortcode-wrapper .mk-tile-add:focus-visible {
    background: var(--mk-action-hover);
    color: #fff;
}

.merck-shortcode-wrapper .mk-tile-add:disabled {
    background: var(--mk-action);
    opacity: 0.8;
    cursor: progress;
}

.merck-shortcode-wrapper .mk-tile-view {
    background: #fff;
    color: var(--mk-brand);
    border: 1.5px solid var(--mk-brand);
}

.merck-shortcode-wrapper .mk-tile-view:hover,
.merck-shortcode-wrapper .mk-tile-view:focus-visible {
    background: var(--mk-brand);
    color: #fff;
}

.merck-shortcode-wrapper .mk-tile-add:focus-visible,
.merck-shortcode-wrapper .mk-tile-view:focus-visible {
    outline: 3px solid var(--mk-brand);
    outline-offset: 2px;
}

.merck-shortcode-wrapper .mk-milliq .mk-tile-add {
    background: var(--mk-blue);
}

.merck-shortcode-wrapper .mk-milliq .mk-tile-add:hover,
.merck-shortcode-wrapper .mk-milliq .mk-tile-add:focus-visible {
    background: var(--mk-blue-deep);
}

.merck-shortcode-wrapper .mk-tile-name sup,
.merck-shortcode-wrapper .mk-tile-name sub,
.merck-shortcode-wrapper .merck-product-name sup,
.merck-shortcode-wrapper .merck-product-name sub,
.merck-details-header h2 sup,
.merck-details-header h2 sub {
    font-size: 0.65em;
    line-height: 0;
}

/* Backdrop: the Merck M in fine lines at a few sizes, plus dot patches (shortcodes.php) */

.merck-shortcode-wrapper {
    position: relative;
    isolation: isolate;
}

/* Holds the product window at the end of <body> (search.js); not a layout box itself */
.merck-shortcode-wrapper.merck-modal-portal {
    position: static;
    isolation: auto;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* The layer is full window width; stop that adding a sideways scroll on this page */
body.merck-search-page-body {
    overflow-x: clip;
}

.mk-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(245, 248, 252, 0) 0, #f5f8fc 120px, #f5f8fc calc(100% - 60px), rgba(245, 248, 252, 0) 100%);
}

/* Sized to the side margins (window width minus the 1200px content) and placed from
   the centre, so the Ms sit beside the content at any width */
.mk-bg {
    --mk-bg-m-w: clamp(150px, calc((100vw - 1200px) / 2 - 48px), 340px);
}

.mk-bg-m {
    position: absolute;
    display: block;
    width: var(--mk-bg-m-w);
    height: auto;
    max-width: none;
    overflow: visible;
    fill: none;
    stroke: var(--mk-brand);
    stroke-width: 1.6;
    stroke-opacity: 0.34;
    animation: mk-bg-float 14s ease-in-out infinite;
}

.mk-bg-m path {
    vector-effect: non-scaling-stroke;
}

.mk-bg-m--top {
    top: 60px;
    left: calc(50% + 624px);
    --mk-bg-rotate: -8deg;
}

.mk-bg-m--left {
    top: 32%;
    left: calc(50% - 624px - var(--mk-bg-m-w));
    --mk-bg-rotate: 6deg;
    stroke: var(--mk-accent);
    stroke-opacity: 0.7;
    animation-delay: -5s;
}

.mk-bg-m--low {
    top: 68%;
    left: calc(50% + 624px);
    --mk-bg-rotate: -4deg;
    animation-delay: -9s;
}

/* Glowing lines: a faint base line, and a bright slug (with a blurred copy for the glow)
   running along it every so often. Placed from the centre like the Ms. */
.mk-bg-line {
    position: absolute;
    display: block;
    width: 900px;
    height: auto;
    max-width: none;
    overflow: visible;
    --mk-bg-line: var(--mk-brand);
}

.mk-bg-line--green {
    --mk-bg-line: var(--mk-accent);
}

.mk-bg-line--a { top: 6%;  left: calc(50% - 1000px); }
.mk-bg-line--b { top: 40%; left: calc(50% + 180px); }
.mk-bg-line--c { top: 76%; left: calc(50% - 920px); }

.mk-bg-line path {
    fill: none;
    stroke: var(--mk-bg-line);
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.mk-bg-line-base {
    stroke-width: 1.5;
    stroke-opacity: 0.18;
}

.mk-bg-line--green .mk-bg-line-base {
    stroke-opacity: 0.4;
}

.mk-bg-line-pulse,
.mk-bg-line-glow {
    stroke-dasharray: 110 1700;
    stroke-dashoffset: 0;
    animation: mk-bg-pulse 12s linear infinite;
}

.mk-bg-line-pulse {
    stroke-width: 2.4;
    stroke-opacity: 0.85;
}

.mk-bg-line-glow {
    stroke-width: 9;
    stroke-opacity: 0.35;
    filter: blur(5px);
}

.mk-bg-line--b path { animation-delay: -4s; }
.mk-bg-line--c path { animation-delay: -8s; }

@keyframes mk-bg-pulse {
    to { stroke-dashoffset: -1810; }
}

@keyframes mk-bg-float {
    0%, 100% { transform: translateY(0) rotate(var(--mk-bg-rotate, 0deg)); }
    50%      { transform: translateY(-14px) rotate(var(--mk-bg-rotate, 0deg)); }
}

.mk-bg-dots {
    position: absolute;
    width: 340px;
    height: 340px;
    background-image: radial-gradient(circle, rgba(35, 65, 150, 0.2) 1.3px, transparent 1.7px);
    background-size: 13px 13px;
    -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent);
    mask-image: radial-gradient(closest-side, #000 25%, transparent);
}

.mk-bg-dots--a { top: 40px; left: 2%; }
.mk-bg-dots--b { top: 44%; right: 3%; }
.mk-bg-dots--c { top: 80%; left: 6%; }

/* Let the pattern show faintly through the search box and the Milli-Q band */
.merck-shortcode-wrapper .mk-hero {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.mk-milliq {
    background: rgba(234, 244, 251, 0.8);
}

@media (max-width: 768px) {
    .mk-bg-m--top {
        width: 180px;
        left: auto;
        right: -60px;
        top: 0;
    }

    .mk-bg-m--left {
        width: 150px;
        left: -70px;
    }

    .mk-bg-m--low,
    .mk-bg-line--b,
    .mk-bg-line--c,
    .mk-bg-dots--b,
    .mk-bg-dots--c {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mk-bg-line-pulse,
    .mk-bg-line-glow {
        display: none;
    }

    .mk-bg-m {
        animation: none;
        transform: rotate(var(--mk-bg-rotate, 0deg));
    }
}

/* Search page - smaller screens */

@media (max-width: 1000px) {
    .mk-grid,
    .mk-milliq-quick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .merck-shortcode-wrapper .mk-steps-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .merck-shortcode-wrapper {
        padding: 16px 16px 40px;
    }

    .merck-shortcode-wrapper .mk-hero {
        padding: 30px 18px 24px;
        border-radius: 16px;
    }

    .merck-shortcode-wrapper .mk-hero::before {
        left: 18px;
        right: 18px;
    }

    .merck-shortcode-wrapper .mk-hero-sub {
        font-size: 15px;
    }

    .mk-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .mk-milliq {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .merck-shortcode-wrapper .mk-brand {
        font-size: 17px;
        gap: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 560px) {
    .mk-grid,
    .mk-milliq-quick {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .merck-shortcode-wrapper .mk-section-title {
        font-size: 22px;
    }

    /* Steps: number and title only on phones */
    .merck-shortcode-wrapper .mk-steps-list li {
        padding: 10px 12px;
        align-items: center;
        grid-template-columns: 26px minmax(0, 1fr);
        column-gap: 8px;
    }

    .merck-shortcode-wrapper .mk-steps-list li::before {
        width: 26px;
        height: 26px;
        font-size: 13px;
        grid-row: auto;
    }

    .merck-shortcode-wrapper .mk-steps-list h3 {
        font-size: 13.5px;
        margin: 0;
    }

    .merck-shortcode-wrapper .mk-steps-list p {
        display: none;
    }

    .mk-tile-body {
        padding: 10px 10px 0;
    }

    .mk-tile-buy {
        padding: 8px 10px 10px;
    }

    .mk-tile-name {
        font-size: 13.5px;
    }

    .mk-tile-price {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mk-brands-track {
        animation: none !important;
        width: auto;
        flex-wrap: wrap;
    }

    .mk-brands-list[aria-hidden="true"] {
        display: none !important;
    }

    .merck-shortcode-wrapper .mk-brands-list {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 10px;
    }

    .mk-brands {
        -webkit-mask-image: none;
        mask-image: none;
    }
}


/* ========== SEARCH CONTAINER ========== */

.merck-search-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.merck-search-container h2 {
    color: var(--primary);
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ========== SEARCH BOX ========== */

.search-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.mk-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
}

.merck-shortcode-wrapper .merck-search-input {
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 14px 44px 14px 48px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 17px;
    font-family: inherit;
    line-height: 1.3;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23234196' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C%2Fcircle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C%2Fline%3E%3C%2Fsvg%3E") no-repeat 16px center;
    color: var(--mk-ink);
    min-height: 56px;
    box-shadow: 0 2px 10px rgba(27, 34, 53, 0.12);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.merck-shortcode-wrapper .merck-search-input::placeholder {
    color: #6f7891;
}

.merck-shortcode-wrapper .merck-search-input:focus {
    outline: none;
    border-color: var(--mk-brand);
    box-shadow: 0 0 0 4px rgba(35, 65, 150, 0.18);
}

.merck-shortcode-wrapper .mk-input-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6f7891;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merck-shortcode-wrapper .mk-input-clear[hidden] {
    display: none;
}

.merck-shortcode-wrapper .mk-input-clear:hover {
    background: var(--mk-wash);
    color: var(--mk-ink);
}

.merck-shortcode-wrapper .merck-search-btn {
    padding: 0 30px;
    margin: 0;
    background: var(--mk-action);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    min-height: 56px;
    touch-action: manipulation;
    transition: background-color 150ms ease;
}

.merck-shortcode-wrapper .merck-search-btn:hover,
.merck-shortcode-wrapper .merck-search-btn:focus-visible {
    background: var(--mk-action-hover);
    color: #fff;
}

.merck-shortcode-wrapper .merck-search-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.merck-shortcode-wrapper .merck-search-btn:disabled {
    background: var(--mk-action);
    opacity: 0.7;
    cursor: progress;
}

@media (max-width: 560px) {
    .search-box {
        flex-direction: column;
    }

    .merck-shortcode-wrapper .merck-search-btn {
        width: 100%;
        min-height: 50px;
    }
}


/* ========== AUTOCOMPLETE ========== */

.merck-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #d0dae8;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 380px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ac-group-label {
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #f8fafc 0%, #f0f4f8 100%);
    border-bottom: 2px solid #e2e8f0;
    margin-top: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ac-item {
    padding: 14px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f0f0;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.ac-item:hover {
    background: linear-gradient(90deg, #f0f4f8 0%, #e8ecf1 100%);
    border-left-color: var(--mk-brand);
    padding-left: 20px;
}

.ac-item.active {
    background: #e8f0ff;
    border-left-color: var(--mk-brand);
    color: var(--mk-brand);
    font-weight: 500;
}

.merck-ac-error {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

/* ========== EXACT-SKU PREVIEW CARD (autocomplete) ========== */

.merck-autocomplete-dropdown.sku-preview-open {
    max-height: 640px;
}

.merck-sku-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    font-size: 13px;
    color: #64748b;
}

.merck-sku-preview {
    position: relative;
    padding: 16px;
}

.merck-sku-preview-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: background 150ms ease, color 150ms ease;
}

.merck-sku-preview-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.merck-sku-preview-top {
    display: flex;
    gap: 14px;
    padding-right: 22px;
}

.merck-sku-preview-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid #e6ebf1;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merck-sku-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}

.merck-sku-preview-image-empty {
    background: #f8fafc;
}

.merck-sku-preview-brand {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.merck-sku-preview-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--mk-brand);
}

.merck-sku-preview-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1px;
}

.merck-sku-preview-desc {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

.merck-sku-preview-formulas {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #334155;
}

.merck-sku-preview-formulas strong {
    color: #64748b;
    font-weight: 600;
}

.merck-sku-preview-divider {
    margin: 14px 0 12px;
    border-top: 1px solid #eef2f7;
}

.merck-sku-preview-sku-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.merck-sku-preview-sku-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.merck-sku-preview-sku-pill {
    padding: 4px 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.merck-sku-preview-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* ========== STATUS & ERROR MESSAGES ========== */

.merck-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 20px;
}

.merck-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    animation: merckStatusPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.merck-status-pill--loading {
    background: var(--mk-wash);
    color: var(--mk-brand);
}

.merck-status-pill--success {
    background: none;
    padding-left: 0;
    color: var(--mk-ink);
    font-size: 15px;
}

.merck-status-pill--empty {
    background: none;
    padding-left: 0;
    color: var(--mk-ink);
    font-size: 15px;
}

@keyframes merckStatusPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.merck-error {
    color: var(--danger);
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.merck-error::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cc0000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C%2Fpath%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C%2Fline%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C%2Fline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== SKELETON LOADERS ========== */

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: var(--bg-lighter);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.skeleton-card .skeleton-line {
    height: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.skeleton-card .skeleton-title {
    height: 16px;
    margin-bottom: 16px;
    border-radius: 6px;
}

.skeleton-card .skeleton-button {
    height: 40px;
    margin-top: 16px;
    border-radius: 6px;
}

.merck-skeleton-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.skeleton-badge {
    width: 110px;
    height: 34px;
    border-radius: 8px;
}

.skeleton-pill {
    width: 80px;
    height: 28px;
    border-radius: 16px;
}

/* ========== PRODUCT RESULTS GRID ========== */

.merck-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    animation: fadeIn 0.3s ease;
}

/* ========== PRODUCT CARDS (search results) ========== */

.merck-shortcode-wrapper .merck-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 18px 18px 0;
    background: #fff;
    border: 1px solid var(--mk-line);
    border-radius: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.merck-shortcode-wrapper .merck-product-card:hover {
    border-color: var(--mk-brand);
    box-shadow: 0 8px 20px rgba(35, 65, 150, 0.1);
}

.merck-shortcode-wrapper .merck-product-card.is-unavailable:hover {
    border-color: var(--mk-line);
    box-shadow: none;
}

.merck-shortcode-wrapper .merck-product-card.skeleton-card {
    padding-bottom: 18px;
}

.merck-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.merck-shortcode-wrapper .merck-product-card .merck-sku-value {
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--mk-brand);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.merck-brand-badge {
    display: inline-flex;
    align-items: center;
    background: var(--mk-wash);
    color: var(--mk-brand-deep);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.merck-shortcode-wrapper .merck-product-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--mk-ink);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merck-shortcode-wrapper .merck-product-name:has(+ .merck-product-suffix) {
    margin-bottom: 4px;
}

.merck-product-unavailable-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #92400e;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 4px 0 12px;
}

/* Aldrich Partner products - Sigma-sold, partner-supplied (Ambeed, ChemScene, ...) */
.merck-brand-badge.merck-partner-badge {
    background: #e8f1fb;
    color: #0b4f86;
}

.merck-partner-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #1e3a8a;
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 4px 0 12px;
}

.merck-partner-note svg {
    flex-shrink: 0;
}

/* The details button is the card's one control; its ::after stretches over the
   whole card so a click anywhere on it opens the product. */
.merck-shortcode-wrapper .merck-details-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin: auto 0 0;
    padding: 12px 0 14px;
    min-height: 46px;
    background: transparent;
    color: var(--mk-brand);
    border: 0;
    border-top: 1px solid var(--mk-line);
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    position: static;
}

.merck-shortcode-wrapper .merck-details-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
}

.merck-shortcode-wrapper .merck-details-btn:hover,
.merck-shortcode-wrapper .merck-details-btn:focus {
    background: transparent;
    color: var(--mk-brand-deep);
}

.merck-shortcode-wrapper .merck-details-btn:focus-visible {
    outline: none;
}

.merck-shortcode-wrapper .merck-details-btn:focus-visible::after {
    outline: 3px solid var(--mk-brand);
    outline-offset: 2px;
}

.merck-details-btn-arrow {
    flex-shrink: 0;
    transition: transform 150ms ease;
}

.merck-product-card:hover .merck-details-btn-arrow {
    transform: translateX(3px);
}

.merck-shortcode-wrapper .merck-details-btn:disabled {
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.merck-shortcode-wrapper .merck-details-btn:disabled::after {
    display: none;
}


/* ========== LOADING STATE ========== */

.merck-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    padding: 40px;
    text-align: center;
}

.merck-loading-inline {
    flex-direction: row;
    min-height: 0;
    padding: 16px;
}

.mk-flask {
    display: block;
    width: 84px;
    height: 88px;
    margin: 0 auto;
    overflow: visible;
    --mk-flask-glass: #1b2235;
    --mk-flask-liquid: #3f6fd1;
}

.mk-flask-glass {
    fill: none;
    stroke: var(--mk-flask-glass);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mk-flask-liquid,
.mk-flask-stream,
.mk-flask-beaker-liquid {
    fill: var(--mk-flask-liquid);
}

.mk-flask-bubble {
    fill: #fff;
    opacity: 0;
    transform-box: fill-box;
    animation: mk-flask-bubble 2.8s ease-in infinite;
}

.mk-flask-bubble--2 {
    animation-delay: 0.5s;
}

.mk-flask-level {
    animation: mk-flask-level 2.8s ease-in-out infinite;
}

.mk-flask-liquid {
    animation: mk-flask-wave 0.9s linear infinite;
}

.mk-flask-beaker {
    transform-origin: 41px 12px;
    animation: mk-flask-tilt 2.8s ease-in-out infinite;
}

.mk-flask-beaker-liquid {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: mk-flask-empty 2.8s ease-in-out infinite;
}

.mk-flask-stream {
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: mk-flask-stream 2.8s linear infinite;
}

@keyframes mk-flask-tilt {
    0%, 8%   { transform: rotate(-8deg); }
    22%, 62% { transform: rotate(-72deg); }
    78%, 100% { transform: rotate(-8deg); }
}

@keyframes mk-flask-stream {
    0%, 18%  { transform: scaleY(0); opacity: 1; }
    28%      { transform: scaleY(1); opacity: 1; }
    60%      { transform: translateY(0) scaleY(1); opacity: 1; }
    70%      { transform: translateY(58px) scaleY(0); opacity: 1; }
    71%, 100% { transform: scaleY(0); opacity: 0; }
}

@keyframes mk-flask-empty {
    0%, 22%  { transform: scaleY(1); opacity: 1; }
    62%      { transform: scaleY(0.12); opacity: 1; }
    80%      { transform: scaleY(0.12); opacity: 0; }
    81%      { transform: scaleY(1); opacity: 0; }
    100%     { transform: scaleY(1); opacity: 1; }
}

@keyframes mk-flask-level {
    0%, 24%  { transform: translateY(77px); opacity: 1; }
    66%      { transform: translateY(54px); opacity: 1; }
    86%      { transform: translateY(54px); opacity: 1; }
    97%      { transform: translateY(54px); opacity: 0; }
    98%, 100% { transform: translateY(77px); opacity: 0; }
}

@keyframes mk-flask-wave {
    from { transform: translateX(-20px); }
    to   { transform: translateX(0); }
}

@keyframes mk-flask-bubble {
    0%, 40%  { transform: translateY(0); opacity: 0; }
    50%      { opacity: 0.85; }
    80%      { transform: translateY(-14px); opacity: 0; }
    100%     { transform: translateY(-14px); opacity: 0; }
}

/* Small: just the flask, filling up and settling - for buttons and the search status */
.mk-flask--mini {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    margin: 0;
    vertical-align: -0.2em;
    flex-shrink: 0;
    --mk-flask-glass: currentColor;
    --mk-flask-liquid: currentColor;
}

.mk-flask--mini .mk-flask-glass {
    stroke-width: 4;
}

.mk-flask--mini .mk-flask-liquid {
    opacity: 0.55;
}

.mk-flask--mini .mk-flask-level {
    animation: mk-flask-mini-level 1.6s ease-in-out infinite;
}

@keyframes mk-flask-mini-level {
    0%   { transform: translateY(74px); }
    55%  { transform: translateY(55px); }
    80%  { transform: translateY(55px); opacity: 1; }
    100% { transform: translateY(55px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .mk-flask *,
    .mk-flask--mini .mk-flask-level {
        animation: none !important;
    }

    .mk-flask-level {
        transform: translateY(60px);
    }

    .mk-flask-stream,
    .mk-flask-bubble {
        display: none;
    }
}


/* ========== LOADING: PRODUCT WINDOW LOADERS ==========
   search.js picks one of these (or the pouring flask above) at random each time a
   product opens. Same drawing style as the flask. */

.mk-ld {
    display: block;
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    overflow: visible;
    --mk-ld-ink: #1b2235;
    --mk-ld-liquid: #3f6fd1;
    --mk-ld-liquid-2: #5bb0e0;
    --mk-ld-surface: #fff;
}

.mk-ld svg {
    overflow: visible;
}

.mk-ld-g {
    fill: none;
    stroke: var(--mk-ld-ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mk-ld-thin {
    fill: none;
    stroke: var(--mk-ld-ink);
    stroke-width: 1.4;
    stroke-linecap: round;
    opacity: 0.35;
}

.mk-ld-ink { fill: var(--mk-ld-ink); }
.mk-ld-liq { fill: var(--mk-ld-liquid); }
.mk-ld-liq2 { fill: var(--mk-ld-liquid-2); }
.mk-ld-acc { fill: var(--mk-accent); }

/* Pipette */
.mk-ld-pp-bulb { transform-box: fill-box; transform-origin: 50% 50%; animation: mk-ld-pp-squeeze 1.2s ease-in-out infinite; }
.mk-ld-pp-drop { fill: var(--mk-ld-liquid); animation: mk-ld-pp-drop 1.2s cubic-bezier(.5, 0, 1, .6) infinite; }
.mk-ld-pp-level { animation: mk-ld-pp-level 4.8s steps(1, end) infinite; }
.mk-ld-pp-ripple { fill: none; stroke: var(--mk-ld-surface); stroke-width: 1.2; transform-box: fill-box; transform-origin: 50% 50%; animation: mk-ld-pp-ripple 1.2s ease-out infinite; }
@keyframes mk-ld-pp-squeeze { 0%, 30% { transform: scaleX(1); } 40% { transform: scaleX(0.78); } 55%, 100% { transform: scaleX(1); } }
@keyframes mk-ld-pp-drop { 0%, 35% { transform: translateY(0) scale(0.4); opacity: 0; } 45% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(46px) scale(1); opacity: 1; } }
@keyframes mk-ld-pp-level { 0% { transform: translateY(0); } 25% { transform: translateY(-5px); } 50% { transform: translateY(-10px); } 75% { transform: translateY(-15px); } }
@keyframes mk-ld-pp-ripple { 0%, 80% { transform: scale(0.2); opacity: 0; } 85% { opacity: 0.9; } 100% { transform: scale(1.4); opacity: 0; } }

/* Centrifuge */
.mk-ld-cf-rotor { transform-origin: 50px 50px; animation: mk-ld-cf-spin 2.6s cubic-bezier(.45, 0, .55, 1) infinite; }
.mk-ld-cf-trail { fill: none; stroke: var(--mk-ld-liquid); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 26 200; transform-origin: 50px 50px; animation: mk-ld-cf-spin 2.6s cubic-bezier(.45, 0, .55, 1) infinite, mk-ld-cf-trail 2.6s ease-in-out infinite; }
@keyframes mk-ld-cf-spin { to { transform: rotate(1440deg); } }
@keyframes mk-ld-cf-trail { 0%, 100% { opacity: 0; } 50% { opacity: 0.5; } }

/* Tube rack */
.mk-ld-rk-bar { fill: var(--mk-ld-surface); }
.mk-ld-rk-level { animation: mk-ld-rk-bob 1.4s ease-in-out infinite alternate; }
.mk-ld-rk-level--2 { animation-duration: 1.1s; animation-delay: -0.4s; }
.mk-ld-rk-level--3 { animation-duration: 1.7s; animation-delay: -0.9s; }
.mk-ld-rk-bubble { fill: var(--mk-ld-surface); opacity: 0; animation: mk-ld-rk-bubble 1.8s ease-in infinite; }
@keyframes mk-ld-rk-bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes mk-ld-rk-bubble { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 0.9; } 90% { transform: translateY(-24px); opacity: 0; } 100% { opacity: 0; } }

/* DNA helix */
.mk-ld-dna-a, .mk-ld-dna-b, .mk-ld-dna-r { animation-duration: 1.6s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; animation-delay: var(--mk-ld-d, 0s); }
.mk-ld-dna-a { fill: var(--mk-ld-liquid); animation-name: mk-ld-dna-a; }
.mk-ld-dna-b { fill: var(--mk-accent); animation-name: mk-ld-dna-b; }
.mk-ld-dna-r { fill: var(--mk-ld-ink); opacity: 0.25; transform-box: fill-box; transform-origin: 50% 50%; animation-name: mk-ld-dna-r; animation-timing-function: linear; }
@keyframes mk-ld-dna-a { from { transform: translateX(-22px); opacity: 1; } to { transform: translateX(22px); opacity: 0.45; } }
@keyframes mk-ld-dna-b { from { transform: translateX(22px); opacity: 0.45; } to { transform: translateX(-22px); opacity: 1; } }
@keyframes mk-ld-dna-r { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.05); } 100% { transform: scaleX(1); } }

/* Benzene ring (phenol) */
.mk-ld-bz-hex { stroke-dasharray: 157; animation: mk-ld-bz-hex 3.2s ease-in-out infinite; }
.mk-ld-bz-ring { stroke: var(--mk-ld-liquid); stroke-dasharray: 95; animation: mk-ld-bz-ring 3.2s ease-in-out infinite; }
.mk-ld-bz-bond { stroke-dasharray: 17; animation: mk-ld-bz-bond 3.2s ease-in-out infinite; }
.mk-ld-bz-label { font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif; font-size: 10px; font-weight: 600; fill: var(--mk-accent-deep); animation: mk-ld-bz-label 3.2s ease-in-out infinite; }
@keyframes mk-ld-bz-hex { 0% { stroke-dashoffset: 157; opacity: 1; } 40%, 86% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes mk-ld-bz-ring { 0%, 34% { stroke-dashoffset: 95; opacity: 1; } 60%, 86% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes mk-ld-bz-bond { 0%, 56% { stroke-dashoffset: 17; opacity: 1; } 68%, 86% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes mk-ld-bz-label { 0%, 64% { opacity: 0; } 74%, 86% { opacity: 1; } 100% { opacity: 0; } }

/* Petri dish */
.mk-ld-pt-agar { fill: var(--mk-ld-liquid); opacity: 0.08; }
.mk-ld-pt-col { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; animation: mk-ld-pt-grow 3.6s ease-out infinite; animation-delay: var(--mk-ld-d, 0s); }
@keyframes mk-ld-pt-grow { 0% { transform: scale(0); opacity: 0; } 8% { opacity: 0.9; } 50% { transform: scale(1); } 82% { transform: scale(1); opacity: 0.9; } 96%, 100% { transform: scale(1); opacity: 0; } }

/* Magnetic stirrer */
.mk-ld-st-bar { fill: var(--mk-ld-ink); transform-box: fill-box; transform-origin: 50% 50%; animation: mk-ld-st-spin 0.5s linear infinite; }
.mk-ld-st-vortex { transform-box: fill-box; transform-origin: 50% 0; animation: mk-ld-st-vortex 1.2s ease-in-out infinite alternate; }
.mk-ld-st-swirl { fill: none; stroke: var(--mk-ld-surface); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 9 60; opacity: 0.7; animation: mk-ld-st-swirl 0.9s linear infinite; }
.mk-ld-st-swirl--2 { animation-duration: 1.3s; }
.mk-ld-st-led { fill: var(--mk-accent); animation: mk-ld-st-led 1.2s steps(1, end) infinite; }
@keyframes mk-ld-st-spin { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.2); } 100% { transform: scaleX(1); } }
@keyframes mk-ld-st-vortex { from { transform: scaleY(0.85) translateX(-1px); } to { transform: scaleY(1.1) translateX(1px); } }
@keyframes mk-ld-st-swirl { to { stroke-dashoffset: -69; } }
@keyframes mk-ld-st-led { 0% { opacity: 1; } 50% { opacity: 0.25; } }

/* Microscope */
.mk-ld-ms svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-ld-ms-cells { animation: mk-ld-ms-focus 3.2s ease-in-out infinite; }
.mk-ld-ms-field { fill: var(--mk-ld-liquid); fill-opacity: 0.06; }
.mk-ld-ms-ring { stroke-width: 3.2; }
.mk-ld-ms-cell { fill: var(--mk-ld-liquid); fill-opacity: 0.22; stroke: var(--mk-ld-liquid); stroke-width: 1.4; }
.mk-ld-ms-nuc { fill: var(--mk-ld-liquid); opacity: 0.75; }
.mk-ld-ms-cell.mk-ld-ms--green { fill: var(--mk-accent); stroke: var(--mk-accent-deep); }
.mk-ld-ms-nuc.mk-ld-ms--green { fill: var(--mk-accent-deep); }
@keyframes mk-ld-ms-focus { 0% { filter: blur(5px); transform: scale(1.08); } 45%, 75% { filter: blur(0); transform: scale(1); } 100% { filter: blur(5px); transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
    .mk-ld,
    .mk-ld * {
        animation: none !important;
    }

    .mk-ld-pt-col {
        opacity: 0.9;
    }
}

/* ========== MODERN MODAL ========== */

.merck-details-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 20px !important;
    animation: fadeInOverlay 0.3s ease !important;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.merck-details-modal[style*="display: grid"],
.merck-details-modal[style*="display: flex"] {
    display: flex !important;
}

.merck-modal-content {
    background: var(--bg-lighter) !important;
    width: 100% !important;
    max-width: 860px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideUpModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.merck-details-header {
    flex-shrink: 0 !important;
    background: var(--mk-brand) !important;
    color: #fff !important;
    padding: 28px 32px !important;
    border-radius: 16px 16px 0 0 !important;
    position: relative !important;
    z-index: 10 !important;
    box-shadow: 0 4px 12px rgba(35, 65, 150, 0.15) !important;
}

.merck-details-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mk-accent);
}

.merck-details-header h2 {
    margin: 0 0 8px 0 !important;
    font-size: 25px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    color: #fff !important;
    padding-right: 50px !important;
    word-wrap: break-word !important;
}

.merck-product-suffix {
    margin: 0 !important;
    font-size: 14px !important;
    opacity: 0.95 !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
}

.merck-product-card .merck-product-suffix {
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    margin-bottom: 12px !important;
    font-weight: 500 !important;
    opacity: 0.85 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.merck-modal-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    opacity: 0.85 !important;
    transition: opacity 150ms ease, background 150ms ease, transform 150ms ease !important;
    z-index: 20 !important;
}

.merck-modal-close:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    opacity: 1 !important;
}

.merck-modal-close:active {
    transform: scale(0.92) !important;
}

/* ========== MERGED SINGLE-PAGE MODAL CONTENT ========== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.merck-details-body {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    padding: 28px 30px !important;
}

.merck-details-body dl {
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 136px 1fr !important;
    gap: 8px 16px !important;
}

.merck-details-body dt {
    font-weight: 500 !important;
    color: var(--mk-text) !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.merck-details-body dd {
    margin: 0 !important;
    color: var(--mk-ink) !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
    font-variant-numeric: tabular-nums;
    word-break: break-word !important;
}

/* Two-column product info: image carousel (left) + details (right) */
.merck-product-info-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.merck-product-media {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.merck-image-carousel {
    display: flex;
    flex-direction: column;
}

.merck-image-carousel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
    padding: 16px;
    background: #f8fafc;
}

.merck-image-frame {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid #e6ebf1;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    cursor: zoom-in;
}

.merck-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 14px;
    box-sizing: border-box;
    transition: transform 250ms ease;
}

.merck-image-frame:hover img {
    transform: scale(1.04);
}

.merck-image-zoom-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 150ms ease;
    pointer-events: none;
}

.merck-image-frame:hover .merck-image-zoom-hint {
    opacity: 1;
}

.merck-image-zoom-hint svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.merck-image-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.merck-image-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
}

.merck-image-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.merck-image-arrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.merck-image-arrow-prev {
    left: 8px;
}

.merck-image-arrow-next {
    right: 8px;
}

.merck-image-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: 999px;
}

.merck-brand-logo {
    margin-bottom: 12px;
    max-width: 160px;
}

.merck-brand-logo img {
    display: block;
    max-width: 100%;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.merck-sku-box {
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--mk-wash);
    border-radius: 10px;
    display: inline-block;
}

.merck-sku-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--mk-text);
    margin-bottom: 2px;
}

.merck-sku-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 600;
    color: var(--mk-brand);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.merck-attr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.merck-attr-chip {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 11px;
    background: #fff;
    border: 1px solid var(--mk-line);
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4;
}

.merck-attr-label {
    font-weight: 500;
    color: var(--mk-text);
}

.merck-attr-label::first-letter {
    text-transform: uppercase;
}

.merck-attr-value {
    font-weight: 500;
    color: var(--mk-ink);
}

.merck-synonyms {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.6;
}

.merck-synonyms-label {
    font-weight: 500;
    color: var(--mk-text);
    font-size: 13px;
    margin-right: 6px;
}

.merck-synonyms-value {
    color: var(--text-primary);
}

.merck-general-description {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.merck-general-description.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merck-general-description ul,
.merck-general-description ol {
    margin: 6px 0;
    padding-left: 20px;
}

.merck-general-description li {
    margin-bottom: 4px;
}

.merck-general-description p {
    margin: 0 0 8px;
}

.merck-general-description a {
    color: var(--mk-brand);
}

.merck-read-more-btn {
    margin-top: 6px;
    border: none;
    background: none;
    color: var(--mk-brand);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.merck-read-more-btn:hover {
    text-decoration: underline;
}

/* Pricing / Documentation sections */
.merck-section-block {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.merck-section-block h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--mk-ink);
}

.merck-sds-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--mk-brand);
    color: #fff;
    border: 1px solid var(--mk-brand);
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    transition: all 200ms;
    min-height: 40px;
}

.merck-sds-link-disabled {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.65;
}

.merck-sds-note {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 12px;
}

.merck-pack-sizes-section {
    padding-top: 4px !important;
}


.merck-load-pricing-btn {
    display: block !important;
    width: 100% !important;
    padding: 16px 20px !important;
    background: var(--mk-brand) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 4px 14px rgba(35, 65, 150, 0.25) !important;
    touch-action: manipulation !important;
    min-height: 44px !important;
    position: relative !important;
    overflow: hidden !important;
}

.merck-load-pricing-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 500ms, height 500ms;
}

.merck-load-pricing-btn:active::before {
    width: 300px;
    height: 300px;
}

.merck-load-pricing-btn:hover {
    background: var(--mk-brand-deep) !important;
    color: #fff !important;
}

.merck-load-pricing-btn:active {
    transform: translateY(-1px) !important;
}

.merck-load-pricing-btn:disabled {
    background: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 0.65 !important;
}

/* ========== PACK SIZES & PRICING (2.10) ==========
   One table, laid out like Sigma's own product page:
   pack size | availability | price | quantity | add to cart.
   Stacks into one card per pack size on phones. */

.merck-shortcode-wrapper .merck-pack-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--mk-ink);
    margin: 0 0 12px;
}

.merck-pack-table-wrap,
.merck-pack-skeleton {
    border: 1px solid var(--mk-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.merck-shortcode-wrapper .merck-pack-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.merck-shortcode-wrapper .merck-pack-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--mk-wash);
    color: var(--mk-text);
    font-size: 12.5px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    border: 0;
    border-bottom: 1px solid var(--mk-line);
}

.merck-shortcode-wrapper .merck-pack-table td {
    padding: 14px;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--mk-line);
    vertical-align: middle;
}

.merck-shortcode-wrapper .merck-pack-table tbody tr:last-child td {
    border-bottom: 0;
}

.merck-shortcode-wrapper .merck-pack-table tbody tr:hover td {
    background: #fcfbfe;
}

.merck-shortcode-wrapper .merck-pack-table .merck-pack-col-price {
    text-align: right;
}

.merck-pack-col-action {
    width: 1%;
    white-space: nowrap;
}

.merck-pack-size {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--mk-ink);
}

.merck-pack-material {
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--mk-text);
    word-break: break-all;
}

.merck-pack-note {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mk-text);
}

.merck-pack-empty {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--mk-wash);
    color: var(--mk-text);
    font-size: 14px;
}

.merck-pack-skeleton-row {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--mk-line);
}

.merck-pack-skeleton-row:last-child {
    border-bottom: 0;
}

/* Price */

.merck-price {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.25;
}

.merck-price-original {
    font-size: 12.5px;
    color: #8a849c;
    text-decoration: line-through;
}

.merck-price-final {
    font-size: 16px;
    font-weight: 600;
    color: var(--mk-ink);
}

.merck-price-currency {
    margin-top: 1px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--mk-text);
}

/* Availability */

.merck-avail {
    min-width: 0;
    transition: opacity 150ms ease;
}

.merck-avail.is-updating {
    opacity: 0.45;
}

.merck-avail-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--mk-ink);
}

.merck-avail-line + .merck-avail-line {
    margin-top: 8px;
}

.merck-avail-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.merck-avail-icon svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.merck-avail-line.is-available .merck-avail-icon {
    background: #149b5f;
    color: #fff;
}

.merck-avail-line.is-available .merck-avail-text {
    color: #0e7446;
    font-weight: 600;
}

.merck-avail-line.is-estimated .merck-avail-icon {
    background: #fdf0d8;
    color: #a35a00;
}

.merck-avail-line.is-estimated .merck-avail-text {
    font-weight: 500;
}

.merck-avail-line.is-unknown .merck-avail-icon {
    background: var(--mk-wash);
    color: var(--mk-text);
}

.merck-avail-line.is-unknown .merck-avail-text {
    color: var(--mk-text);
}

.merck-avail-from {
    display: block;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--mk-text);
}

.merck-avail-split-note {
    margin-bottom: 6px;
    font-size: 12.5px;
    color: var(--mk-text);
}

.merck-avail-qty {
    font-weight: 700;
}

/* Quantity stepper */

.merck-qty {
    display: inline-flex;
    align-items: stretch;
    height: 40px;
    border: 1px solid #cfc8dd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.merck-qty:focus-within {
    border-color: var(--mk-brand);
    box-shadow: 0 0 0 3px rgba(35, 65, 150, 0.15);
}

.merck-shortcode-wrapper .merck-qty-btn {
    width: 34px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--mk-brand);
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.merck-shortcode-wrapper .merck-qty-btn:hover {
    background: var(--mk-wash);
    color: var(--mk-brand-deep);
}

.merck-shortcode-wrapper .merck-qty .merck-quantity-input {
    width: 46px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--mk-line);
    border-right: 1px solid var(--mk-line);
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    color: var(--mk-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.merck-qty .merck-quantity-input:focus {
    outline: none;
}

.merck-quantity-input::-webkit-outer-spin-button,
.merck-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to cart (pack table and exact-SKU preview) */

.merck-shortcode-wrapper .merck-add-to-cart-btn {
    min-width: 112px;
    height: 40px;
    padding: 0 16px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    background: var(--mk-action);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 150ms ease;
}

.merck-shortcode-wrapper .merck-add-to-cart-btn:hover,
.merck-shortcode-wrapper .merck-add-to-cart-btn:focus-visible {
    background: var(--mk-action-hover);
    color: #fff;
}

.merck-shortcode-wrapper .merck-add-to-cart-btn:disabled {
    background: var(--mk-action);
    opacity: 0.7;
    cursor: progress;
}

/* Exact-SKU preview footer (quantity + add to cart) */

.merck-pack-footer {
    display: flex;
    gap: 8px;
    align-items: center;
}

.merck-shortcode-wrapper .merck-pack-footer .merck-quantity-input {
    width: 72px;
    height: 40px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #cfc8dd;
    border-radius: 10px;
    background: #fff;
    color: var(--mk-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.merck-shortcode-wrapper .merck-pack-footer .merck-quantity-input:focus {
    outline: none;
    border-color: var(--mk-brand);
    box-shadow: 0 0 0 3px rgba(35, 65, 150, 0.15);
}

.merck-pack-footer .merck-add-to-cart-btn {
    flex: 1;
}

.merck-sku-preview-price-row .merck-price {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

.merck-sku-preview-price-row .merck-price-final {
    font-size: 20px;
}

.merck-sku-preview-avail {
    margin-top: 10px;
}

.merck-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Phones: one card per pack size
   [pack size        price]
   [availability          ]
   [quantity  add to cart ] */
@media (max-width: 640px) {
    .merck-pack-table-wrap {
        border: 0;
        border-radius: 0;
        overflow: visible;
        background: none;
    }

    .merck-shortcode-wrapper .merck-pack-table thead {
        display: none;
    }

    .merck-shortcode-wrapper .merck-pack-table,
    .merck-shortcode-wrapper .merck-pack-table tbody {
        display: block;
    }

    .merck-shortcode-wrapper .merck-pack-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px;
        margin-bottom: 10px;
        border: 1px solid var(--mk-line);
        border-radius: 12px;
        background: #fff;
    }

    .merck-shortcode-wrapper .merck-pack-table td {
        display: block;
        padding: 0;
        border: 0;
        background: none;
    }

    .merck-shortcode-wrapper .merck-pack-table tbody tr:hover td {
        background: none;
    }

    .merck-shortcode-wrapper .merck-pack-table td[data-label="Pack size"] { grid-column: 1; grid-row: 1; }
    .merck-shortcode-wrapper .merck-pack-table td[data-label="Price"]     { grid-column: 2; grid-row: 1; }
    .merck-shortcode-wrapper .merck-pack-table td[data-label="Availability"] {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 10px;
        border-top: 1px solid var(--mk-line);
    }
    .merck-shortcode-wrapper .merck-pack-table td[data-label="Quantity"]  { grid-column: 1; grid-row: 3; }
    .merck-shortcode-wrapper .merck-pack-table .merck-pack-col-action     { grid-column: 2; grid-row: 3; width: auto; }

    .merck-pack-skeleton-row {
        flex-wrap: wrap;
    }
}

/* ========== TOASTS (added to cart / errors) ==========
   Appended to <body>, outside the search page wrapper, so every rule is scoped
   under .merck-cart-notification to keep the theme's button/link styles out. */

.merck-cart-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100001; /* above the details modal (99999) */
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 16px 16px 14px;
    background: #fff;
    color: var(--mk-ink);
    border: 1px solid var(--mk-line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(27, 34, 53, 0.18), 0 2px 6px rgba(27, 34, 53, 0.08);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    animation: merckToastIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes merckToastIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

.merck-cart-notification .merck-notification-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 28px;
    margin-bottom: 10px;
}

.merck-cart-notification .merck-notification-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #149b5f;
    color: #fff;
}

.merck-cart-notification .merck-notification-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--mk-ink);
}

.merck-cart-notification .merck-notification-body {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: var(--mk-wash);
}

.merck-cart-notification .merck-notification-name {
    font-weight: 600;
    color: var(--mk-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merck-cart-notification .merck-notification-meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--mk-text);
}

.merck-cart-notification .merck-notification-price {
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
    color: var(--mk-text);
    font-size: 12.5px;
}

.merck-cart-notification .merck-notification-price strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--mk-ink);
}

.merck-cart-notification .merck-notification-was {
    color: #8a849c;
}

.merck-cart-notification .merck-notification-actions {
    display: flex;
    gap: 8px;
}

.merck-cart-notification .merck-btn-view-cart,
.merck-cart-notification .merck-btn-continue {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 0 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.merck-cart-notification .merck-btn-view-cart {
    background: var(--mk-action);
    border: 0;
    color: #fff;
}

.merck-cart-notification .merck-btn-view-cart:hover,
.merck-cart-notification .merck-btn-view-cart:focus-visible {
    background: var(--mk-action-hover);
    color: #fff;
    text-decoration: none;
}

.merck-cart-notification .merck-btn-continue {
    background: #fff;
    border: 1px solid #cfc8dd;
    color: var(--mk-brand);
}

.merck-cart-notification .merck-btn-continue:hover,
.merck-cart-notification .merck-btn-continue:focus-visible {
    background: var(--mk-wash);
    border-color: var(--mk-brand);
    color: var(--mk-brand-deep);
}

.merck-cart-notification .merck-notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mk-text);
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.merck-cart-notification .merck-notification-close:hover {
    background: var(--mk-wash);
    color: var(--mk-ink);
}

.merck-cart-notification :focus-visible {
    outline: 2px solid var(--mk-brand);
    outline-offset: 2px;
}

.merck-cart-notification--error .merck-notification-icon {
    background: #c62828;
}

.merck-cart-notification--error .merck-notification-body {
    margin-bottom: 0;
    background: #fdf1f1;
}

.merck-cart-notification--error .merck-notification-meta {
    margin: 0;
    font-size: 14px;
    color: #7f1d1d;
}

@media (max-width: 600px) {
    .merck-cart-notification {
        top: auto;
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }

    @keyframes merckToastIn {
        from { opacity: 0; transform: translateY(8px); }
        to   { opacity: 1; transform: none; }
    }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .merck-search-container {
        margin: 20px auto;
    }

    .merck-search-container h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .merck-search-input,
    .merck-search-btn {
        width: 100%;
    }

    .merck-results {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .merck-details-body dl {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .merck-product-info-grid {
        grid-template-columns: 1fr;
    }

    .merck-product-media {
        max-width: 220px;
        margin: 0 auto;
    }

    .merck-modal-content {
        max-width: 95vw !important;
        max-height: 95vh !important;
        border-radius: 12px !important;
    }

}

@media (max-width: 480px) {
    .merck-search-container h2 {
        font-size: 20px;
    }

    .merck-results {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .merck-details-header {
        padding: 20px !important;
    }

    .merck-details-body {
        padding: 20px !important;
    }

}

/* ========== EMPTY STATE ========== */

.merck-empty-state {
    text-align: center;
    padding: 64px 40px;
    grid-column: 1 / -1;
    color: var(--text-secondary);
    animation: fadeIn 0.4s ease;
}

.merck-empty-state svg {
    display: block;
    margin: 0 auto 20px;
    color: var(--text-tertiary);
    opacity: 0.5;
    animation: merckEmptySearch 2.4s ease-in-out infinite;
}

@keyframes merckEmptySearch {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25%      { transform: rotate(-8deg) translateY(-2px); }
    75%      { transform: rotate(8deg) translateY(-2px); }
}

.merck-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.merck-empty-state p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ========== REDUCED MOTION ========== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .skeleton-loader {
        animation: none;
        background: #e8e8e8;
    }
}

/* ========== COPY-TO-CLIPBOARD ========== */

.merck-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: all 150ms ease;
}

.merck-copy-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.merck-copy-btn.copied {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

/* ========== BRAND FILTER CHIPS ========== */

.merck-brand-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.merck-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}

.merck-filter-chip {
    padding: 6px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 20px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 180ms ease;
}

.merck-filter-chip:hover {
    border-color: var(--mk-brand);
    color: var(--mk-brand);
}

.merck-filter-chip.active {
    background: var(--mk-brand);
    border-color: var(--mk-brand);
    color: #fff;
}

/* ========== FOCUS VISIBILITY (keyboard accessibility) ========== */

.merck-search-input:focus-visible,
.merck-search-btn:focus-visible,
.merck-details-btn:focus-visible,
.merck-add-to-cart-btn:focus-visible,
.merck-copy-btn:focus-visible,
.merck-modal-close:focus-visible,
.merck-filter-chip:focus-visible,
.merck-read-more-btn:focus-visible {
    outline: 2px solid var(--mk-brand);
    outline-offset: 2px;
}
/* ========== DETAILS MODAL ADDITIONS (2.10) ========== */

.merck-details-eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 8px;
    padding-right: 50px;
    font-variant-numeric: tabular-nums;
}

.merck-modal-close.merck-modal-close--dark {
    color: var(--mk-ink) !important;
}

.merck-modal-close.merck-modal-close--dark:hover {
    background: var(--mk-wash) !important;
}

.merck-loading,
.merck-modal-error {
    position: relative;
}

.merck-modal-error {
    padding: 56px 32px 32px;
}

.merck-modal-error p,
.merck-pricing-error p {
    margin: 0 0 14px;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.5;
}

.merck-pricing-error {
    padding: 8px 0;
}

/* ========== THEME-PROOFING (2.10) ==========
   The site theme (Astra + Elementor kit) styles bare `button` and headings with
   selectors like `.elementor-kit-N button` - one class + one element, which beats a
   plain `.merck-x` class. That's what stretched the modal close and image arrows to
   60px (theme padding 10px 30px) and switched headings to Montserrat. Everything
   below is scoped under the wrapper so it wins. */

.merck-shortcode-wrapper :is(h1, h2, h3, h4, h5, h6, p, button, input, select, textarea, table, th, td, dt, dd, li, a, label) {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

/* Modal close: round, icon-centred, on the purple header */
.merck-shortcode-wrapper .merck-modal-close {
    top: 20px !important;
    right: 20px !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

.merck-shortcode-wrapper .merck-modal-close:hover,
.merck-shortcode-wrapper .merck-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.26) !important;
    color: #fff !important;
}

.merck-shortcode-wrapper .merck-modal-close.merck-modal-close--dark {
    background: var(--mk-wash) !important;
    color: var(--mk-ink) !important;
}

.merck-shortcode-wrapper .merck-modal-close.merck-modal-close--dark:hover {
    background: #e8e3f2 !important;
}

.merck-shortcode-wrapper .merck-modal-close svg,
.merck-shortcode-wrapper .merck-sku-preview-close svg {
    display: block;
    flex-shrink: 0;
}

.merck-shortcode-wrapper .merck-sku-preview-close {
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--mk-text);
}

.merck-shortcode-wrapper .merck-sku-preview-close:hover {
    background: var(--mk-wash);
    color: var(--mk-ink);
}

/* Image carousel arrows: small round buttons, shown on hover (always on touch) */
.merck-shortcode-wrapper .merck-image-arrow {
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 1px solid var(--mk-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: var(--mk-brand);
    box-shadow: 0 2px 8px rgba(27, 34, 53, 0.12);
    line-height: 1;
    opacity: 0;
    transition: opacity 150ms ease, background-color 150ms ease, color 150ms ease;
}

.merck-shortcode-wrapper .merck-image-frame:hover .merck-image-arrow,
.merck-shortcode-wrapper .merck-image-arrow:focus-visible {
    opacity: 1;
}

.merck-shortcode-wrapper .merck-image-arrow:hover,
.merck-shortcode-wrapper .merck-image-arrow:active {
    background: var(--mk-brand);
    border-color: var(--mk-brand);
    color: #fff;
    transform: translateY(-50%);
}

.merck-shortcode-wrapper .merck-image-arrow svg {
    width: 16px;
    height: 16px;
}

@media (hover: none) {
    .merck-shortcode-wrapper .merck-image-arrow {
        opacity: 1;
    }
}

.merck-shortcode-wrapper .merck-image-counter {
    background: rgba(27, 34, 53, 0.72);
    font-variant-numeric: tabular-nums;
}

.merck-shortcode-wrapper .merck-image-zoom-hint {
    background: rgba(27, 34, 53, 0.6);
}

/* Other small buttons the theme would pad out */
.merck-shortcode-wrapper :is(.merck-copy-btn, .merck-read-more-btn, .merck-qty-btn, .merck-filter-chip, .mk-input-clear, .mk-rail-btn) {
    min-height: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

.merck-shortcode-wrapper .merck-copy-btn {
    padding: 0;
}

.merck-shortcode-wrapper .merck-read-more-btn {
    padding: 2px 0;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
}

.merck-shortcode-wrapper .merck-filter-chip {
    padding: 6px 14px;
    line-height: 1.3;
}

/* Dangerous Goods banner icons */
.merck-dg-pictos {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.merck-dg-pictos img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.merck-dg-glyph {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merck-details-body [hidden] {
    display: none !important;
}

/* The site's feedback survey (UserFeedback plugin, z-index 999999) sits on top of
   everything - keep it out of the way while the product modal or a toast is open. */
html.merck-modal-open .userfeedback-widget,
html.merck-toast-open .userfeedback-widget {
    display: none !important;
}

/* Same for the side cart's floating basket button, which would sit over the
   product window's prices on phones (the toast has its own "View cart"). */
html.merck-modal-open .xoo-wsc-basket {
    display: none !important;
}

/* Full-size image viewer (appended to <body>) */
.merck-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(27, 34, 53, 0.82);
    animation: fadeIn 0.2s ease;
}

.merck-image-viewer[hidden] {
    display: none;
}

.merck-image-viewer-frame {
    position: relative;
    max-width: min(900px, 92vw);
    max-height: 88vh;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.merck-image-viewer-frame img {
    display: block;
    max-width: 100%;
    max-height: calc(88vh - 32px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.merck-image-viewer .merck-image-viewer-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--mk-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.merck-image-viewer .merck-image-viewer-close:hover,
.merck-image-viewer .merck-image-viewer-close:focus-visible {
    background: var(--mk-wash);
    color: var(--mk-ink);
}

.merck-shortcode-wrapper .merck-image-frame:focus-visible {
    outline: 3px solid var(--mk-brand);
    outline-offset: 2px;
}
