section#product-list p#product-empty-state {
    text-wrap: nowrap;
}

section#product-list .product-alpha-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 16px;
}

section#product-list .product-alpha-filter a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 6px 10px;
    border: 1px solid #d7e3f7;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

section#product-list .product-alpha-filter a.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

section#product-list .product-page-status {
    margin: -4px 0 12px;
    text-align: center;
    color: #4a5b7d;
    font-size: 14px;
}

section#product-list .product-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin: 20px auto 8px;
}

section#product-list .product-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d7e3f7;
    border-radius: 10px;
    background: #ffffff;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

section#product-list .product-pagination .page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

section#product-list .product-pagination .page-link.disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

section#product-list .product-pagination .page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d7e3f7;
    border-radius: 10px;
    background: #ffffff;
    color: #4a5b7d;
    font-size: 14px;
    font-weight: bold;
}

.print-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 14px;
}

.print-all-products-btn {
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
}

.print-all-products-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.print-product-list {
    display: none;
}

/* Navigation product search */
#bottom_nav li.nav-product-search {
    grid-column: span 3;
}

#bottom_nav li.nav-product-search .nav-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#bottom_nav li.nav-product-search .nav-search-form input {
    flex: 1;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-right: none;
    padding: 0 12px;
    border-radius: 999px 0 0 999px;
    outline: none;
    font-size: 14px;
}

#bottom_nav li.nav-product-search .nav-search-form button {
    height: 40px;
    width: 45px;
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0 999px 999px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#bottom_nav li.nav-product-search .nav-search-form button:hover {
    background-color: #002aab;
    border-color: #002aab;
}

#bottom_nav li.nav-product-search .nav-search-form button img {
    height: 20px;
    width: 20px;
}

div.product-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

section#product-list div.product-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #d9e1f2;
    border-radius: 12px;
    background-color: #ffffff;
}

section#product-list div.product-card.product-card-clickable {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    will-change: transform;
}

section#product-list div.product-card.product-card-clickable:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

section#product-list div.product-card span.product-name {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
    align-items: flex-start;
}

section#product-list div.product-card img.product-image {
    border: 0;
    padding: 0;
    display: none; /* Hidden by default, shown in specific media queries if needed */
}

section#product-list div.product-card span.product-name a {
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 5px 10px;
    text-decoration: none;
    color: var(--primary-color);
    top: 20px;
}

div.product-category-list {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    align-self: flex-start;
    margin-left: 0;
    background-color: #F3F4F6;
    color: #4B5563;
    text-align: center;
    padding: 5px 13px;
    border: 1px solid #E5E7EB;
    font-size: 14px;
    font-family: inherit;
    transition: background-color 0.2s ease;
    margin-top: auto; /* Pushes this to the bottom */
    border-radius: 999px;
}

div.product-category-list:hover {
    background-color: #E5E7EB;
}

div.product-category-list div.product-category-group {
    margin: 0 !important;
}

section#content article div a.msds {
    border: 1px solid #FF0000;
    color: #FF0000;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
}

section#product-list div.product-card span.product-name a.product-msds {
    margin-top: 0;
    color: #FF0000;
    border-color: #FF0000;
}

section#product-list div.product-card span.product-name a.product-msds.disabled,
section#content article div a.disabled {
    color: #808080;
    pointer-events: none;
    cursor: default;
    text-decoration: none;
    border-color: #808080;
}

section#product-list div.product-card span.product-name a.product-msds:hover {
    color: #FFFFFF;
    background-color: #FF0000;
}

section#product-list div.product-card span.product-name div.product-detail-buttons {
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

section#product-list div.product-card span.product-name a:hover {
    color: #FFFFFF;
    background-color: var(--primary-color);
}

@media (hover: hover) and (pointer: fine) {
    section#product-list div.product-card.product-card-clickable:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
        border-color: rgba(0, 0, 0, 0.1);
    }
}

section#content article div a.msds:hover {
    color: #FFFFFF;
    background-color: #FF0000;
}

section#product-list div.product-card span.product-name a img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
    margin-bottom: 5px;
}

section#product-list span.product-name h2 {
    font-weight: 400;
    font-size: 18px;
    margin-bottom: 8px; /* Add some space below the title */
}

section#product-list span.product-name h5 {
    font-weight: 400;
    margin-bottom: 12px; /* Add some space below the CAS number */
}

.mobile-msds-cta {
    display: none;
}

/* Tablet view */
@media (max-width: 1280px) {
    div.product-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    section#product-list div.product-card {
        padding: 15px;
    }
}

/* Phone view */
@media (max-width: 767px) {
    div.product-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    section#product-list div.product-card {
        padding: 12px;
    }
    section#product-list span.product-name h2 {
        font-size: 16px;
    }
}

section#content div.detail-card img {
    width: 300px;
    height: 300px;
}

