/* Custom Styles for XTO Rubber */
/* Custom Styles for XTO Rubber */

/* General Utilities */
.transition-all {
    transition: all 0.3s ease-in-out !important;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Feature Cards */
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

/* News Section */
.news-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding-left: 10px;
    cursor: pointer;
}
.news-item:hover .news-title {
    color: #ffc107 !important; /* Warning color */
}
.news-item:hover .bi-arrow-right {
    transform: translateX(5px);
    color: #ffc107 !important;
}
.news-main-card {
    transition: transform 0.3s ease;
}
.news-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

/* General Utilities */
.transition-all {
    transition: all 0.3s ease-in-out !important;
}

.hover-scale:hover {
    transform: scale(1.05);
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    min-width: 100% !important;
}

.floating-menu-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.floating-menu-wrapper.position-fixed {
    right: 15px !important;
}

.floating-menu {
    width: 65px;
    overflow: visible;
    min-width: 65px;
    z-index: 10;
}

.floating-menu-item {
    padding: 0.75rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.floating-menu-item i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.floating-menu-item:hover i {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.menu-popup {
    z-index: 5;
}

.floating-menu-item[data-type="phone"]:hover ~ .phone-popup,
.phone-popup:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-20px) translateY(-50%) !important;
}

.floating-menu-item[data-type="whatsapp"]:hover ~ .whatsapp-popup,
.whatsapp-popup:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-20px) translateY(-50%) !important;
}

.floating-menu-item[data-type="email"]:hover ~ .email-popup,
.email-popup:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-20px) translateY(-50%) !important;
}

/* Feature Cards */
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

/* News Section */
.news-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding-left: 10px;
    cursor: pointer;
}
.news-item:hover .news-title {
    color: #ffc107 !important; /* Warning color */
}
.news-item:hover .bi-arrow-right {
    transform: translateX(5px);
    color: #ffc107 !important;
}
.news-main-card {
    transition: transform 0.3s ease;
}
.news-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}
.product-img-wrap img {
    transition: transform 0.5s ease;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.1);
}

/* Video Showcase */

.video-card:hover .transition-transform {
    transform: scale(1.05);
}
.video-card:hover .play-btn {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    transform: scale(1.1);
}

/* Forms */
.custom-input {
    backdrop-filter: blur(5px);
}
.custom-input:focus {
    background-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25) !important;
    color: white !important;
}
.custom-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

#searchCollapse .form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #f28d22 !important;
}

/* Fluid Nav Gap for Desktop */
@media (min-width: 992px) {
    .dynamic-nav-gap {
        gap: clamp(0.5rem, 3vw, 4rem) !important;
    }
}
@media (max-width: 991px) {
    .dynamic-nav-gap {
        gap: 0.5rem;
    }
}

/* Custom Swiper Navigation for Product Category */
.custom-swiper-nav {
    width: 45px !important;
    height: 45px !important;
    background-color: #4e5665 !important;
    color: #fff !important;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1100 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
@media (max-width: 767.98px) {
    .swiper-button-prev.custom-swiper-nav { left: 12px !important; }
    .swiper-button-next.custom-swiper-nav { right: 12px !important; }
}
.custom-swiper-nav::after {
    font-size: 18px !important;
    font-weight: bold;
}
.swiper-button-prev.custom-swiper-nav {
    left: 0 !important;
}
.swiper-button-next.custom-swiper-nav {
    right: 0 !important;
}

/* Product Card Hover Effects */
.product-btn {
    background-color: #5d6771 !important;
}

.product-card-hover:hover .product-btn {
    background-color: #eeb03f !important;
}

.product-img {
    transform: scale(1);
    transition: transform 0.5s ease;
}

.product-card-hover:hover .product-img {
    transform: scale(1.08);
}

/* Footer Links */
.footer-link:hover {
    color: #ffc107 !important;
    opacity: 1 !important;
    padding-left: 5px;
}
.hover-white:hover {
    color: white !important;
    opacity: 1 !important;
    transform: translateY(-3px);
}

/* Swiper Customize */
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 1.2rem !important;
    font-weight: bold;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    background-color: #ffc107 !important;
    color: white !important;
}

/* Top Bar Links */
.social-icons a:hover {
    color: #ffc107 !important;
}

/* Fix: prevent mobile horizontal overflow from fixed floating widgets */
@media (max-width: 991.98px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        padding-right: 0 !important;
    }

    body {
        position: relative;
    }

    /* Hide the popup labels on small screens to avoid pushing layout */
    .menu-popup {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Keep fixed right widgets inside the viewport */
    .floating-menu-wrapper.position-fixed,
    .position-fixed.end-0.bottom-0.m-4,
    .position-fixed.end-0.bottom-0.mb-4,
    a.position-fixed.end-0.bottom-0.m-4,
    a.position-fixed.end-0.bottom-0.mb-4,
    .btn.position-fixed.bottom-0.end-0.m-4,
    .btn.position-fixed.bottom-0.end-0.mb-4 {
        right: 0 !important;
        left: auto !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-inline-end: 0 !important;
        transform: none !important;
    }

    .floating-menu-wrapper.position-fixed {
        right: 0 !important;
        margin-inline-end: 0 !important;
    }

    .floating-menu {
        width: 56px !important;
        min-width: 56px !important;
        overflow: hidden !important;
    }

    .floating-menu-wrapper {
        overflow: hidden !important;
    }

    .swiper-button-prev.custom-swiper-nav {
        left: 12px !important;
        right: auto !important;
    }

    .swiper-button-next.custom-swiper-nav {
        right: 12px !important;
        left: auto !important;
    }
}
