/* Products Section */
.products-division {
    padding: 40px 20px;
    background-color: #f8f8f8;
    position: relative;
}

.discount-banner {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    padding: 15px 30px;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    position: relative;
    margin-left: 30px;
    margin-bottom: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.discount-banner:before {
    content: '';
    position: absolute;
    top: 0;
    right: -15px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 15px 15px 0;
    border-color: transparent #cc0000 transparent transparent;
}

/* General Styles */
* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

a {
    text-decoration: none;
}

body {
    margin: 0px;
    padding: 0px;
}

/*===Product-slider=================================*/
.product-slider {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 90%;
    margin: 40px auto;
}

.slider-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.product-slider-heading {
    font-size: 28px;
    text-transform: uppercase;
    font-family: 'Open Sans', sans-serif;
    color: #313131;
}

/* Product Box */
.product-box {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-box-offer {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: white;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
}

/* Product Image */
.product-img-container {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* Maintain square aspect ratio */
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

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

.product-img-front {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Product Text */
.product-box-text {
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px); /* Adjust based on image height */
    padding: 15px 10px;
}

.product-category span {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3em; /* Ensures consistent 2-line height */
    line-height: 1.5;
    margin: 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title:hover {
    color: #ff0000;
}

/* Price and Buy Button */
.price-buy {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes section to bottom */
    padding-top: 10px;
    width: 100%;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
    margin-right: 8px;
}

.p-price b {
    color: #333;
    font-size: 18px;
}

.p-price sup {
    font-size: 14px;
    top: -0.5em;
}

.p-buy-btn {
    background: #ff0000;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.p-buy-btn:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

/* Swiper Customization */
.swiper {
    padding: 15px 30px !important;
}

.swiper-slide {
    height: auto !important;
}

.swiper-button-prev,
.swiper-button-next {
    background-color: #ff0000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: #cc0000;
    transform: scale(1.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px;
    font-weight: bold;
}

/* Mobile First Adjustments */
@media (max-width: 768px) {
    .products-division {
        padding: 20px 10px;
    }

    .discount-banner {
        font-size: 18px !important;
        padding: 10px 20px !important;
        margin-left: 15px !important;
        margin-bottom: 20px !important;
    }

    .discount-banner:before {
        right: -10px !important;
        border-width: 0 10px 10px 0 !important;
    }

    .product-box {
        margin: 0 5px;
    }

    .product-title {
        font-size: 14px !important;
        line-height: 1.2 !important;
        margin: 5px 0 !important;
    }

    .price-buy {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .p-buy-btn {
        width: 100%;
        padding: 6px 12px !important;
        font-size: 14px !important;
        text-align: center;
        order: 3;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 30px !important;
        height: 30px !important;
    }

    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px !important;
    }

    .product-box-offer {
        font-size: 12px !important;
        padding: 3px 8px !important;
        top: 5px;
        right: 5px;
    }

    .product-category span {
        font-size: 10px !important;
    }

    .swiper {
        padding: 15px 10px !important;
    }
}

/* Additional Small Screen Fixes */
@media (max-width: 480px) {
    .discount-banner {
        font-size: 16px !important;
        padding: 8px 15px !important;
    }

    .product-img-container {
        padding-top: 120% !important; /* Slightly taller images */
    }

    .p-buy-btn {
        font-size: 13px !important;
        padding: 5px 10px !important;
    }
}

/* Old Price & Product Price */
.old-price {
    text-decoration: line-through var(--red-color);
    font-size: 18px;
}

.product-price {
    font-size: 20px;
    padding-left: 20px;
}

.old-price-store {
    text-decoration: line-through var(--red-color);
    font-size: 15px;
}