section#content div.detail-card img.detail-main-image {
    width: 320px;
    max-width: 320px;
    height: 240px;
    display: block;
    margin-bottom: 20px;
    object-fit: contain;
}

section#content div.detail-image-panel {
    position: relative;
    width: 320px;
    margin-bottom: 20px;
    flex: 0 0 320px;
}

section#content div.detail-image-gallery {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

section#content div.detail-image-gallery::-webkit-scrollbar {
    display: none;
}

section#content div.detail-image-gallery img {
    flex: 0 0 auto;
    width: 320px;
    height: 240px;
    object-fit: contain;
    border: 1px solid #d9e1f2;
    border-radius: 10px;
    background-color: #fff;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

section#content button.detail-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 23, 96, 0.85);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

section#content button.detail-gallery-nav:hover {
    background: rgba(0, 42, 171, 0.95);
}

section#content button.detail-gallery-nav:disabled,
section#content button.detail-gallery-nav[aria-disabled="true"] {
    background: rgba(128, 128, 128, 0.6);
    color: rgba(255, 255, 255, 0.85);
    cursor: not-allowed;
    opacity: 0.5;
}

section#content button.detail-gallery-prev {
    left: 8px;
}

section#content button.detail-gallery-next {
    right: 8px;
}

section#content div.detail-gallery-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

section#content button.detail-gallery-dot {
    width: 10px;
    height: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    background: #d9e8f6;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

section#content button.detail-gallery-dot.is-active {
    background: var(--primary-color);
    transform: scale(1.15);
}

.product-category-phone {
    display: none;
}

section#content div.detail-card {
    display: flex;
    flex-direction: row-reverse;
    margin-top: 20px;
    gap: 40px;
}

section#content div.detail-card .product-category-info {
    margin-bottom: 15px;
    padding: 10px 15px;
    background-color: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    color: #4b5563;
}

section#content div.detail-card .product-category-info strong {
    color: var(--primary-color);
}

section#content div.detail-card p {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

section#content article .detail-msds-box {
    margin-top: 20px;
    margin-left: 10px;
}

.products-header {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../../assets/images/products/6_prod_c.png');
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 380px;
    padding-top: 80px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #FFFFFF;
    text-align: center;
    top: 55px;
    z-index: 9997;
}

@media (max-width: 1024px) {
    .products-header {
        height: auto;
        /*min-height: 380px;*/
        padding-top: 0;
        padding-bottom: 0;
    }

    .products-header .product-category-phone {
        margin-top: 20px;
    }
}

@media (max-width: 1024px) {
    header.products-header h1,
    header.products-header p {
        display: none;
    }

    header.products-header section h1 {
        display: block;
    }

    .product-category-phone {
        display: contents;
    }

    hr.product-category-phone {
        display: block;
    }

    section.product-category-phone {
        width: calc(100% - 30px);
        max-width: 100%;
        box-sizing: border-box;
        background: #ffffff;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        margin: 0 15px 18px;
        padding: 18px 16px 22px;
        border: 1px solid #e5edf7;
        border-radius: 20px;
        box-shadow: 8px 0 28px rgba(15, 23, 42, 0.06);
    }

    section.product-category-phone h1 {
        margin: 0 0 10px;
        padding: 0 6px 4px;
        font-size: 18px;
        letter-spacing: 0.02em;
        line-height: 1.2;
        color: var(--primary-color);
    }

    section.product-category-phone ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    section.product-category-phone ul li {
        border: none;
        border-radius: 14px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0;
        width: 100%;
    }

    section.product-category-phone ul li img {
        margin-left: auto;
        margin-right: 0;
        height: 30px;
        border: 0;
        padding: 0;
        border-radius: 0;
    }

    section.product-category-phone ul li a {
        padding: 12px 14px;
        text-decoration: none;
        color: var(--primary-color);
        display: flex;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: flex-start;
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        border: 1px solid #e7eef8;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    }

    section.product-category-phone ul li a {
        overflow-wrap: anywhere;
    }

    section.product-category-phone ul li a:hover,
    section.product-category-phone ul li a:active {
        background: linear-gradient(180deg, #f2f7ff 0%, #e2ebf8 100%);
        color: var(--primary-color);
        box-shadow: 0 10px 22px rgba(0, 23, 96, 0.08);
        transform: translateX(2px);
    }

    section#content div.detail-card {
        display: flex;
        flex-direction: column;
    }

    section#content div.detail-card img.detail-main-image {
        width: 100%;
        max-width: 280px;
        height: auto;
        margin-left: auto;
        margin-right: auto;
    }

    section#content button.detail-gallery-nav {
        display: none;
    }

    section#content div.detail-image-gallery img {
        width: 100%;
        height: 220px;
    }

    section#content div.detail-image-gallery {
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    section#content div.detail-image-panel {
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        flex: none;
    }

    section#content article .detail-msds-box {
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
    }

    .mobile-msds-cta {
        display: block;
        margin-top: 10px;
        padding: 8px 12px;
        text-align: center;
    }

    .mobile-msds-cta .msds-quick-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-align: center;
        background: #ffffff;
        color: #ff0000;
        text-decoration: none;
        border: 1px solid #ff0000;
        border-radius: 8px;
        padding: 6px 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .mobile-msds-cta .msds-quick-btn img {
        width: 14px;
        height: 14px;
        display: block;
    }

    .mobile-msds-cta .msds-quick-btn:active {
        opacity: 0.9;
    }

    div.product-category-list {
        margin-left: 0 !important;
    }
}

