/* BMB Clothing Homepage Styles */

* {
    box-sizing: border-box;
}

.bmb-homepage {
    font-family: "Barlow", sans-serif;
}

/* Hero Section */
.bmb-hero {
    height: 70vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Hero Background Slideshow */
.bmb-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.4));
    z-index: 2;
}

.bmb-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    background: url('/wp-content/uploads/2024/05/01-scaled.jpg');
    background-size: cover;
    background-position: center;
    animation: heroSlideshow 15s infinite;
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 60px 60px 60px;
    display: flex;
    align-items: flex-end;
    z-index: 3;
    position: relative;
}

.hero-content {
    text-align: left;
    max-width: 500px;
}

.hero-content h1 {
    font-family: "Barlow", sans-serif;
    font-size: 3.5rem;
    font-weight: 300;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 3px;
    line-height: 1.1;
    animation: slideUpFade 1.2s ease-out 0.5s both;
}

.hero-content p {
    font-family: "Barlow", sans-serif;
    font-size: 1rem;
    margin: 15px 0 0 0;
    letter-spacing: 2px;
    font-weight: 300;
    text-transform: uppercase;
    animation: slideUpFade 1.2s ease-out 1s both;
}

/* Hero Slideshow Animation */
@keyframes heroSlideshow {
    0%, 30% {
        background-image: url('/wp-content/uploads/2024/05/01-scaled.jpg');
    }
    33%, 63% {
        background-image: url('/wp-content/uploads/2024/05/02-scaled.jpg');
    }
    66%, 96% {
        background-image: url('/wp-content/uploads/2024/05/03-scaled.jpg');
    }
    97%, 100% {
        background-image: url('/wp-content/uploads/2024/05/01-scaled.jpg');
    }
}

/* Text Animation - Slide Up with Fade */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Products Grid */
.bmb-latest-products {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    aspect-ratio: 2/3; /* Proporția 600x900 */
    overflow: hidden;
    border-radius: 8px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimizeQuality;
    -ms-interpolation-mode: bicubic;
}

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

.product-info {
    padding: 20px;
    text-align: center;
}

.product-info h3 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: #333;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #472ca8;
    margin-bottom: 15px;
}

.product-button {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.product-button:hover {
    background-color: #555;
    color: white;
}

/* Recommended Section */
.bmb-recommended {
    padding: 60px 0;
    background-color: white;
}

.bmb-recommended h2 {
    text-align: center;
    font-family: "Barlow", sans-serif;
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: 1px;
}

/* Carousel Wrapper */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.carousel-btn {
    background: #333;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-btn:hover {
    background: #555;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

/* Carousel Container */
.recommended-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.carousel-container {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
    will-change: transform;
}

.carousel-product {
    text-align: center;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    flex: 0 0 calc(25% - 15px); /* 4 produse vizibile: 25% minus gap adjustments */
    box-sizing: border-box;
    min-width: 0; /* Permite shrinking */
}

.carousel-product .product-image {
    aspect-ratio: 2/3; /* Proporția 600x900 */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-product .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-product h4 {
    font-size: 1rem;
    margin: 10px 0;
    color: #333;
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-product .product-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #472ca8;
    margin-bottom: 15px;
}

.carousel-button {
    background-color: #333;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.8rem;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: #555;
    color: white;
}

/* Best Seller Section */
.bmb-bestseller {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.bmb-bestseller h2 {
    text-align: center;
    font-family: "Barlow", sans-serif;
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: 1px;
}

/* News Section */
.bmb-news {
    padding: 60px 0;
    background-color: white;
}

.bmb-news h2 {
    text-align: center;
    font-family: "Barlow", sans-serif;
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: 1px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-product {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.news-product .product-image {
    aspect-ratio: 2/3; /* Proporția 600x900 */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.news-product h4 {
    font-size: 1rem;
    margin: 10px 0;
    color: #333;
}

.news-product .product-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #472ca8;
    margin-bottom: 15px;
}

.news-button {
    background-color: #333;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.8rem;
    margin-top: 10px;
}

.news-button:hover {
    background-color: #555;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Carusel responsive */
    .carousel-product {
        flex: 0 0 calc(50% - 10px); /* Pe tablet, 2 produse vizibile */
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-container {
        padding: 0 30px 40px 30px;
    }

    .bmb-hero {
        height: 60vh;
    }
}

/* Additional mobile optimization for medium-sized mobile devices */
@media (max-width: 600px) {
    .bmb-hero {
        height: 50vh !important;
        min-height: 400px !important;
    }

    .hero-container {
        padding: 0 25px 35px 25px !important;
    }

    .hero-content h1 {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
    }

    .hero-content p {
        font-size: 0.9rem !important;
        letter-spacing: 1.5px !important;
    }
}

@media (max-width: 480px) {
    /* Hero mobile optimization - much more compact */
    .bmb-hero {
        height: 40vh !important;
        min-height: 350px !important;
    }

    .hero-container {
        padding: 0 20px 30px 20px !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        letter-spacing: 1px !important;
        line-height: 1.2 !important;
    }

    .hero-content p {
        font-size: 0.85rem !important;
        margin: 10px 0 0 0 !important;
        letter-spacing: 1px !important;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .products-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* Carusel mobile */
    .carousel-wrapper {
        gap: 10px;
    }

    .carousel-product {
        flex: 0 0 calc(100% - 10px); /* Pe mobile, 1 produs vizibil */
        padding: 15px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-container {
        padding: 0 20px 30px 20px;
    }

    .bmb-hero {
        height: 50vh;
    }

    .hero-content {
        text-align: center;
    }
}