﻿.product-bar {
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-container {
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    position: relative;
    margin:30px 0;
}
.product-bar-heading {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.MayYouLike {
    margin-top: 40px;
}
    /* Row container: Enable horizontal touch scrolling and hide scrollbar */
    .product-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

    .product-row::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari and Opera */
    }

/* Base Product Card styles (Very small screens: <250px, 1 card per row) */
.product-card {
    flex: 0 0 100%;
    background-color: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
        transform: translateY(-5px);
    }

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Default typography (assumes larger screens, will be overridden on smaller ones) */
.product-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 10px 0;
    color: #333;
    height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 8px;
    gap: 5px;
}

.price {
    font-size: 1rem;
    font-weight: 600;
    color: #d32f2f;
    margin: 0;
}

.original-price {
    font-size: 0.875rem;
    text-decoration: line-through;
    color: #888;
    margin: 0;
}

.discount {
    font-size: 0.875rem;
    color: #4caf50;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.product-colors {
    font-size: 12px;
    color: #555;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* Navigation styles */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-container:hover .navigation {
    opacity: 1;
    pointer-events: auto;
}

.navigation p {
    pointer-events: all;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    z-index: 5;
    border: none;
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

    .navigation p:hover {
        background-color: rgba(0, 0, 0, 0.9);
        transform: scale(1.1);
    }

/* Responsive Breakpoints for Card Layout */

/* For screens ≥250px: 2 cards per row (50% width each) */
@media (min-width: 250px) {
    .product-card {
        flex: 0 0 calc(50% - 10px);
    }
    
    .product-image {
        height: 180px;
    }
}

/* For screens ≥500px: 3 cards per row (≈33.33% width each) */
@media (min-width: 500px) {
    .product-card {
        flex: 0 0 calc(33.33% - 10px);
    }
    
    .product-image {
        height: 200px;
    }
}

/* For screens ≥768px: 4 cards per row (25% width each) */
@media (min-width: 768px) {
    .product-card {
        flex: 0 0 calc(25% - 15px);
    }
    
    .product-image {
        height: 220px;
    }
}

/* For screens ≥992px: 5 cards per row (20% width each) */
@media (min-width: 992px) {
    .product-card {
        flex: 0 0 calc(20% - 16px);
    }
}

/* For screens ≥1200px: 6 cards per row (≈16.66% width each) */
@media (min-width: 1200px) {
    .product-card {
        flex: 0 0 calc(16.66% - 17px);
    }
}

/* Responsive Typography Adjustments */

/* Very small screens (<250px): 1 card per row */
@media (max-width: 249px) {
    .product-title {
        height: 30px;
        font-size: 0.75rem;
        margin: 0.5rem 0;
    }

    .price {
        font-size: 0.75rem;
    }

    .original-price,
    .discount {
        font-size: 0.65rem;
    }

    .product-colors {
        font-size: 0.65rem;
        margin-top: 5px;
    }
}

/* Small screens (250px–499px): 2 cards per row */
@media (min-width: 250px) and (max-width: 499px) {
    .product-title {
        height: 30px;
        font-size: 0.8rem;
        margin: 0.55rem 0;
    }

    .price {
        font-size: 0.8rem;
    }

    .original-price,
    .discount {
        font-size: 0.7rem;
    }

    .product-colors {
        font-size: 0.7rem;
        margin-top: 6px;
    }
}

/* Medium-small screens (500px–767px): 3 cards per row */
@media (min-width: 500px) and (max-width: 767px) {
    .product-title {
        height: 32px;
        font-size: 0.85rem;
        margin: 0.6rem 0;
    }

    .price {
        font-size: 0.85rem;
    }

    .original-price,
    .discount {
        font-size: 0.75rem;
    }

    .product-colors {
        font-size: 0.75rem;
        margin-top: 7px;
    }
}

/* Medium screens (768px–991px): 4 cards per row */
@media (min-width: 768px) and (max-width: 991px) {
    .product-title {
        height: 34px;
        font-size: 0.9rem;
        margin: 0.625rem 0;
    }

    .price {
        font-size: 0.9rem;
    }

    .original-price,
    .discount {
        font-size: 0.8rem;
    }

    .product-colors {
        font-size: 0.8rem;
        margin-top: 8px;
    }
}

/* Larger medium screens (992px–1199px): 5 cards per row */
@media (min-width: 992px) and (max-width: 1199px) {
    .product-title {
        height: 36px;
        font-size: 0.95rem;
        margin: 0.65rem 0;
    }

    .price {
        font-size: 0.95rem;
    }

    .original-price,
    .discount {
        font-size: 0.85rem;
    }

    .product-colors {
        font-size: 0.85rem;
        margin-top: 9px;
    }
}

/* Extra large screens (≥1200px): 6 cards per row */
@media (min-width: 1200px) {
    .product-title {
        height: 38px;
        font-size: 1rem;
        margin: 0.625rem 0;
    }

    .price {
        font-size: 1rem;
    }

    .original-price,
    .discount {
        font-size: 0.875rem;
    }

    .product-colors {
        font-size: 12px;
        margin-top: 10px;
    }
}
