/*
Theme Name: Betheme Child
Theme URI: https://themes.muffingroup.com/betheme
Author: Muffin group
Author URI: https://muffingroup.com
Description: Child Theme for Betheme
Template: betheme
Version: 2.0.2
*/

/* =========================================================
   Custom Homepage Base
   ========================================================= */
#custom-homepage-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px 20px;
    box-sizing: border-box;
}

/* Remove default spacing above homepage content */
body.page-template-template-custom-home #Content,
body.page-template-template-custom-home .sections_group,
body.page-template-template-custom-home .section_wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* =========================================================
   Slider Section
   ========================================================= */
#custom-homepage-wrapper .custom-slider {
    position: relative;
    width: 100vw !important;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-bottom: 50px;
    overflow: hidden;
    border-radius: 0;
}

#custom-homepage-wrapper .slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.45s ease-in-out;
}

#custom-homepage-wrapper .slide-item {
    min-width: 100%;
    box-sizing: border-box;
}

#custom-homepage-wrapper .slide-item img {
    display: block;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    max-height: none !important;
}

/* Slider navigation buttons */
#custom-homepage-wrapper .slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.25s ease, transform 0.25s ease;
}

#custom-homepage-wrapper .slider-nav-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

#custom-homepage-wrapper .slider-prev {
    left: 18px;
}

#custom-homepage-wrapper .slider-next {
    right: 18px;
}

/* Slider dots indicator */
#custom-homepage-wrapper .slider-dots {
    position: absolute;
    left: 0;
    bottom: 18px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

#custom-homepage-wrapper .slider-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin: 0 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

#custom-homepage-wrapper .slider-dot:hover,
#custom-homepage-wrapper .slider-dot.active {
    background: #fff;
    transform: scale(1.1);
}

/* =========================================================
   Category Boxes Section
   ========================================================= */
#custom-homepage-wrapper .category-boxes-section {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 40px 5vw;
    background-color: #ffffff;
    display: grid;
    grid-template-columns: repeat(8, minmax(110px, 160px));
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    box-sizing: border-box;
}

#custom-homepage-wrapper .cat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

#custom-homepage-wrapper .cat-box:hover {
    transform: translateY(-5px);
    border-color: #e2e2e2;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

#custom-homepage-wrapper .cat-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

#custom-homepage-wrapper .cat-box img {
    width: 85px !important;
    height: 85px !important;
    max-width: 85px !important;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

#custom-homepage-wrapper .cat-box:hover img {
    transform: scale(1.08);
}

#custom-homepage-wrapper .cat-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.2px;
}

/* =========================================================
   Product Tabs Section
   ========================================================= */
#custom-homepage-wrapper .product-tabs-section {
    margin: 60px 0;
}

#custom-homepage-wrapper .product-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    border-bottom: 2px solid #eaeaea;
}

#custom-homepage-wrapper .product-tabs-nav li {
    padding: 12px 24px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #888;
    position: relative;
    margin-bottom: -2px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

#custom-homepage-wrapper .product-tabs-nav li:hover {
    color: #333;
}

#custom-homepage-wrapper .product-tabs-nav li.active {
    color: #ff0000;
    border-bottom: 2px solid #ff0000;
}

#custom-homepage-wrapper .product-tab-pane {
    display: none;
    animation: fadeInTab 0.35s ease forwards;
}

#custom-homepage-wrapper .product-tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product grid layout */
#custom-homepage-wrapper .products-grid {
    display: flex;
    overflow: hidden;
    gap: 20px;
    flex-wrap: wrap;
}

#custom-homepage-wrapper .product-item {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    border-radius: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#custom-homepage-wrapper .product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

#custom-homepage-wrapper .product-link {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 14px;
}

#custom-homepage-wrapper .product-image {
    margin-bottom: 12px;
}

#custom-homepage-wrapper .product-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

#custom-homepage-wrapper .product-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
    color: #222;
    min-height: 45px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#custom-homepage-wrapper .product-price {
    font-size: 16px;
    font-weight: 700;
    color: #ff0000;
}

