:root {
    --tw-polish-orange: #f4510b;
    --tw-polish-orange-dark: #d94300;
    --tw-polish-navy: #102d4b;
    --tw-polish-green: #168a42;
    --tw-polish-red: #c9302c;
    --tw-polish-line: #dfe5ec;
}

.tw-header-v2 {
    z-index: 10000;
    box-shadow: 0 5px 18px rgba(8, 37, 68, .07);
}

/*
 * Sticky header on larger screens only. Below 900px the header switches to its
 * stacked mobile layout (logo/actions + full-width search), which is tall
 * enough that pinning it would eat most of a phone viewport.
 */
@media (min-width: 901px) {
    html {
        scroll-padding-top: 172px;
    }

    .tw-header-v2 {
        position: sticky;
        top: 0;
    }

    /*
     * style.css applies `html, body { overflow-x: hidden }` between 767px and
     * 1200px. `overflow-x: hidden` turns the element into a scroll container,
     * which silently breaks viewport `position: sticky` for descendants — the
     * header stuck at >=1200px but not in that band. `clip` suppresses the same
     * horizontal overflow without creating a scroll container. Guarded by
     * @supports so older browsers keep the `hidden` behaviour.
     */
    @supports (overflow-x: clip) {
        html,
        body {
            overflow-x: clip;
        }
    }
}

.tw-header-action:focus-visible,
.tw-header-mobile-toggle:focus-visible,
.tw-header-search button:focus-visible,
.tw-header-category-trigger:focus-visible {
    outline: 3px solid rgba(244, 81, 11, .28);
    outline-offset: 2px;
}

.tw-home-page .product-head {
    float: none;
    display: block;
    width: 100%;
    margin: 0 0 20px;
    color: #fff;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
}

.tw-home-blogs {
    margin: 30px 0 34px;
}

.tw-home-page .tw-home-blogs__heading {
    margin-bottom: 14px;
    color: #fff;
    font-size: 20px;
}

.tw-home-blogs__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tw-home-blogs__card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e7ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(8, 37, 68, .055);
}

.tw-home-blogs__image {
    display: block;
    aspect-ratio: 1.95 / 1;
    overflow: hidden;
    background: #fff;
}

.tw-home-blogs__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

.tw-home-blogs__card:hover .tw-home-blogs__image img {
    transform: scale(1.025);
}

.tw-home-blogs__body {
    display: flex;
    min-height: 220px;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 20px;
}

.tw-home-blogs__title {
    margin: 0;
    color: var(--tw-polish-navy);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.28;
}

.tw-home-blogs__title a {
    color: inherit;
}

.tw-home-blogs__title a:hover,
.tw-home-blogs__title a:focus {
    color: var(--tw-polish-orange) !important;
    text-decoration: none;
}

.tw-home-blogs__excerpt {
    display: -webkit-box;
    margin: 14px 0 18px;
    overflow: hidden;
    color: #576575;
    font-size: 15px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tw-home-blogs__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
}

.tw-home-blogs__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #687687;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tw-home-blogs__meta span + span {
    padding-left: 12px;
    border-left: 1px solid #c5ced7;
}

.tw-home-blogs__meta i {
    margin-right: 4px;
    color: #52606d;
}

.tw-home-blogs__read-more {
    margin-left: auto;
    color: var(--tw-polish-orange);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.tw-home-blogs__read-more span {
    margin-left: 7px;
    font-size: 21px;
    line-height: 0;
    vertical-align: -2px;
}

.tw-home-blogs__read-more:hover,
.tw-home-blogs__read-more:focus {
    color: var(--tw-polish-orange-dark) !important;
    text-decoration: none;
}

.tw-home-page .blog_item {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}

.tw-home-page .blog_item .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.tw-home-page .blog_item .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-width: 112px;
    min-height: 40px;
    margin-top: auto;
    border-color: var(--tw-polish-orange);
    background: var(--tw-polish-orange);
    color: #fff;
    font-weight: 800;
}

.tw-home-page .blog_item .btn:hover,
.tw-home-page .blog_item .btn:focus {
    border-color: var(--tw-polish-orange-dark);
    background: var(--tw-polish-orange-dark);
    color: #fff;
}

