.products-page {
    background: var(--light);
    color: #222;
    overflow-x: hidden;
}

.products-page #header {
    z-index: 1000;
}

a {
   position: relative;
   display: inline-block;
   overflow: hidden;
 }
 
 a::after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 0;
   height: 4px;
   width: 100%;
   background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
   background-size: 200% auto;
   transition: all .5s;
   transform: translateX(-100%);
 }
 
 a:hover::after {
   transform: translateX(0%);
   animation: gradient-89 3s linear infinite;
 }
 
 @keyframes gradient-89 {
   0% { background-position: 100% 0%; }
   50% { background-position: 0% 0%; }
   100% { background-position: 100% 0%; }
 }

.products-page #header.scrolled {
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 5px 20px rgba(0, 0, 0, .1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(5px);
}

.products-page .header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-page main {
    padding-top: 90px;
}

.products-page .nav-links a.active-link {
    color: var(--primary-blue);
}

.products-hero {
    position: relative;
    overflow: hidden;
    padding: 25px 0 28px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: #fff;
}

.products-hero .container {
    position: relative;
    z-index: 1;
}

.products-hero-content {
    display: grid;
    align-items: center;
}

.products-hero-copy {
    position: relative;
    z-index: 2;
}

.products-hero-media {
    position: relative;
    display: none;
}

.products-hero-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 59, 122, .06) 70%, var(--dark-blue) 100%);
    content: '';
}

.products-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .96;
}

.products-hero .breadcrumb {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
}

.products-hero .breadcrumb a {
    color: #fff;
}

.products-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 6vw, 48px);
}

.products-hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, .88);
}

.products-toolbar {
    position: sticky;
    top: 90px;
    z-index: 900;
    padding: 16px 0;
    background: rgba(247, 248, 252, .96);
    border-bottom: 1px solid #e3e8f1;
    box-shadow: 0 7px 20px rgba(0, 34, 77, .08);
    backdrop-filter: blur(12px);
}

.products-toolbar-inner {
    display: grid;
    gap: 10px;
}

.products-search,
.products-filter {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    background: #fff;
    color: #222;
    font: inherit;
}

.category-menu {
    position: relative;
    z-index: 2;
}

.category-menu-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    background: #fff;
    color: #222;
    font: inherit;
    cursor: pointer;
}

.category-menu-button i {
    color: var(--primary-blue);
    font-size: 12px;
}

.category-menu-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: none;
    padding: 6px;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.category-menu.open {
    z-index: 8;
}

.category-menu.open .category-menu-list {
    display: block;
}

.category-menu-item {
    position: relative;
}

.category-menu-item > button,
.category-submenu button {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #26364d;
    text-align: right;
    font: inherit;
    cursor: pointer;
}

.category-menu-item > button:hover,
.category-submenu button:hover,
.category-menu-item > button.active {
    background: #eef4fb;
    color: var(--primary-blue);
}

.category-menu-item.has-submenu > button::before {
    content: '\f104';
    float: left;
    font: 900 12px/1 'Font Awesome 6 Free';
}

.category-submenu {
    position: absolute;
    top: 0;
    right: calc(100% + 4px);
    display: none;
    width: 180px;
    padding: 6px;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.category-menu-item.has-submenu:hover .category-submenu,
.category-menu-item.has-submenu:focus-within .category-submenu {
    display: block;
}

.category-menu-sheet .category-menu-list {
    position: static;
    display: block;
    box-shadow: none;
}

.category-menu-sheet .category-submenu {
    position: static;
    display: block;
    width: auto;
    margin: 3px 0 3px 12px;
    border: 0;
    box-shadow: none;
}

.products-search:focus,
.products-filter:focus {
    outline: 2px solid rgba(0, 87, 184, .2);
    border-color: var(--primary-blue);
}

.products-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    color: var(--dark-blue);
    font-weight: 700;
    cursor: pointer;
}

.products-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-red);
}

.mobile-filter-btn {
    display: none;
    border: 0;
    background: var(--primary-blue);
    color: #fff;
    font: inherit;
    font-weight: 700;
    border-radius: 10px;
    padding: 11px 16px;
}

.products-results {
    min-height: 520px;
    padding: 42px 0 74px;
}

.products-social {
    padding: 48px 0;
    background: #fff;
    text-align: center;
}

