/**
 * Hero Carousel Styles
 * Split Layout (Text Left, Image Right). Brand tokens from theme.json.
 */

/* ==========================================================================
   Carousel Container
   ========================================================================== */

.narmada-hero-carousel-wrapper {
    margin: 0;
    padding: 0;
    /* Warm off-white → soft leaf tint, never pure white */
    background: linear-gradient(180deg, #e8f3e6 0%, #f2f4f3 100%);
}

.narmada-hero-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 320px;
    overflow: hidden;
    border-radius: 16px;
    /* Transparent background to show wrapper gradient */
    background: transparent;
}

/* ==========================================================================
   Slides Container
   ========================================================================== */

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 500ms cubic-bezier(0.2, 0.7, 0.2, 1),
                visibility 500ms,
                z-index 0s 500ms;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent; /* Transparent to show wrapper gradient */
    padding: 0 4rem;
    box-sizing: border-box;
    z-index: 1;
}

/* Slide backgrounds - transparent to show parent gradient */
.carousel-slide:nth-child(1) {
    background: transparent;
}

.carousel-slide:nth-child(2) {
    background: transparent;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* ==========================================================================
   Slide Content - Split Layout
   ========================================================================== */

.slide-content {
    flex: 0 0 50%;
    max-width: 500px;
    padding: 0;
    margin-left: 2rem;
    z-index: 2;
}

/* Product Image on Right */
.slide-image {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
}

.slide-image img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
}

/* Hero Tag (small label above title) */
.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--preset--color--secondary, #159E4C);
    margin-bottom: 0.875rem;
}

/* Main Title - Large Decorative Heading (Cardo serif from theme.json) */
.hero-title-main {
    font-family: var(--wp--preset--font-family--cardo, 'Cardo', Georgia, serif);
    font-size: 3.5rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0 0 1.25rem 0;
    color: var(--wp--preset--color--primary, #003B22);
}

/* Sale Box - Container for "Sale Up To" + badge */
.hero-sale-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    border-left: 2px solid var(--wp--preset--color--secondary, #159E4C);
    padding-left: 0.875rem;
    width: fit-content;
}

.sale-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2a25;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sale-badge {
    display: inline-block;
    color: var(--wp--preset--color--secondary, #159E4C);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-subtitle-text {
    font-size: 0.95rem;
    font-weight: 400;
    color: #1f2a25;
    margin: 0 0 1rem 0;
    line-height: 1.55;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--wp--preset--color--primary, #003B22);
    color: #fff;
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 18px -10px rgba(0, 59, 34, 0.35);
    transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1),
                box-shadow 180ms cubic-bezier(0.2, 0.7, 0.2, 1),
                background-color 180ms ease;
    margin-top: 0.5rem;
    min-height: 44px;
}

.hero-cta-btn:hover {
    background-color: #00502f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 12px 22px -10px rgba(0, 59, 34, 0.4);
}

.hero-cta-btn:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary, #159E4C);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-cta-btn,
    .hero-cta-btn:hover {
        transition: none;
        transform: none;
    }
}

/* ==========================================================================
   Rating Stars
   ========================================================================== */

.hero-rating {
    color: #f5a623;
    font-size: 1.25rem;
    letter-spacing: 2px;
    margin-top: 1rem;
}

/* ==========================================================================
   Navigation Dots
   ========================================================================== */

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 59, 34, 0.18);
    border: none;
    cursor: pointer;
    transition: background-color 220ms ease, transform 220ms ease, width 220ms ease;
    padding: 0;
    min-width: 10px;
}

.carousel-dot:hover {
    background-color: rgba(0, 59, 34, 0.4);
}

.carousel-dot:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary, #159E4C);
    outline-offset: 3px;
}

.carousel-dot.active {
    background-color: var(--wp--preset--color--primary, #003B22);
    width: 28px;
    border-radius: 999px;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 59, 34, 0.08);
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wp--preset--color--primary, #003B22);
    box-shadow: 0 8px 24px -12px rgba(0, 59, 34, 0.25);
}

.carousel-arrow:hover {
    background-color: var(--wp--preset--color--primary, #003B22);
    color: #fff;
    transform: translateY(-50%) scale(1.04);
}

.carousel-arrow:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary, #159E4C);
    outline-offset: 3px;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .narmada-hero-carousel {
        height: 300px;
        margin: 0 1rem;
    }

    .carousel-slide {
        padding: 0 2rem;
    }

    .hero-title-main {
        font-size: 3rem;
    }

    .slide-image img {
        max-height: 260px;
    }
}

@media (max-width: 992px) {
    .narmada-hero-carousel {
        height: 280px;
    }

    .slide-content {
        flex: 0 0 55%;
        max-width: 450px;
    }

    .slide-image {
        flex: 0 0 40%;
    }

    .hero-title-main {
        font-size: 2.5rem;
    }

    .slide-image img {
        max-height: 240px;
    }
}

@media (max-width: 768px) {
    .narmada-hero-carousel {
        height: 560px;
        border-radius: 12px;
    }

    .carousel-slide {
        flex-direction: column;
        padding: 2rem 1.5rem 3.25rem;
        justify-content: center;
        text-align: center;
        gap: 1rem;
    }

    .slide-content {
        flex: none;
        max-width: 100%;
        order: 2;
        margin-left: 0;
    }

    .slide-image {
        flex: none;
        order: 1;
        height: auto;
        padding: 0.5rem;
    }

    .slide-image img {
        max-height: 200px;
    }

    .hero-sale-box {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-title-main {
        font-size: 2.25rem;
    }

    .carousel-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }
}

@media (max-width: 576px) {
    .narmada-hero-carousel {
        height: 540px;
        margin: 0 0.5rem;
    }

    .carousel-slide {
        padding: 1.5rem 1.25rem 3rem;
    }

    .slide-image img {
        max-height: 180px;
    }

    .hero-title-main {
        font-size: 2rem;
    }

    .hero-subtitle-text {
        font-size: 0.875rem;
    }

    .hero-cta-btn {
        padding: 0.85rem 1.6rem;
        font-size: 0.9rem;
    }

    .carousel-dots {
        bottom: 14px;
    }
}

/* ==========================================================================
   Animation Keyframes for Extra Polish
   ========================================================================== */

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-slide.active .slide-content {
    animation: fadeInUp 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.carousel-slide.active .slide-image {
    animation: fadeInRight 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 80ms both;
}

@media (prefers-reduced-motion: reduce) {
    .carousel-slide,
    .carousel-slide.active .slide-content,
    .carousel-slide.active .slide-image {
        animation: none !important;
        transition: opacity 0s, visibility 0s;
    }
}
