/* ── E-Commerce Hero ── */
.ec-hero {
    min-height: 100svh;
    padding-top: var(--navbar-h);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;

    /* ── Crosshair dashed grid (SVG tile 80x80) from home hero ── */
    background-color: #F6F7FB;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3C!-- H dashed --%3E%3Cline x1='7' y1='0' x2='73' y2='0' stroke='%23BAD2FF' stroke-opacity='.4' stroke-width='1' stroke-dasharray='4 5'/%3E%3C!-- V dashed --%3E%3Cline x1='0' y1='7' x2='0' y2='73' stroke='%23BAD2FF' stroke-opacity='.4' stroke-width='1' stroke-dasharray='4 5'/%3E%3C!-- TL corner --%3E%3Cline x1='0' y1='0' x2='6' y2='0' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='0' y1='0' x2='0' y2='6' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C!-- TR corner --%3E%3Cline x1='74' y1='0' x2='80' y2='0' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='80' y1='0' x2='80' y2='6' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C!-- BL corner --%3E%3Cline x1='0' y1='74' x2='0' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='0' y1='80' x2='6' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C!-- BR corner --%3E%3Cline x1='74' y1='80' x2='80' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='80' y1='74' x2='80' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: 0 0;
    background-repeat: repeat;
}

/* Wave background stitched to bottom */
.ec-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../../images/page-ecommerce/bg-ecommerce.png') right bottom / max(100%, 600px) auto no-repeat;
    pointer-events: none;
    z-index: 0;
}

.ec-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
}

/* ── Center Text & Elements ── */
.ec-hero__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    max-width: 600px;
    /* Constrain width similarly to Figma */
}

.ec-hero__heading {
    font-size: clamp(3.2rem, 5vw, 4.6rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0;
}

.ec-hero__heading-accent {
    display: block;
    color: var(--color-primary);
}

.ec-hero__heading-main {
    display: block;
    color: var(--color-text-primary);
}

.ec-hero__desc {
    font-size: var(--font-base);
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin-top: var(--space-xs);
}

.ec-hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

.ec-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 60px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: background var(--transition-base),
        transform var(--transition-base),
        box-shadow var(--transition-base);
}

.ec-hero__cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(12, 94, 255, 0.25);
}

.ec-hero__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.ec-hero__link:hover {
    color: var(--color-primary);
}

.ec-hero__link svg {
    transition: transform 0.2s ease;
}

.ec-hero__link:hover svg {
    transform: translateX(4px);
}

/* Stats row */
.ec-hero__stats {
    display: flex;
    gap: var(--space-xl);
    padding-top: var(--space-lg);
    position: relative;
    z-index: 2;
    /* Ensures stats appear over hero image */
}

/* Add dividing lines between stats instead of top gradient */
.ec-hero__stats>div:not(:last-child) {
    position: relative;
    padding-right: var(--space-xl);
}

.ec-hero__stats>div:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 48px;
    background: rgba(12, 94, 255, 0.2);
}

.ec-hero__stats>div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ec-hero__stat-value {
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ec-hero__stat-value svg {
    color: #ffd700;
}

.ec-hero__stat-label {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* ── Right: 3D Illustration ── */
.ec-hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-hero__illustration {
    width: 100%;
    max-width: 62rem;
    height: auto;
    filter: drop-shadow(0 2rem 6rem rgba(12, 94, 255, 0.15));
    animation: ec-float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes ec-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Glow blob behind illustration */
.ec-hero__glow {
    position: absolute;
    width: 55%;
    height: 55%;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(12, 94, 255, 0.12) 0%, rgba(0, 212, 255, 0.06) 60%, transparent 100%);
    filter: blur(40px);
    pointer-events: none;
}

/* Floating badge */
.ec-hero__badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1rem 1.6rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    animation: ec-badge-bounce 4s ease-in-out infinite;
    z-index: 2;
}

.ec-hero__badge--orders {
    top: 18%;
    left: -2rem;
    animation-delay: 0s;
}

.ec-hero__badge--revenue {
    bottom: 22%;
    right: -1rem;
    animation-delay: 1.5s;
}

.ec-hero__badge-icon {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ec-hero__badge-icon--green {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.ec-hero__badge-icon--blue {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
}

.ec-hero__badge-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ec-hero__badge-value {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--color-text-primary);
}

.ec-hero__badge-sub {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

@keyframes ec-badge-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .ec-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ec-hero__desc {
        max-width: 100%;
    }

    .ec-hero__actions {
        justify-content: center;
    }

    .ec-hero__stats {
        justify-content: center;
    }

    .ec-hero__eyebrow {
        justify-content: center;
    }

    .ec-hero__visual {
        order: -1;
        max-width: 48rem;
        margin-inline: auto;
    }

    .ec-hero__badge--orders {
        left: 0;
    }

    .ec-hero__badge--revenue {
        right: 0;
    }
}

@media (max-width: 600px) {
    .ec-hero {
        min-height: 100svh;
    }

    .ec-hero__heading {
        font-size: clamp(3.2rem, 8vw, 4rem);
    }

    .ec-hero__badge {
        display: none;
    }

    .ec-hero__stats {
        gap: var(--space-lg);
    }
}

/* ── Features strip below hero ── */
.ec-features {
    padding: var(--space-4xl) var(--container-pad);
    background-color: #ffffff;
    /* Maintain grid background like hero section */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3C!-- H dashed --%3E%3Cline x1='7' y1='0' x2='73' y2='0' stroke='%23BAD2FF' stroke-opacity='.4' stroke-width='1' stroke-dasharray='4 5'/%3E%3C!-- V dashed --%3E%3Cline x1='0' y1='7' x2='0' y2='73' stroke='%23BAD2FF' stroke-opacity='.4' stroke-width='1' stroke-dasharray='4 5'/%3E%3C!-- TL corner --%3E%3Cline x1='0' y1='0' x2='6' y2='0' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='0' y1='0' x2='0' y2='6' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C!-- TR corner --%3E%3Cline x1='74' y1='0' x2='80' y2='0' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='80' y1='0' x2='80' y2='6' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C!-- BL corner --%3E%3Cline x1='0' y1='74' x2='0' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='0' y1='80' x2='6' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C!-- BR corner --%3E%3Cline x1='74' y1='80' x2='80' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3Cline x1='80' y1='74' x2='80' y2='80' stroke='%23BAD2FF' stroke-opacity='.25' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: 0 0;
    background-repeat: repeat;
    border-top: none;
}

.ec-features__header {
    text-align: center;
    max-width: 800px;
    margin-inline: auto;
    margin-bottom: var(--space-3xl);
}

.ec-features__heading {
    font-size: 2vw;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

.ec-features__heading-accent {
    color: var(--color-primary);
}

.ec-features__desc {
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.ec-features__inner {
    max-width: var(--container-max);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.ec-feature-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.ec-feature-card:hover {
    border-color: rgb(118 171 255 / 10%);
    box-shadow: 0 10px 40px rgb(157 179 255 / 47%);
    transform: translateY(-4px);
}

.ec-feature-card__visual {
    background: #F8F9FB;
    padding: 32px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 260px;
    flex-shrink: 0;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.ec-feature-card__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.ec-feature-card__content {
    padding: 24px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    flex: 1;
    /* Automatically stretches so all boxes align perfectly */
}

.ec-feature-card__title {
    font-size: 20px;
    font-weight: 700;
    color: #2b2b2b;
    margin: 0;
    line-height: 1.4;
}

.ec-feature-card__desc {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 900px) {
    .ec-features__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 600px) {
    .ec-features {
        padding: var(--space-xl) var(--container-pad);
    }
}