@media (max-width: 900px) {
    .tw-home-blogs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tw-home-blogs__body {
        padding: 20px;
    }
}

.tw-footer-quote a:hover,
.tw-footer-quote a:focus {
    border-color: #fff;
    background: #fff;
    color: var(--tw-polish-orange-dark) !important;
    transform: translateY(-1px);
}

/*
 * Floating WhatsApp button.
 * The markup is `.wp_icon > a[style="position:fixed"]`, which the older
 * `body > a[href*="wa.me"]` selectors never matched, so the button computed to
 * `z-index: auto` and was painted under positioned footer blocks such as
 * `.tw-footer-help-copy` (z-index: 1). Sits below the header (10000) so the
 * mobile menu panel still covers it.
 */
.wp_icon,
.wp_icon a,
body > a[href*="wa.me"],
body > .whatsapp,
.whatsapp_float,
.whatsapp-icon {
    z-index: 9000 !important;
}

/*
 * Toast stack. `--tw-toast-top` is set from JS to the live header height so the
 * toasts clear the sticky header instead of landing on top of the search bar
 * (the region outranks the header at z-index 12000, so at the old flat
 * `top: 18px` they overlapped it and looked broken).
 */
.tw-ui-toast-region {
    position: fixed;
    z-index: 12000;
    top: var(--tw-toast-top, 18px);
    right: 18px;
    display: grid;
    width: min(370px, calc(100vw - 30px));
    gap: 10px;
    pointer-events: none;
}

.tw-ui-toast {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 26px;
    gap: 12px;
    align-items: start;
    padding: 14px 14px 14px 16px;
    border: 1px solid #e3e9f0;
    border-left: 4px solid var(--tw-polish-green);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 35, 55, .16);
    color: #263547;
    opacity: 0;
    pointer-events: auto;
    transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease;
}

.tw-ui-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tw-ui-toast.is-error {
    border-color: #e3e9f0;
    border-left-color: var(--tw-polish-red);
}

.tw-ui-toast__action {
    display: inline-block;
    margin-top: 7px;
    color: var(--tw-polish-orange) !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}

.tw-ui-toast__action:hover,
.tw-ui-toast__action:focus {
    text-decoration: underline !important;
}

.tw-ui-toast__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #eaf8ef;
    color: var(--tw-polish-green);
    font-size: 15px;
}

.tw-ui-toast.is-error .tw-ui-toast__icon {
    background: #fff0ef;
    color: var(--tw-polish-red);
}

/* Scoped to explicit classes: a bare `.tw-ui-toast span` also matches the icon
   span and, being more specific than `.tw-ui-toast__icon`, broke its centring. */
.tw-ui-toast__title,
.tw-ui-toast__msg {
    display: block;
}

.tw-ui-toast__title {
    color: var(--tw-polish-navy);
    font-size: 14px;
    line-height: 1.35;
}

.tw-ui-toast__msg {
    margin-top: 3px;
    color: #687588;
    font-size: 12.5px;
    line-height: 1.45;
}

.tw-ui-toast__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #97a2b4;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

.tw-ui-toast__close:hover,
.tw-ui-toast__close:focus {
    background: #f2f5f8;
    color: #3d4a5d;
}

.tw-collection-page .product-card-new {
    width: 100% !important;
    margin: 0;
    min-width: 0;
    float: none;
}

.tw-collection-page .tw-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.tw-collection-page .product-card-new-area {
    display: flex;
    height: 100%;
    min-height: 420px;
    flex-direction: column;
    overflow: hidden;
}

/* Suppress a legacy decorative strip that can leak through modern product cards. */
.tw-collection-page .product-card-new-area::before,
.tw-collection-page .product-card-new-area::after {
    display: none !important;
    content: none !important;
}

.tw-collection-page .pd_card_img img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.tw-home-page .products-list .pd_card_img,
.tw-home-page .products-list .pd_card_img > div,
.tw-home-page .products-list .pd_card_img a {
    display: grid;
    width: 100%;
    height: 180px;
    place-items: center;
}

