/* ===================================
   DYNAMIC HERO BANNER STYLES
   Centered Content for Mobile
   =================================== */

.dynamic-hero-slide {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 280px;
    max-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    display: none;
}

.dynamic-hero-slide.active {
    display: block;
}

.dynamic-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 12px;
}

.dynamic-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    gap: 25px;
}

.dynamic-hero-text {
    flex: 0 0 28%;
    color: white;
    animation: slideInLeft 0.8s ease-out;
}

.dynamic-hero-text .hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.dynamic-hero-text .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 500;
}

.dynamic-hero-text .btn {
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.dynamic-hero-text .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dynamic-hero-products {
    flex: 1;
    display: grid;
    gap: 12px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.dynamic-hero-products.layout-4-products {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
}

.hero-product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    animation: fadeInScale 0.6s ease-out both;
}

.hero-product-item:nth-child(1) {
    animation-delay: 0.3s;
}

.hero-product-item:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-product-item:nth-child(3) {
    animation-delay: 0.5s;
}

.hero-product-item:nth-child(4) {
    animation-delay: 0.6s;
}

.hero-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.hero-product-image {
    position: relative;
    width: 100%;
    height: 120px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.hero-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

.hero-product-item:hover .hero-product-image img {
    transform: scale(1.05);
}

.hero-product-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4757;
    color: white;
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.4);
}

.hero-product-info {
    padding: 8px 10px;
    border-top: 1px solid #f0f0f0;
}

.hero-product-info h4 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #2d3436;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-product-price {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.hero-product-price .price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-600);
}

.hero-product-price .old-price {
    font-size: 0.7rem;
    color: #999;
    text-decoration: line-through;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =====================================
   RESPONSIVE BREAKPOINTS
   ===================================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .dynamic-hero-content {
        padding: 25px 35px;
        min-height: 300px;
    }

    .dynamic-hero-text .hero-title {
        font-size: 2rem;
    }

    .hero-product-image {
        height: 130px;
    }
}

/* Desktop & Tablets (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .dynamic-hero-text {
        flex: 0 0 32%;
    }

    .dynamic-hero-products.layout-4-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-product-item:nth-child(4) {
        display: none;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .dynamic-hero-slide {
        min-height: 250px;
        max-height: 280px;
    }

    .dynamic-hero-content {
        padding: 20px 25px;
        gap: 20px;
        min-height: 250px;
    }

    .dynamic-hero-text {
        flex: 0 0 35%;
    }

    .dynamic-hero-text .hero-title {
        font-size: 1.5rem;
    }

    .dynamic-hero-text .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .dynamic-hero-text .btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .dynamic-hero-products.layout-4-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero-product-item:nth-child(3),
    .hero-product-item:nth-child(4) {
        display: none;
    }

    .hero-product-image {
        height: 100px;
    }

    .hero-product-info {
        padding: 6px 8px;
    }

    .hero-product-info h4 {
        font-size: 0.7rem;
    }

    .hero-product-price .price {
        font-size: 0.8rem;
    }
}

/* Large Mobile (576px - 767px) - CENTERED CONTENT */
@media (min-width: 576px) and (max-width: 767px) {
    .dynamic-hero-slide {
        min-height: 220px;
        max-height: 250px;
    }

    .dynamic-hero-content {
        padding: 15px 20px;
        gap: 15px;
        min-height: 220px;
        align-items: center;
        justify-content: center;
    }

    .dynamic-hero-text {
        flex: 0 0 45%;
        text-align: center;
    }

    .dynamic-hero-text .hero-title {
        font-size: 1.3rem;
    }

    .dynamic-hero-text .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .dynamic-hero-text .btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .dynamic-hero-products.layout-4-products {
        grid-template-columns: 1fr;
        gap: 0;
        align-self: center;
    }

    .hero-product-item:nth-child(2),
    .hero-product-item:nth-child(3),
    .hero-product-item:nth-child(4) {
        display: none;
    }

    .hero-product-image {
        height: 100px;
    }

    .hero-product-info {
        padding: 8px;
    }

    .hero-product-info h4 {
        font-size: 0.75rem;
    }

    .hero-product-price .price {
        font-size: 0.85rem;
    }
}

/* Small Mobile (up to 575px) - CENTERED CONTENT */
@media (max-width: 575px) {
    .dynamic-hero-slide {
        min-height: 200px;
        max-height: 230px;
        border-radius: 8px;
    }

    .dynamic-hero-content {
        padding: 12px 15px;
        gap: 12px;
        min-height: 200px;
        align-items: center;
        justify-content: center;
    }

    .dynamic-hero-text {
        flex: 0 0 50%;
        text-align: center;
    }

    .dynamic-hero-text .hero-title {
        font-size: 1.15rem;
        margin-bottom: 5px;
    }

    .dynamic-hero-text .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .dynamic-hero-text .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .dynamic-hero-products.layout-4-products {
        grid-template-columns: 1fr;
        gap: 0;
        align-self: center;
    }

    .hero-product-item:nth-child(2),
    .hero-product-item:nth-child(3),
    .hero-product-item:nth-child(4) {
        display: none;
    }

    .hero-product-image {
        height: 90px;
        padding: 6px;
    }

    .hero-product-info {
        padding: 6px 8px;
    }

    .hero-product-info h4 {
        font-size: 0.7rem;
    }

    .hero-product-price .price {
        font-size: 0.8rem;
    }

    .hero-product-price .old-price {
        display: none;
    }

    .hero-product-badge {
        padding: 2px 5px;
        font-size: 0.55rem;
    }
}

/* Extra Small Mobile (up to 400px) - CENTERED */
@media (max-width: 400px) {
    .dynamic-hero-slide {
        min-height: 180px;
        max-height: 210px;
    }

    .dynamic-hero-content {
        padding: 10px 12px;
        min-height: 180px;
    }

    .dynamic-hero-text .hero-title {
        font-size: 1rem;
    }

    .dynamic-hero-text .hero-subtitle {
        font-size: 0.7rem;
    }

    .dynamic-hero-text .btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .hero-product-image {
        height: 75px;
    }
}