/******************************************************
 *  KOVERTEK HOMEPAGE — CUSTOM CSS (SPECIFICITY BOOSTED)
 ******************************************************/

/* ---------------------------
    GLOBAL SAFE BASE
----------------------------- */
.home-custom img {
    max-width: 100%;
    height: auto;
}




/* ======================================================
   FIX: prevent image column collapse (final solution)
====================================================== */
/* ---------------------------------
   HERO GRID — MUST BE A GRID
---------------------------------- */
.home-custom .hero__grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: 1fr;
    gap: 30px;
    width: 100%;
}

/* ---------------------------------
   HERO COLUMNS — REQUIRED
---------------------------------- */
.home-custom .hero__col {
    height: 504px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}



.home-custom .hero__grid > .hero__col {
    min-width: 1px; /* keep grid track open */
}

.home-custom .hero__col--image {
    width: 100%; /* ensure column has width */
}

.home-custom .hero__col--image img {
    min-width: 100%; /* ensure image expands column width */
}






/* ---------------------------
    AREAS
----------------------------- */
.home-custom .areas {
    padding: 80px 0;
    background: #fff;
}

.home-custom .areas__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 40px;
}

.home-custom .areas__item {
    background: #f0f3f7;
    padding: 40px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: .3s ease;
}

.home-custom .areas__item:hover {
    background: #e6edf4;
    transform: translateY(-4px);
}

/* ---------------------------
    FEATURED PRODUCTS — FIXED
----------------------------- */

/* Force WooCommerce product list to behave */
.home-custom .featured ul.products {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Mobile fallback */
@media (max-width: 1200px) {
    .home-custom .featured ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
@media (max-width: 900px) {
    .home-custom .featured ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    .home-custom .featured ul.products {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* Product card */
.home-custom .featured ul.products li.product {
    background: #fff !important;
    padding: 20px !important;
    border-radius: 6px !important;
    border: 1px solid #e6e6e6 !important;
    box-shadow: none !important;
    transition: .25s ease;
}

.home-custom .featured ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

/* Woo forces margins—kill them */
.home-custom .featured ul.products li {
    margin: 0 !important;
}

/* ---------------------------
    BLOG (LATEST POSTS)
----------------------------- */
.home-custom .articles {
    background: #f3f5f7;
    padding: 80px 0;
}

.home-custom .articles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.home-custom .article-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e4e7eb;
    overflow: hidden;
    transition: .3s ease;
}

.home-custom .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.home-custom .article-card img {
    height: 210px;
    object-fit: cover;
}

/* ---------------------------
    BRAND STRIP
----------------------------- */
.home-custom .brands {
    padding: 50px 0;
    background: #fff;
    border-top: 1px solid #e2e6ea;
}

.home-custom .brands__row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.home-custom .brands__row img {
    max-height: 45px;
    opacity: .7;
    transition: .2s ease;
}

.home-custom .brands__row img:hover {
    opacity: 1;
}

/* ---------------------------
    BUTTONS
----------------------------- */
.home-custom .btn-primary {
    background: #003b7a !important;
    color: white !important;
}
.home-custom .btn-primary:hover {
    background: #0054aa !important;
}

.home-custom .btn-secondary {
    background: #e9eef5 !important;
    color: #003b7a !important;
}
.home-custom .btn-secondary:hover {
    background: #d7e2ef !important;
}

/* ---------------------------
    RESPONSIVE TWEAKS
----------------------------- */
@media (max-width: 960px) {
    .home-custom .hero__inner {
        flex-direction: column;
    }
}
/* FORCE 3 COLUMNS ON DESKTOP */
@media (min-width: 1025px) {
    .home-custom .hero__grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
        width: 100% !important;
    }

    .home-custom .hero__col {
        height: 504px !important;
    }
}


/* ============================================================
   Product category descriptions
   Replaces the earlier .term-description rules.
   Updated 27 Nov 2026.
   ============================================================ */

.term-description {
    margin-bottom: 30px;
}

/* Readable measure. Applies to text only, so the product grid
   underneath still uses the full container width. */
.term-description p,
.term-description ul,
.term-description ol {
    max-width: 72ch;
    font-size: 16px !important;
    line-height: 1.65 !important;
    margin: 0 0 14px !important;
}

/* Lead paragraph carries a little more weight than the rest. */
.term-description > p:first-child {
    font-size: 17px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

/* Subheadings must sit clearly below the H1, not compete with it. */
.term-description h2 {
    font-size: 19px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-transform: none;
    padding: 0 !important;
    margin: 26px 0 8px !important;
}

.term-description h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 18px 0 6px !important;
}

/* Links stay on brand but stop shouting. */
.term-description a {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.term-description a:hover {
    text-decoration-thickness: 2px;
}

/* Separate the copy from the product grid. */
.term-description + .woocommerce-result-count,
.woocommerce-result-count {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid #e6e6e6;
    font-size: 14px;
}

/* Read-more toggle, used on the Composites hub. */
.term-description details {
    margin: 4px 0 16px;
}
.term-description summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #e8761a;
    list-style: none;
    padding: 6px 0;
    display: inline-block;
}
.term-description summary:hover {
    text-decoration: underline;
}
.term-description summary::-webkit-details-marker {
    display: none;
}
.term-description summary::after {
    content: " \25BE";
}
.term-description details[open] summary::after {
    content: " \25B4";
}
.term-description details[open] > *:not(summary) {
    animation: ktkFade .18s ease-in;
}
@keyframes ktkFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Mobile */
@media (max-width: 767px) {
    .term-description p,
    .term-description > p:first-child {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    .term-description h2 {
        font-size: 17px !important;
        margin: 20px 0 6px !important;
    }
}
