/* Plugin: Custom Product Grid - styles (kept original hover animation + robustness fixes) */

.product-section {
    padding: 3rem 0 1rem !important;
}

.product-section .main-heading {margin-bottom:4rem;}
.product-section .nav-tabs{ border:0 }

.product-section .nav-tabs button{font-size:16px;padding: 10px 30px;min-width: 190px;color: #58595B;border: 0;border-bottom:2px solid #D1D3D4 !important;font-family: 'ITC CE BOOK';}
.product-section .nav-tabs button.active{ color:#d7a737;border-color:#d7a737 !important;}

.product-section figure {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden; /* ensure hover area clipped properly */
}

.product-section figure > img { margin: 0 auto; width: 100%; display:block; }

/* Title (normal view) below the image */
.product-section figure span{
    display:block;
    text-align:center;
    color: #000;
    font-size:16px;
    margin-top:1.2rem;
    font-family: "Roboto", Sans-serif;
}

/* figcaption (hover box) */
.product-section figure figcaption{
    background: #043b48;
    border-radius:12px;
    padding: 1.5rem;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    width: 100%;
    transform: translateY(100%); /* initially hidden */
    transition: 1s;
    opacity: 0;
    visibility: hidden;
    z-index: 3; /* ensure appears above image */
    pointer-events: auto;
    color: #fff;
    box-sizing: border-box;
}

.product-section figure figcaption img{
    display:block;
    margin-bottom: 1rem;
    max-width: 120px;
    height: auto;
}
.product-section figure figcaption span{
    color:#fff;
    text-align:left;
    margin: 1rem 0;
}
.product-section figure figcaption p{
    color: rgba(255,255,255,0.65);
    font-family: "Roboto", Sans-serif;
    margin: 0;
}

/* arrow button inside hover */
.product-section figure figcaption .arrow-btn{
    margin-top: 3.25rem;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
}
.product-section figure figcaption .arrow-btn span { margin:0 }

/* Hover trigger */
.product-section figure:hover figcaption{
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Responsive - on small screens show caption below */
@media only screen and (max-width: 991px) {
    .product-section figure figcaption {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: none;
        border-radius: 0;
        bottom: 0;
        text-align: center;
        background: transparent;
        padding: 1.5rem 0;
    }
    .product-section figure figcaption span {
        color: #000;
        text-align: center;
    }
    .product-section figure figcaption p {
        color: rgba(0,0,0,0.65);
        font-family: "Roboto", Sans-serif;
    }
    .product-section figure > span {
        display: none;
    }
    .product-section figure figcaption img{
        display:none;
    }
    .product-section figure figcaption .arrow-btn {
        margin-top: 0;
        justify-content: center;
        color: #000;
        padding-left: 10px;
    }
}

/* Minor accessibility/visual fixes for link wrapping */
.product-section .row > div > a { display:block; color: inherit; text-decoration: none; }

/* Carousel wrapper with space at top */
.cpg-carousel-wrapper {
    position: relative;
    padding-top: 60px; /* space for arrows */
}

/* Slick arrows styled */
.cpg-carousel-wrapper .slick-prev,
.cpg-carousel-wrapper .slick-next {
    width: 40px;
    height: 40px;
    background-color: #043B48 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    position: absolute;
    top: -50px; /* place above carousel */
}

/* Hover effect */
.cpg-carousel-wrapper .slick-prev:hover,
.cpg-carousel-wrapper .slick-next:hover {
    background-color: #065866 !important;
}

/* Positioning */
.cpg-carousel-wrapper .slick-prev { right: 60px; left: auto; }
.cpg-carousel-wrapper .slick-next { right: 10px; }