.products-social h2 {
    margin-bottom: 18px;
    color: var(--dark-blue);
    font-size: 24px;
}

.products-social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.products-social-links a {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    font-size: 19px;
}

.products-social-links a:hover,
.products-social-links a:focus-visible {
    background: var(--primary-red);
}

.products-status {
    margin-bottom: 18px;
    color: var(--gray);
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.catalog-image {
    position: relative;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #eef3fa;
}

.catalog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-image.no-image::before {
    content: '\f03e';
    color: var(--primary-blue);
    font: 34px/1 'Font Awesome 6 Free';
    font-weight: 900;
    opacity: .35;
}

.catalog-badge,
.catalog-discount {
    position: absolute;
    top: 10px;
    padding: 4px 8px;
    border-radius: 7px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.catalog-badge {
    right: 10px;
    background: var(--primary-blue);
}

.catalog-discount {
    left: 10px;
    background: var(--primary-red);
}

.catalog-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.catalog-content h2 {
    color: var(--dark-blue);
    font-size: 16px;
    line-height: 1.5;
}

.catalog-code {
    color: var(--gray);
    font-size: 12px;
}

.catalog-description {
    display: -webkit-box;
    overflow: hidden;
    color: #626b79;
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.catalog-price {
    margin-top: auto;
    color: var(--primary-red);
    font-weight: 800;
}

.catalog-price del {
    margin-inline-start: 5px;
    color: var(--gray);
    font-size: 12px;
    font-weight: 400;
}

.quantity-stepper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-stepper button {
    display: grid;
    width: 32px;
    height: 34px;
    place-items: center;
    border: 1px solid #d7dfeb;
    border-radius: 7px;
    background: #f5f8fc;
    color: var(--primary-blue);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.quantity-stepper input {
    width: 48px;
    height: 34px;
    border: 1px solid #d7dfeb;
    border-radius: 7px;
    color: var(--dark-blue);
    text-align: center;
    font: inherit;
    font-weight: 700;
}

.product-stepper {
    justify-content: center;
}

.add-to-cart,
.cart-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 8px;
    border-radius: 8px;
    border: 0;
    background: var(--primary-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.add-to-cart:hover,
.add-to-cart:focus-visible {
    background: var(--primary-red);
}

.cart-trigger {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    min-width: 19px;
    height: 19px;
    padding: 1px 5px;
    border-radius: 20px;
    background: var(--primary-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 17px;
}

.cart-open {
    overflow: hidden;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 2190;
    background: rgba(5, 20, 40, .62);
}

.cart-modal {
    position: fixed;
    inset: 4vh 4%;
    z-index: 2200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .3);
}

.cart-modal[hidden],
.cart-overlay[hidden] {
    display: none;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 20px;
    border-bottom: 1px solid #e5eaf1;
}

.cart-header h2 {
    color: var(--dark-blue);
    font-size: 20px;
}

.cart-header h2 i {
    margin-inline-end: 7px;
    color: var(--primary-blue);
}

.cart-close {
    border: 0;
    background: transparent;
    color: var(--gray);
    font-size: 28px;
    cursor: pointer;
}

.cart-body {
    flex: 1;
    overflow: auto;
    padding: 14px;
}

.cart-empty {
    padding: 70px 15px;
    color: var(--gray);
    text-align: center;
}

.cart-empty i {
    margin-bottom: 12px;
    color: var(--primary-blue);
    font-size: 42px;
}

.cart-empty p {
    margin-bottom: 5px;
    color: var(--dark-blue);
    font-weight: 800;
}

.cart-items {
    display: grid;
    gap: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5eaf1;
    border-radius: 10px;
}

.cart-item > img {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    background: #eef3fa;
}

.cart-item-no-image {
    opacity: .35;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-info h3 {
    overflow: hidden;
    color: var(--dark-blue);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-info small {
    display: block;
    color: var(--gray);
    font-size: 11px;
}

.cart-item-info strong {
    display: block;
    margin-top: 4px;
    color: var(--primary-red);
    font-size: 12px;
}

.cart-item-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cart-line-total {
    color: var(--dark-blue);
    font-size: 12px;
}

.cart-remove {
    border: 0;
    background: transparent;
    color: var(--primary-red);
    cursor: pointer;
}

.cart-summary {
    flex: 0 0 auto;
    padding: 14px 18px 18px;
    border-top: 1px solid #e5eaf1;
    background: #fff;
}

.cart-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
    color: var(--gray);
    font-size: 13px;
}

.cart-summary strong {
    color: var(--dark-blue);
}

.cart-summary .cart-total {
    margin: 12px 0;
    color: var(--dark-blue);
    font-size: 16px;
    font-weight: 800;
}

.cart-total strong {
    color: var(--primary-red);
    font-size: 19px;
}

.cart-checkout {
    padding: 12px;
    background: #25d366;
    font-size: 14px;
}

.cart-checkout:hover,
.cart-checkout:focus-visible {
    background: #159447;
}

.checkout-panel {
    padding: 4px 2px 18px;
}

.checkout-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.checkout-heading h3 {
    color: var(--dark-blue);
    font-size: 18px;
}

.checkout-heading h3 i {
    color: var(--primary-blue);
}

.checkout-back {
    border: 0;
    background: transparent;
    color: var(--primary-blue);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.order-invoice {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    background: #f8fafd;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    color: var(--primary-blue);
    font-size: 18px;
    font-weight: 800;
}

.invoice-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.invoice-title {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dce5f0;
    color: var(--dark-blue);
    font-weight: 800;
}

.invoice-title small {
    float: left;
    color: var(--gray);
    font-size: 11px;
    font-weight: 600;
}

.invoice-customer {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    color: #56657a;
    font-size: 12px;
}

.invoice-customer strong {
    color: var(--dark-blue);
}

.invoice-lines {
    width: 100%;
    margin: 14px 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.invoice-lines th,
.invoice-lines td {
    padding: 9px 7px;
    border-bottom: 1px solid #dce5f0;
    text-align: right;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.invoice-lines th {
    background: #eaf1f9;
    color: var(--dark-blue);
    font-size: 12px;
    font-weight: 800;
}

.invoice-lines td {
    color: #56657a;
    font-size: 12px;
}

.invoice-lines th:nth-child(1),
.invoice-lines td:nth-child(1) {
    width: 43%;
}

.invoice-lines th:nth-child(2),
.invoice-lines td:nth-child(2) {
    width: 14%;
    text-align: center;
}

.invoice-lines th:nth-child(3),
.invoice-lines td:nth-child(3),
.invoice-lines th:nth-child(4),
.invoice-lines td:nth-child(4) {
    width: 21.5%;
    text-align: left;
    direction: ltr;
}

.invoice-lines td small {
    display: block;
    margin-top: 2px;
    color: var(--gray);
    font-size: 10px;
    direction: ltr;
}

.invoice-total,
.invoice-grand-total {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 12px;
}

.invoice-total {
    margin-top: 6px;
    color: var(--gray);
}

.invoice-total strong {
    color: var(--dark-blue);
}

.invoice-grand-total {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #dce5f0;
    color: var(--dark-blue);
    font-size: 15px;
    font-weight: 800;
}

.invoice-grand-total strong {
    color: var(--primary-red);
    font-size: 17px;
}

.checkout-form {
    display: grid;
    gap: 11px;
}

.checkout-form label {
    display: grid;
    gap: 5px;
    color: var(--dark-blue);
    font-size: 13px;
    font-weight: 700;
}

.checkout-form input {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font: inherit;
}

.checkout-form input:focus {
    outline: 2px solid rgba(0, 87, 184, .18);
    border-color: var(--primary-blue);
}

.checkout-actions {
    display: grid;
    gap: 8px;
}

.invoice-print {
    width: 100%;
    padding: 11px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    background: #f5f8fc;
    color: var(--primary-blue);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.invoice-print:hover,
.invoice-print:focus-visible {
    border-color: var(--primary-blue);
    background: #eef4fb;
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    html,
    body {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        background: #fff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .cart-modal,
    .cart-modal * {
        visibility: visible !important;
    }

    .cart-modal {
        position: absolute;
        top: 0;
        right: 0;
        bottom: auto;
        left: 0;
        display: block !important;
        overflow: visible;
        width: 100%;
        min-height: 0;
        border: 0;
        box-shadow: none;
    }

    .cart-header,
    .cart-summary,
    .cart-body > :not(.checkout-panel),
    .checkout-heading,
    .checkout-form {
        display: none !important;
    }

    .cart-body {
        overflow: visible;
        padding: 0;
    }

    .checkout-panel {
        display: block !important;
        width: 100%;
        padding: 0;
    }

    .order-invoice {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        padding: 8mm;
        border: 1px solid #999;
        box-shadow: none;
        overflow: visible;
        page-break-inside: avoid;
        overflow-wrap: anywhere;
    }

    .invoice-brand {
        font-size: 24px;
    }

    .invoice-logo {
        width: 68px;
        height: 68px;
    }

    .invoice-title {
        font-size: 19px;
    }

    .invoice-customer {
        font-size: 15px;
    }

    .invoice-lines th {
        padding: 12px 9px;
        font-size: 14px;
    }

    .invoice-lines td {
        padding: 12px 9px;
        font-size: 14px;
    }

    .invoice-lines td small {
        font-size: 11px;
    }

    .invoice-total,
    .invoice-grand-total {
        font-size: 15px;
    }

    .invoice-grand-total {
        font-size: 19px;
    }

    .invoice-grand-total strong {
        font-size: 22px;
    }

    .invoice-title,
    .invoice-customer,
    .invoice-lines,
    .invoice-total,
    .invoice-grand-total {
        overflow-wrap: anywhere;
    }
}

.products-toast {
    position: fixed;
    right: 50%;
    bottom: 25px;
    z-index: 2300;
    max-width: calc(100% - 30px);
    padding: 11px 16px;
    border-radius: 8px;
    background: var(--dark-blue);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 15px);
    transition: .25s ease;
}

.products-toast.show {
    opacity: 1;
    transform: translate(50%, 0);
}

.load-more {
    display: block;
    margin: 28px auto 0;
}

.products-empty,
.products-loading {
    padding: 60px 18px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--gray);
    text-align: center;
}

.products-loading::before {
    content: '';
    display: block;
    width: 34px;
    height: 34px;
    margin: 0 auto 14px;
    border: 4px solid #d9e5f4;
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: productsSpin .8s linear infinite;
}

.filter-sheet {
    position: fixed;
    inset: auto 0 0;
    z-index: 1200;
    display: none;
    padding: 22px 5% 28px;
    border-radius: 20px 20px 0 0;
    background: #fff;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, .2);
}

.filter-sheet.active {
    display: block;
}

.filter-sheet h2 {
    margin-bottom: 14px;
    color: var(--dark-blue);
    font-size: 20px;
}

.filter-sheet .products-toolbar-fields {
    display: grid;
    gap: 10px;
}

.filter-sheet-close {
    position: absolute;
    top: 15px;
    left: 5%;
    border: 0;
    background: transparent;
    color: var(--gray);
    font-size: 24px;
}

.filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1190;
    display: none;
    background: rgba(0, 0, 0, .42);
}

.filter-backdrop.active {
    display: block;
}

@keyframes productsSpin {
    to { transform: rotate(360deg); }
}

@media (min-width: 700px) {
    .products-hero {
        min-height: 0;
        padding: 25px 0 28px;
    }

    .products-hero .container {
        position: static;
    }

    .products-hero-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        min-height: 0;
    }

    .products-hero-media {
        position: absolute;
        inset: 0 auto 0 0;
        display: block;
        width: 65%;
        height: 100%;
        min-height: 0;
        margin: 0;
        -webkit-mask-image: linear-gradient(90deg, #000 20%, #000 75%, transparent 100%);
        mask-image: linear-gradient(90deg, #000 20%, #000 50%, transparent 100%);
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
    }

    .products-toolbar-inner {
        grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) auto;
        align-items: center;
    }

    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
    }

    .cart-modal {
        inset: 7vh 12%;
    }
}

@media (min-width: 1000px) {
    .products-hero {
        padding: 48px 0 38px;
    }

    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 699px) {
    .products-hero-content {
        display: block;
    }

    .products-hero-media {
        display: block;
        height: 105px;
        margin: 14px -10% -28px;
    }

    .products-hero-media::after {
        background: linear-gradient(180deg, var(--dark-blue) 0%, rgba(0, 59, 122, .08) 42%, transparent 100%);
    }

    .products-toolbar {
        top: 90px;
    }

    .products-toolbar-inner > .products-filter,
    .products-toolbar-inner > .products-toggle {
        display: none;
    }

    .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }

    .products-page .header-buttons .btn {
        display: none;
    }
}