#custom-homepage-wrapper .product-price del {
    display: block;
    color: #000;
    font-weight: 500;
    font-size: 14px;
    text-decoration: line-through;
    margin-bottom: 4px;
}

#custom-homepage-wrapper .product-price ins {
    display: block;
    color: #ff0000;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

/* Hide all "Add to Cart" buttons */
#custom-homepage-wrapper .product-item .add_to_cart_button,
#custom-homepage-wrapper .product-item .added_to_cart,
#custom-homepage-wrapper .product-item .ajax_add_to_cart,
#custom-homepage-wrapper .product-item a.button[aria-label*="Add to cart"],
#custom-homepage-wrapper .product-item a.button:not([aria-label*="Read more"]) {
    display: none !important;
}

/* "Read More" button styling */
#custom-homepage-wrapper .product-item a.button[aria-label*="Read more"] {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: inherit !important;
    color: #ff0000 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    display: block !important;
    margin-top: 5px;
}

#custom-homepage-wrapper .product-item a.button[aria-label*="Read more"]:hover {
    background: none !important;
    color: #cc0000 !important;
}

/* =========================================================
   Banners Section
   ========================================================= */
#custom-homepage-wrapper .banners-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 50px;
}

#custom-homepage-wrapper .banner-full {
    width: 100%;
}

#custom-homepage-wrapper .banner-half {
    width: calc(50% - 10px);
}

#custom-homepage-wrapper .banner-third {
    width: calc(33.333% - 14px);
}

#custom-homepage-wrapper .banners-section img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 12px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#custom-homepage-wrapper .banners-section a:hover img {
    opacity: 0.88;
    transform: scale(1.01);
}

/* =========================================================
   Brand Logos Section
   ========================================================= */
#custom-homepage-wrapper .brands-section {
    margin: 60px 0;
    padding: 28px 0;
    border-top: 1px solid #eaeaea;
}

#custom-homepage-wrapper .brands-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    gap: 30px;
}

#custom-homepage-wrapper .brands-carousel::-webkit-scrollbar {
    height: 6px;
}

#custom-homepage-wrapper .brands-carousel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 999px;
}

#custom-homepage-wrapper .brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

#custom-homepage-wrapper .brand-item img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
    display: block;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: all 0.3s ease;
}

#custom-homepage-wrapper .brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-2px);
}

#custom-homepage-wrapper .brand-name-fallback {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

/* =========================================================
   Responsive Styles
   ========================================================= */
@media (max-width: 1200px) {
    #custom-homepage-wrapper .category-boxes-section {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
        gap: 15px;
        padding: 30px 5vw;
    }
}

@media (max-width: 1024px) {
    #custom-homepage-wrapper .category-boxes-section {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #custom-homepage-wrapper .banner-third {
        width: calc(50% - 10px);
    }

    #custom-homepage-wrapper .brand-item {
        width: 150px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    #custom-homepage-wrapper {
        padding: 0 12px 18px;
    }

    #custom-homepage-wrapper .category-boxes-section {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        padding: 20px 5vw;
    }

    #custom-homepage-wrapper .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #custom-homepage-wrapper .banner-half,
    #custom-homepage-wrapper .banner-third {
        width: 100%;
    }

    #custom-homepage-wrapper .product-tabs-nav {
        flex-wrap: wrap;
    }

    #custom-homepage-wrapper .product-tabs-nav li {
        font-size: 16px;
        padding: 10px 16px;
    }

    #custom-homepage-wrapper .brand-item {
        width: 140px;
        height: 92px;
    }
}

@media (max-width: 480px) {
    #custom-homepage-wrapper .category-boxes-section,
    #custom-homepage-wrapper .products-grid {
        grid-template-columns: 1fr;
    }

    #custom-homepage-wrapper .slider-prev {
        left: 10px;
    }

    #custom-homepage-wrapper .slider-next {
        right: 10px;
    }

    #custom-homepage-wrapper .cat-box img {
        width: 72px !important;
        height: 72px !important;
        max-width: 72px !important;
    }
}