.tw-home-page .products-list .pd_card_img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.tw-collection-page .pd_card_data,
.tw-collection-page .pd_card_price,
.tw-collection-page .pd_price,
.tw-collection-page .pd_price_item {
    min-width: 0;
}

.tw-collection-page .pd_card_data {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.tw-collection-page .pd_card_actions {
    margin-top: auto;
}

.tw-collection-page .pd_card_btn,
.tw-collection-page .out_btn {
    display: grid;
    width: 100%;
    gap: 8px;
}

.tw-collection-page .pd_card_actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin: 0;
    text-align: center;
}

/* The rule above gave card actions a real tap target, but only on the
   collection page. The same card appears on the home page and inside
   related-product carousels, where the quotation action inherited padding: 0
   and stood 19px tall - too small to hit reliably on a phone. Scoped to the
   quotation button so the primary cart button keeps its own metrics. */
.pd_card_btn button.quote_btn,
.out_btn button.quote_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 6px;
    text-align: center;
}

/* Price-on-request cards: "Get a Custom Quote" is the primary action (it reuses
   .cart_btn for the solid orange fill) and "Add to Quotations" becomes a real
   outlined secondary button rather than the plain text link used elsewhere. */
.pd_card_btn--rfq {
    display: grid;
    gap: 8px;
}

.pd_card_btn--rfq button.rfq_btn {
    gap: 7px;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 8px;
}

.pd_card_btn--rfq button.quote_btn {
    padding: 8px 10px;
    border: 1.5px solid #F96302;
    border-radius: 8px;
    background: #fff;
    color: #F96302;
    font-weight: 650;
}

.pd_card_btn--rfq button.quote_btn:hover {
    background: #fff4ec;
    text-decoration: none;
}

.pd_price_regular--rfq {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd_price_regular--rfq .rfq-label {
    margin: 0;
    font-weight: 700;
}

.rfq-info {
    display: inline-flex;
    color: #8a97a8;
    font-size: 13px;
    cursor: help;
}

.rfq-info:hover,
.rfq-info:focus-visible {
    color: #F96302;
    outline: none;
}

/* Keep the price-badge treatment off the RFQ row (it only applies to the
   discount "% Off" small on priced cards). */
.pd_price_regular--rfq small {
    background: transparent;
    padding: 0;
}

/* A sold-out listing must read as a clear status, never as a purchasable action. */
.product-card-new.is-out-of-stock {
    border-color: #d8dce2;
    background: #fafafa;
}

.product-card-new.is-out-of-stock .pd_top,
.product-card-new.is-out-of-stock .pd_card_img,
.product-card-new.is-out-of-stock .pd_card_data > :not(.pd_card_actions) {
    opacity: .62;
}

/* Keep the brand lockup predictable: it starts left unless a Bestseller
   badge occupies that edge, in which case the logo moves to the right. */
.product-card-new .pd_top {
    justify-content: flex-start;
}

.product-card-new .pd_top .pd_brand {
    margin-right: auto;
}

.product-card-new .pd_top .pd_badge + .pd_brand {
    margin-right: 0;
    margin-left: auto;
}

.product-card-new.is-out-of-stock .pd_card_img img {
    filter: grayscale(.32);
}

.product-card-new.is-out-of-stock .pd_card_actions {
    opacity: 1;
}

.product-card-new .out_btn .tw-out-of-stock,
.product-card-new .tw-out-of-stock {
    display: inline-flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 11px 0 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 14px;
    background: #dfdfdf;
    color: #626262;
    cursor: not-allowed;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    opacity: 1;
}

.product-card-new .tw-out-of-stock:hover,
.product-card-new .tw-out-of-stock:focus {
    border: 0;
    background: #dfdfdf;
    color: #626262;
    outline: 0;
}

.tw-collection-page .pagination {
    display: flex;
    clear: both;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 26px 0 4px;
    padding: 0;
}

.tw-collection-page .tw-pagination-nav {
    grid-column: 1 / -1;
    width: 100%;
}

.tw-collection-page .pagination > li > a,
.tw-collection-page .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid #d7e0e9;
    border-radius: 8px !important;
    background: #fff;
    color: var(--tw-polish-navy);
    font-weight: 800;
}

