/* Modern SaaS Frontend Design - Merck Quote */

:root {
    --primary: var(--ast-color-primary, #003366);
    --secondary: var(--ast-color-secondary, #00509e);
    --accent: #0066cc;
    --bg-light: #f8f9fa;
    --bg-lighter: #ffffff;
    --border-light: #e0e6ed;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --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);
}

* {
    box-sizing: border-box;
}

/* ========== SHORTCODE WRAPPER & SECTIONS ========== */

.merck-shortcode-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.merck-hero-section {
    text-align: center;
    margin-bottom: 48px;
}

.merck-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    letter-spacing: 0.5px;
    position: relative;
}

.merck-hero-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: merck-pulse 300ms ease-in-out infinite;
}

.merck-hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px;
    line-height: 1.2;
}

.merck-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.merck-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.merck-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 50px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding-left: 40px;
}

.merck-feature-pill::before {
    content: '';
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.merck-feature-pill--pricing::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'%3E%3C/path%3E%3Cpolyline points='13 2 13 9 20 9'%3E%3C/polyline%3E%3Cline x1='12' y1='19' x2='12' y2='11'%3E%3C/line%3E%3Cline x1='9' y1='14' x2='15' y2='14'%3E%3C/line%3E%3C/svg%3E");
}

.merck-feature-pill--packs::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='16.5' y1='9.4' x2='7.5' y2='4.21'%3E%3C/line%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'%3E%3C/path%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'%3E%3C/polyline%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E");
}

.merck-feature-pill--availability::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328a745' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.merck-feature-pill--discounts::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'%3E%3C/circle%3E%3Cpath d='M19 12c0-1.657-.895-3.108-2.231-3.898M5 12c0 1.657.895 3.108 2.231 3.898'%3E%3C/path%3E%3Cpath d='M9 9c0-.552.448-1 1-1s1 .448 1 1-.448 1-1 1-1-.448-1-1m6 6c0-.552.448-1 1-1s1 .448 1 1-.448 1-1 1-1-.448-1-1'%3E%3C/path%3E%3C/svg%3E");
}

.merck-search-panel {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
    margin-bottom: 48px;
}

.merck-info-section {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.merck-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.merck-info-card {
    position: relative;
    padding-left: 64px;
}

.merck-info-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.merck-info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.merck-info-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color: rgba(59, 130, 246, 0.1);
}

.merck-info-card--search::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-color: rgba(59, 130, 246, 0.1);
}

.merck-info-card--pricing::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'%3E%3C/circle%3E%3Cpath d='M19 12c0-1.657-.895-3.108-2.231-3.898M5 12c0 1.657.895 3.108 2.231 3.898'%3E%3C/path%3E%3C/svg%3E");
    background-color: rgba(16, 185, 129, 0.1);
}

.merck-info-card--stock::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18v-6a6 6 0 0 0-9 0v6a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2z'%3E%3C/path%3E%3Cpath d='M9 2v3M7 9h6M17 13v-3h3'%3E%3C/path%3E%3C/svg%3E");
    background-color: rgba(245, 158, 11, 0.1);
}

.merck-info-card--cart::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
    background-color: rgba(139, 92, 246, 0.1);
}

.merck-help-text {
    margin-top: 24px;
    padding: 16px 24px;
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.merck-help-text p {
    margin: 0;
    line-height: 1.6;
}

.merck-help-text strong {
    color: #1e40af;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .merck-shortcode-wrapper {
        padding: 24px 16px;
    }

    .merck-hero-title {
        font-size: 32px;
    }

    .merck-hero-subtitle {
        font-size: 16px;
    }

    .merck-search-panel {
        padding: 20px;
    }

    .merck-feature-pills {
        gap: 10px;
    }

    .merck-feature-pill {
        padding: 8px 16px;
        font-size: 13px;
        padding-left: 36px;
    }

    .merck-feature-pill::before {
        width: 14px;
        height: 14px;
        left: 10px;
    }

    .merck-info-cards {
        gap: 24px;
    }
}

/* ========== 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: 12px;
    align-items: center;
}

.merck-search-input {
    flex: 1;
    padding: 14px 16px 14px 46px;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-lighter) 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='%23999999' stroke-width='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 14px center;
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 44px;
}

.merck-search-input::placeholder {
    color: var(--text-tertiary);
}

.merck-search-input:hover {
    border-color: #d0d8e0;
    box-shadow: var(--shadow-sm);
}

.merck-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.08);
}

.merck-search-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    min-height: 44px;
}

.merck-search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.merck-search-btn:hover::before {
    left: 100%;
}

.merck-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.25);
}

.merck-search-btn:active {
    transform: translateY(0);
}

.merck-search-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* ========== 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: #0066cc;
    padding-left: 20px;
}

.ac-item.active {
    background: #e8f0ff;
    border-left-color: #0066cc;
    color: #0066cc;
    font-weight: 500;
}

/* ========== STATUS & ERROR MESSAGES ========== */

