.tw-home-categories {
    margin: 28px 0 34px;
}

.tw-home-categories__title {
    margin: 0 0 20px;
    padding: 9px 18px;
    border: 0;
    background: linear-gradient(100deg, #f45111 0%, #ff6a00 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
}

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

.tw-home-categories__card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dfe4ea;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(8, 37, 68, .045);
    color: #102e51;
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tw-home-categories__card:hover,
.tw-home-categories__card:focus {
    border-color: #f36a26;
    box-shadow: 0 12px 24px rgba(8, 37, 68, .12);
    color: #102e51;
    text-decoration: none;
    transform: translateY(-3px);
}

.tw-home-categories__art {
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    padding: 24px;
    background: #fff;
}

.tw-home-categories__art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tw-home-categories__label {
    display: grid;
    min-height: 62px;
    place-items: center;
    padding: 11px 8px;
    border-top: 1px solid #edf0f3;
    background: #f8f9fa;
    color: #102e51;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

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

@media (max-width: 767px) {
    .tw-home-categories {
        margin: 20px 0 26px;
    }

    .tw-home-categories__title {
        margin-bottom: 12px;
        padding: 8px 12px;
        font-size: 14px;
    }

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

    .tw-home-categories__card {
        min-width: 0;
    }

    .tw-home-categories__art {
        aspect-ratio: 1 / 1;
        height: auto;
        padding: 14px;
    }

    .tw-home-categories__label {
        min-height: 46px;
        padding: 8px 6px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Go-live design pass — home page section headers, category icons, blog grid
   Raised Aug 27 – Sep 2: headers were three different treatments across
   sections and breakpoints; category icons sat off-centre; the "News & Blog"
   rail scrolled sideways on phones.
   ========================================================================== */

/* One header treatment everywhere: navy label on a hairline orange rule. */
.tw-home-page .product-head,
.tw-home-page .tw-home-blogs__heading,
.tw-home-page .tw-home-categories__title {
    margin: 0 0 18px;
    padding: 0 0 9px;
    border: 0;
    border-bottom: 3px solid #f4510b;
    border-radius: 0;
    background: transparent;
    color: #0f2744;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .tw-home-page .product-head,
    .tw-home-page .tw-home-blogs__heading,
    .tw-home-page .tw-home-categories__title {
        margin-bottom: 13px;
        padding: 0 0 7px;
        background: transparent;
        color: #0f2744;
        font-size: 15px;
    }
}

/* Top Categories: keep the cards and their visible artwork on one baseline. */
.tw-home-categories__art {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 20px;
}

.tw-home-categories__art img {
    width: auto;
    height: auto;
    max-width: 84%;
    max-height: 84%;
    margin: auto;
    object-fit: contain;
}

/*
 * The six approved home illustrations use identical portrait canvases, but
 * the drawing inside each canvas has different whitespace. These crop values
 * align the visible drawings, not merely the outer PNG rectangles.
 */
.tw-home-categories__image[data-category-art="soldering-station"],
.tw-home-categories__image[data-category-art="multimeter"],
.tw-home-categories__image[data-category-art="solder-wire"],
.tw-home-categories__image[data-category-art="pressure-washer"],
.tw-home-categories__image[data-category-art="electrical-screwdriver"],
.tw-home-categories__image[data-category-art="pliers-cutters-strippers"] {
    position: absolute;
    width: var(--tw-category-image-width);
    max-width: none;
    max-height: none;
    left: var(--tw-category-image-left);
    top: var(--tw-category-image-top);
}

.tw-home-categories__image[data-category-art="soldering-station"] {
    --tw-category-image-width: 68.7%;
    --tw-category-image-left: 14%;
    --tw-category-image-top: -4%;
}

.tw-home-categories__image[data-category-art="multimeter"] {
    --tw-category-image-width: 76%;
    --tw-category-image-left: 8.9%;
    --tw-category-image-top: -11.7%;
}

.tw-home-categories__image[data-category-art="solder-wire"] {
    --tw-category-image-width: 89.8%;
    --tw-category-image-left: 4.9%;
    --tw-category-image-top: -24.6%;
}

.tw-home-categories__image[data-category-art="pressure-washer"] {
    --tw-category-image-width: 79.8%;
    --tw-category-image-left: 4.8%;
    --tw-category-image-top: 5.3%;
}

.tw-home-categories__image[data-category-art="electrical-screwdriver"] {
    --tw-category-image-width: 88.8%;
    --tw-category-image-left: 1.9%;
    --tw-category-image-top: -2.6%;
}

.tw-home-categories__image[data-category-art="pliers-cutters-strippers"] {
    --tw-category-image-width: 68.5%;
    --tw-category-image-left: 22.3%;
    --tw-category-image-top: 10.5%;
}

@media (max-width: 767px) {
    .tw-home-categories__art { padding: 13px; }
    .tw-home-categories__art img { max-width: 80%; max-height: 80%; }
}

/* News & Blog — stack on phones, never scroll sideways. */
@media (max-width: 767px) {
    .tw-home-page .tw-home-blogs__grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }

    .tw-home-page .tw-home-blogs__card {
        flex: none;
        width: 100%;
    }
}