@media (hover: none), (pointer: coarse) {
    section#content button.detail-gallery-nav {
        display: none !important;
    }
}

@media (hover: hover) and (pointer: fine) {
    section#content button.detail-gallery-nav {
        display: flex;
    }
}

@media print {
    header,
    footer,
    #page-loading-overlay,
    .no-print,
    section#content aside,
    section.product-category-phone,
    section#product-list {
        display: none !important;
    }

    div.product-footerwiki,
    p.version-numbering {
        display: none;
    }

    main,
    section#content,
    section#content article {
        display: block !important;
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .print-product-list {
        display: block !important;
        color: #000;
        font-size: 9pt;
    }

    .print-product-list h1 {
        margin: 0 0 8px;
        color: #000;
        font-size: 13pt;
    }

    .print-product-list .print-product-lines {
        margin: 0;
        padding-left: 20px;
    }

    .print-product-list .print-product-lines li {
        margin: 0 0 6px;
        padding: 0 0 4px;
        border-bottom: 0.5pt solid #d0d0d0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-product-list .print-row-main {
        font-size: 10pt;
        font-weight: 700;
        line-height: 1.25;
    }

    .print-product-list .print-inline-muted {
        font-weight: 400;
        color: #333;
    }

    .print-product-list .print-row-sub {
        margin-top: 1px;
        font-size: 8.6pt;
        color: #333;
        line-height: 1.2;
    }

    .print-product-list .print-row-meta {
        margin-top: 2px;
        font-size: 8.2pt;
        line-height: 1.25;
    }

    .print-product-list .print-row-meta span + span {
        margin-left: 10px;
    }
}

/* Animations for Products Page */
@keyframes fadeInUpCategory {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpProduct {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category List Animation */
.product-category-phone {
    opacity: 0;
    animation: fadeInUpCategory 0.6s ease-out forwards;
}

.product-category-phone ul li {
    opacity: 0;
    animation: fadeInUpCategory 0.5s ease-out forwards;
}

div.product-footerwiki {
    align-self: center;
    text-align: center;
    color: darkgray;
}

.product-category-phone ul li:nth-child(1) { animation-delay: 0.1s; }
.product-category-phone ul li:nth-child(2) { animation-delay: 0.2s; }
.product-category-phone ul li:nth-child(3) { animation-delay: 0.3s; }
.product-category-phone ul li:nth-child(4) { animation-delay: 0.4s; }
.product-category-phone ul li:nth-child(5) { animation-delay: 0.5s; }
.product-category-phone ul li:nth-child(6) { animation-delay: 0.6s; }

/* Product List Animation */
.product-list .product-card {
    opacity: 0;
    animation: fadeInUpProduct 0.5s ease-out forwards;
}

.product-list .product-card:nth-child(1) { animation-delay: 0.05s; }
.product-list .product-card:nth-child(2) { animation-delay: 0.1s; }
.product-list .product-card:nth-child(3) { animation-delay: 0.15s; }
.product-list .product-card:nth-child(4) { animation-delay: 0.2s; }
.product-list .product-card:nth-child(5) { animation-delay: 0.25s; }
.product-list .product-card:nth-child(6) { animation-delay: 0.3s; }
.product-list .product-card:nth-child(7) { animation-delay: 0.35s; }
.product-list .product-card:nth-child(8) { animation-delay: 0.4s; }
.product-list .product-card:nth-child(9) { animation-delay: 0.45s; }
.product-list .product-card:nth-child(10) { animation-delay: 0.5s; }
.product-list .product-card:nth-child(11) { animation-delay: 0.55s; }
.product-list .product-card:nth-child(12) { animation-delay: 0.6s; }
.product-list .product-card:nth-child(13) { animation-delay: 0.65s; }
.product-list .product-card:nth-child(14) { animation-delay: 0.7s; }
.product-list .product-card:nth-child(15) { animation-delay: 0.75s; }
.product-list .product-card:nth-child(16) { animation-delay: 0.8s; }
.product-list .product-card:nth-child(17) { animation-delay: 0.85s; }
.product-list .product-card:nth-child(18) { animation-delay: 0.9s; }
.product-list .product-card:nth-child(19) { animation-delay: 0.95s; }
.product-list .product-card:nth-child(20) { animation-delay: 1.0s; }