.tw-collection-page .pagination > .active > span,
.tw-collection-page .pagination > .active > a {
    border-color: var(--tw-polish-orange);
    background: var(--tw-polish-orange);
    color: #fff;
}

.tw-collection-page .pagination > .disabled > span,
.tw-collection-page .pagination > .disabled > a {
    opacity: .45;
    pointer-events: none;
}

.tw-content-page {
    background: #f7f9fb;
    padding: 30px 0 52px;
}

.tw-content-page__card {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 46px);
    border: 1px solid var(--tw-polish-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(16, 45, 75, .05);
}

.tw-content-page__card h1 {
    float: none;
    margin: 0 0 24px;
    color: var(--tw-polish-navy);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 850;
}

.tw-content-page__body {
    color: #485668;
    font-size: 15px;
    line-height: 1.85;
}

.tw-content-page__body p {
    margin: 0 0 18px;
}

.tw-testimonials-page .elfsight-app-cb58d083-f495-457e-95e8-560f60a764f6 {
    min-height: 280px;
    color: #263547;
    text-align: center;
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: 104px;
    }

    .tw-header-v2 {
        box-shadow: 0 3px 14px rgba(8, 37, 68, .08);
    }

    .tw-home-page .product-head {
        margin: 0 0 14px;
        padding: 0;
        border: 0;
        background: transparent !important;
        color: var(--tw-polish-navy) !important;
        font-size: 22px;
        letter-spacing: -.02em;
        text-align: left;
    }

    .tw-collection-page .product-card-new-area {
        min-height: 390px;
    }

    .tw-collection-page .tw-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tw-collection-page .pd_card_img img {
        height: 145px;
    }

    .tw-home-page .products-list .product-grid.product-card-new {
        width: calc(50% - 12px) !important;
        margin: 0 6px 18px !important;
        min-width: 0;
        float: left;
    }

    .tw-home-page .products-list .product-card-new-area {
        height: 100%;
        min-height: 408px;
    }

    .tw-home-page .products-list .pd_card_img img {
        width: 100%;
        height: 155px;
        object-fit: contain;
    }
}

@media (max-width: 767px) {
    .tw-ui-toast-region {
        top: 10px;
        right: 50%;
        transform: translateX(50%);
    }

    .tw-collection-page .pagination {
        gap: 5px;
        margin-top: 20px;
    }

    .tw-collection-page .pagination > li > a,
    .tw-collection-page .pagination > li > span {
        min-width: 36px;
        min-height: 36px;
        padding: 6px 9px;
        font-size: 12px;
    }

    .tw-collection-page .pagination__label {
        display: none;
    }

    .tw-collection-page .product-card-new-area {
        min-height: 370px;
    }

    .tw-collection-page .pd_card_actions button {
        min-height: 40px;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12px;
    }

    .tw-home-page .products-list .product-grid.product-card-new {
        width: calc(50% - 10px) !important;
        margin: 0 5px 14px !important;
    }

    .tw-content-page {
        padding: 16px 0 36px;
    }

    .tw-content-page__card {
        border-radius: 12px;
    }
}

@media (max-width: 600px) {
    .tw-home-blogs {
        margin: 24px 0 28px;
    }

    .tw-home-blogs__grid {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        padding: 2px 2px 12px;
        scroll-snap-type: x proximity;
    }

    .tw-home-blogs__card {
        flex: 0 0 min(84vw, 320px);
        scroll-snap-align: start;
    }

    .tw-home-blogs__body {
        min-height: 198px;
        padding: 18px;
    }

    .tw-home-blogs__title {
        font-size: 18px;
    }

    .tw-home-page .tw-home-blogs__heading {
        margin-bottom: 12px;
        font-size: 18px;
    }

    .tw-home-blogs__excerpt {
        margin: 11px 0 15px;
        font-size: 14px;
    }

    .tw-home-blogs__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .tw-home-blogs__read-more {
        margin-left: 0;
    }

    .tw-home-page .products-list .product-grid.product-card-new {
        width: 100% !important;
        margin: 0 0 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tw-ui-toast,
    .tw-home-page .blog_item .btn,
    .tw-footer-quote a {
        transition: none;
    }
}