.merck-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 20px;
    animation: fadeIn 0.3s ease;
}

.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;
}

/* ========== PRODUCT RESULTS GRID ========== */

.merck-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    animation: fadeIn 0.4s ease;
}

/* ========== PRODUCT CARDS ========== */

.merck-product-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1.5px solid #e0e6ed;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.merck-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #0066cc 50%, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.merck-product-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #0066cc;
    transform: translateY(-6px);
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
}

.merck-product-card:hover::before {
    transform: scaleX(1);
}

.merck-product-header {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
}

.merck-sku-badge {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #e8f2ff !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    border: 2px solid #0066cc !important;
    border-left: 5px solid #0066cc !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.merck-sku-label {
    font-family: 'Courier New', monospace !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #0066cc !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
}

.merck-sku-value {
    font-family: 'Courier New', monospace !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    color: #0066cc !important;
    letter-spacing: 0.8px !important;
}

.merck-brand-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #e61e50 0%, #d41c4a 100%) !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(230, 30, 80, 0.2) !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start !important;
}

.merck-product-key {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.08) 0%, rgba(0, 80, 158, 0.06) 100%);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
    display: inline-block;
}

.merck-product-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    flex-grow: 1;
}

.merck-product-brand {
    display: none;
}

.merck-product-brand-status {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.merck-product-header .merck-product-brand-status {
    font-size: 11px !important;
    padding: 5px 10px !important;
    margin-top: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
}

.merck-product-brand-status.ok {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #1b5e20;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}

.merck-product-brand-status.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #b71c1c;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.1);
}

.merck-details-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-top: auto;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    min-height: 44px;
}

.merck-details-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 500ms, height 500ms;
}

.merck-details-btn:active::before {
    width: 300px;
    height: 300px;
}

.merck-details-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.35);
    background: linear-gradient(135deg, #0073e6 0%, #005bb8 100%);
}

.merck-details-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.merck-details-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== LOADING STATE ========== */

.merck-loading {
    text-align: center;
    padding: 60px 40px;
}

.merck-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    position: relative;
}

.merck-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 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: 680px !important;
    max-height: 90vh !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: linear-gradient(135deg, #003366 0%, #00509e 100%) !important;
    color: #fff !important;
    padding: 32px !important;
    border-radius: 16px 16px 0 0 !important;
    position: relative !important;
    z-index: 10 !important;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15) !important;
}

.merck-details-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #00b4d8, #0066cc);
}

.merck-details-header h2 {
    margin: 0 0 12px 0 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.2 !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;
}

.merck-modal-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 200ms ease !important;
    z-index: 20 !important;
}

.merck-modal-close:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: #fff !important;
    transform: scale(1.08) !important;
}

.merck-modal-close:active {
    transform: scale(0.96) !important;
}

/* ========== MODAL TABS ========== */

.merck-modal-tabs {
    display: flex;
    border-bottom: 2px solid #e0e6ed;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    padding: 0 30px;
    gap: 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.merck-modal-tab {
    padding: 16px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.merck-modal-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #0066cc 50%, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.merck-modal-tab:hover {
    color: #1a1a1a;
    background: rgba(0, 102, 204, 0.05);
}

.merck-modal-tab.active {
    color: #0066cc;
    font-weight: 600;
}

.merck-modal-tab.active::after {
    transform: scaleX(1);
}

.merck-modal-tab svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.merck-tab-content {
    display: none;
    animation: fadeIn 200ms ease;
}

.merck-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.merck-details-body {
    flex-shrink: 0 !important;
    padding: 30px !important;
    border-bottom: 1px solid var(--border-light) !important;
}

.merck-details-body dl {
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 140px 1fr !important;
    gap: 16px 24px !important;
}

.merck-details-body dt {
    font-weight: 700 !important;
    color: var(--primary) !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.merck-details-body dd {
    margin: 0 !important;
    color: var(--text-primary) !important;
    line-height: 1.6 !important;
    word-break: break-word !important;
}

.merck-pack-sizes-section {
    padding: 30px !important;
    border-top: 1px solid var(--border-light) !important;
    flex-grow: 1 !important;
    overflow-y: auto !important;
}

.merck-pack-sizes-section h3 {
    margin: 0 0 24px 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.merck-load-pricing-btn {
    display: block !important;
    width: 100% !important;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !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(0, 102, 204, 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 {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 28px rgba(0, 102, 204, 0.35) !important;
    background: linear-gradient(135deg, #0073e6 0%, #005bb8 100%) !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 SIZE CARDS ========== */

.merck-pack-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    border: 1.5px solid #e0e6ed;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    transition: all 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fadeIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.merck-pack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0066cc, #0066cc 30%, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.merck-pack-card:hover {
    border-color: #0066cc;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    transform: translateY(-2px);
}

.merck-pack-card:hover::before {
    transform: scaleX(1);
}

.merck-pack-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 14px !important;
    gap: 16px !important;
}

.merck-pack-info {
    flex: 1 !important;
}

.merck-pack-size {
    display: block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin-bottom: 4px !important;
}

.merck-pack-material {
    display: block !important;
    font-size: 12px !important;
    color: var(--text-tertiary) !important;
    font-family: 'Courier New', monospace !important;
}

.merck-pack-price {
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px !important;
    white-space: normal !important;
}

.merck-price-original {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    text-decoration: line-through !important;
}

.merck-price-final {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #10b981 !important;
}

.merck-pack-price .merck-price-final:only-child {
    color: var(--primary) !important;
}

.merck-price-currency {
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    margin-left: 4px !important;
    font-weight: 600 !important;
}

.merck-pack-footer {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.merck-quantity-input {
    width: 70px !important;
    padding: 10px 12px !important;
    border: 1.5px solid #d0dae8 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    min-height: 44px !important;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%) !important;
    color: var(--text-primary) !important;
}

.merck-quantity-input:hover {
    border-color: #0066cc !important;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1) !important;
}

.merck-quantity-input:focus {
    outline: none !important;
    border-color: #0066cc !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15) !important;
}

.merck-check-btn,
.merck-add-to-cart-btn {
    flex: 1 !important;
    min-width: 100px !important;
    padding: 11px 14px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    white-space: nowrap !important;
    touch-action: manipulation !important;
    min-height: 44px !important;
    position: relative !important;
    overflow: hidden !important;
}

.merck-check-btn::before,
.merck-add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 400ms, height 400ms;
}

.merck-check-btn:active::before,
.merck-add-to-cart-btn:active::before {
    width: 200px;
    height: 200px;
}

.merck-check-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #fff !important;
}

.merck-check-btn:hover {
    background: linear-gradient(135deg, #71778c 0%, #505b7b 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.2) !important;
}

.merck-add-to-cart-btn {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2) !important;
}

.merck-add-to-cart-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3) !important;
    background: linear-gradient(135deg, #31c256 0%, #25a049 100%) !important;
}

.merck-add-to-cart-btn:disabled {
    background: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.merck-availability-info {
    margin-top: 12px !important;
    padding: 12px 14px !important;
    background: #e8f5e9 !important;
    border-left: 3px solid var(--success) !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    color: #2e7d32 !important;
    line-height: 1.5 !important;
}

/* ========== CART NOTIFICATION ========== */

.merck-cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 420px;
    background: var(--bg-lighter);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 100000;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 4px solid var(--success);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.merck-notification-content {
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.merck-notification-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--success) 0%, #218838 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.merck-notification-text {
    flex: 1;
}

.merck-notification-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 15px;
}

.merck-notification-price {
    color: var(--success);
    font-weight: 700;
    font-size: 15px;
}

.merck-notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.merck-btn-view-cart,
.merck-btn-continue {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.merck-btn-view-cart {
    background: linear-gradient(135deg, var(--success) 0%, #218838 100%);
    color: #fff;
}

.merck-btn-view-cart:hover {
    transform: translateY(-2px);
}

.merck-btn-continue {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.merck-btn-continue:hover {
    background: #f0f0f0;
}

.merck-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.merck-notification-close:hover {
    color: var(--text-primary);
}

/* ========== 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-modal-content {
        max-width: 95vw !important;
        max-height: 95vh !important;
        border-radius: 12px !important;
    }

    .merck-pack-header {
        flex-direction: column !important;
    }

    .merck-pack-price {
        text-align: left !important;
    }

    .merck-cart-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .merck-notification-actions {
        flex-direction: column;
    }

    .merck-btn-view-cart,
    .merck-btn-continue {
        width: 100%;
    }
}

@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;
    }

    .merck-pack-sizes-section {
        padding: 20px !important;
    }

    .merck-pack-card {
        padding: 12px !important;
    }

    .merck-pack-footer {
        flex-direction: column;
        gap: 10px;
    }

    .merck-quantity-input,
    .merck-check-btn,
    .merck-add-to-cart-btn {
        width: 100% !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;
}

.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;
    }
}
