/* Merchant Page Styles */

/* Hero Section */
.merchant-hero {
    padding: calc(72px + var(--space-3xl)) 0 var(--space-3xl);
    background: var(--color-bg);
    overflow: hidden;
}

.merchant-hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.merchant-hero-content {
    max-width: 600px;
}

.merchant-hero h1 {
    margin-bottom: var(--space-md);
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1.1;
}

.merchant-hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.merchant-hero-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-primary {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-accent);
    color: var(--color-bg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    color: var(--color-bg);
}

.btn-secondary {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--color-text);
}

.merchant-hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: var(--color-surface);
}

.merchant-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.15);
    /* Increased scale to crop edges and hide watermark */
    transform-origin: center;
}

/* Stats / Growth Section */
.merchant-stats {
    padding: var(--space-3xl) 0;
    background: var(--color-surface);
}

.merchant-stats .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

/* For mobile, we might want text first, but usually image first is okay or swap. 
   We'll use order property in media query if needed. */

.stats-image-wrapper {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.stats-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.stats-content h2 {
    margin-bottom: var(--space-lg);
    font-size: 2.5rem;
}

.stat-item {
    margin-bottom: var(--space-xl);
    border-left: 2px solid var(--color-border);
    padding-left: var(--space-lg);
    transition: border-color 0.3s;
}

.stat-item:hover {
    border-left-color: var(--color-accent);
}

.stat-item h3 {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
    font-family: var(--font-display);
}

.stat-item p {
    color: var(--color-text-muted);
}

/* Process Flow Section - Redesigned */
.merchant-flow {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
    overflow: hidden;
}

.flow-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

.flow-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-md);
}

.flow-header p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Timeline Container */
.flow-timeline {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto var(--space-3xl);
}

/* Step Cards */
.flow-step-card {
    flex: 1;
    max-width: 320px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.flow-step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border-color: var(--color-accent);
}

/* Highlighted Step (Middle) */
.flow-step-card.highlight {
    background: linear-gradient(135deg, rgba(214, 158, 46, 0.08) 0%, rgba(214, 158, 46, 0.02) 100%);
    border-color: var(--color-accent);
    transform: scale(1.02);
}

.flow-step-card.highlight:hover {
    transform: scale(1.02) translateY(-8px);
}

/* Step Number */
.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    color: #0d0d0d;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(214, 158, 46, 0.4);
}


.flow-step-card h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.flow-step-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.flow-step-card p strong {
    color: var(--color-accent);
    font-weight: 600;
}

/* Step Badge */
.step-badge {
    display: inline-block;
    margin-top: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background: rgba(214, 158, 46, 0.15);
    border: 1px solid var(--color-accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Connector Between Steps */
.flow-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    flex-shrink: 0;
    position: relative;
}

.connector-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-border), var(--color-accent), var(--color-border));
}

.connector-arrow {
    position: absolute;
    font-size: 1.5rem;
    color: var(--color-accent);
    font-weight: 300;
    animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(3px);
    }
}

/* Flow Benefits */
.flow-benefits {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
    max-width: 900px;
    margin: 0 auto;
}

.flow-benefit {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: rgba(214, 158, 46, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.flow-benefit:hover {
    border-color: var(--color-accent);
    background: rgba(214, 158, 46, 0.1);
    transform: translateY(-2px);
}


.flow-benefit span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Responsive */
@media (max-width: 900px) {
    .flow-timeline {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }

    .flow-step-card {
        max-width: 400px;
        width: 100%;
    }

    .flow-step-card.highlight {
        transform: none;
    }

    .flow-step-card.highlight:hover {
        transform: translateY(-8px);
    }

    .flow-connector {
        width: 40px;
        height: 40px;
        transform: rotate(90deg);
    }

    .flow-benefits {
        gap: var(--space-md);
    }

    .flow-benefit {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}




/* CTA Section - Enhanced */
.merchant-cta-section {
    padding: calc(var(--space-3xl) * 1.5) 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
    overflow: hidden;
}

.merchant-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(214, 158, 46, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.cta-text h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.cta-text>p {
    color: var(--color-text-muted);
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.cta-benefits {
    list-style: none;
    margin-bottom: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.cta-benefits li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 1.125rem;
    color: var(--color-text);
}

.cta-benefits svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    stroke: var(--color-accent);
    stroke-width: 3;
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn-primary-large {
    display: inline-block;
    padding: var(--space-lg) var(--space-2xl);
    background: var(--color-accent);
    color: #0d0d0d;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(214, 158, 46, 0.3);
}

.btn-primary-large:hover {
    background: #f4ce72;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(214, 158, 46, 0.4);
    color: #0d0d0d;
}

.btn-secondary-outline {
    display: inline-block;
    padding: var(--space-lg) var(--space-2xl);
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.btn-secondary-outline:hover {
    border-color: var(--color-accent);
    background: rgba(214, 158, 46, 0.05);
    transform: translateY(-2px);
}

/* CTA Visual Widget */
.cta-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-stats-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

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

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

.widget-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-lg);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-md);
}

.widget-metrics {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: rgba(214, 158, 46, 0.05);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.metric:hover {
    background: rgba(214, 158, 46, 0.1);
    transform: translateX(5px);
}

.metric-label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.widget-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

/* Responsive */
@media (max-width: 768px) {

    .merchant-hero .container,
    .merchant-stats .container,
    .flow-steps,
    .testimonial-card,
    .cta-content {
        grid-template-columns: 1fr;
    }

    .merchant-hero {
        text-align: center;
        padding-top: 100px;
    }

    .merchant-hero-actions {
        justify-content: center;
    }

    .merchant-hero-image,
    .stats-image-wrapper {
        margin-top: var(--space-lg);
    }

    .stat-item {
        border-left: none;
        border-top: 2px solid var(--color-border);
        padding-left: 0;
        padding-top: var(--space-md);
    }

    .testimonial-image {
        min-height: 300px;
    }



    .cta-text h2 {
        font-size: 2rem;
    }

    .cta-visual {
        margin-top: var(--space-xl);
    }

    .cta-stats-widget {
        max-width: 100%;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary-large,
    .btn-secondary-outline {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {}



/* Merchant Rewards / Benefits Section */
.merchant-rewards {
    padding: var(--space-3xl) 0;
    background: #ffffff;
    color: #0d0d0d;
}

.merchant-rewards h2 {
    margin-bottom: var(--space-sm);
    font-size: clamp(2rem, 4vw, 3rem);
    color: #0d0d0d;
}

.merchant-rewards-intro {
    max-width: 700px;
    font-size: 1.125rem;
    color: #525252;
    margin-bottom: var(--space-3xl);
    line-height: 1.6;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.reward-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    color: #0d0d0d;
}

.reward-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.reward-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: #0d0d0d;
}

.reward-item p {
    font-size: 0.95rem;
    color: #525252;
    line-height: 1.5;
    max-width: 280px;
}

@media (max-width: 1024px) {
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }
}

@media (max-width: 600px) {
    .rewards-grid {
        grid-template-columns: 1fr;
    }
}

/* Conversion Boosters Section */
.merchant-boosters {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
    /* Dark background to contrast with the white Rewards section */
    border-top: 1px solid var(--color-border);
}

.merchant-boosters h2 {
    text-align: center;
    margin-bottom: var(--space-3xl);
    font-size: clamp(2rem, 4vw, 3rem);
}

.boosters-intro {
    text-align: center;
    max-width: 600px;
    margin: -2rem auto var(--space-3xl);
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

.boosters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
}

.booster-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.booster-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--color-accent);
}

.booster-visual {
    height: 300px;
    background: #111;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--color-border);
}

.booster-visual img {
    width: 60%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s ease;
}

.booster-card:hover .booster-visual img {
    transform: scale(1.05);
}

.booster-content {
    padding: var(--space-lg);
}

.booster-content h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.booster-content p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .boosters-grid {
        grid-template-columns: 1fr;
    }

    .booster-visual {
        height: 240px;
    }
}

/* REFACTORED Conversion Boosters to match "Use NiaPay" style */

/* Background White & Typography override */
.merchant-boosters {
    background: #f5f5f5;
    color: #0d0d0d;
    border-top: none;
    /* The previous section (Rewards) is white too. 
       If we want them to blend, no border. 
       If we want separation, maybe margin or border. user said "make it also have a white background" */
}

.merchant-boosters h2 {
    color: #0d0d0d;
}

.boosters-intro {
    color: #525252;
}


/* New Flex Layout replacing Grid */
.boosters-grid {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    /* Reset grid styles */
    grid-template-columns: none;
}

/* Card Style imitating .channel */
.booster-card {
    /* Reset old card styles */
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;

    /* Flex behavior */
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0;

    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.booster-card:hover {
    flex: 1.5;
    transform: translateY(-4px);
    /* No border color change needed since border is gone */
    box-shadow: none;
    /* Shadow is on visual */
}

/* Visual Container imitating .channel-image */
.booster-visual {
    width: 100%;
    height: 480px;
    /* Taller to fit mobile mockups nicely */

    background: #f5f5f5;
    /* Light grey background for white section */
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    position: relative;
    border: none;
    /* Remove old border */

    /* Flex center for the image inside */
    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Lighter shadow for light theme */
    transition: box-shadow 0.4s ease;
}

.booster-card:hover .booster-visual {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.booster-visual img {
    /* Adjust image sizing for mockups */
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Fill the container to hide edges/watermarks */

    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.booster-card:hover .booster-visual img {
    transform: scale(1.05);
}

/* Content Styles */
.booster-content {
    padding: 0 var(--space-sm);
    /* Minimal padding unlike card style */
    text-align: left;
}

.booster-content h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: #0d0d0d;
    font-family: var(--font-display);
}

.booster-content p {
    font-size: 1rem;
    color: #525252;
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

/* Responsive */
@media (max-width: 900px) {
    .boosters-grid {
        flex-direction: column;
        gap: var(--space-2xl);
    }

    .booster-card {
        flex: none;
        width: 100%;
        transform: none !important;
        /* Disable hover lift on mobile */
    }

    .booster-visual {
        height: 380px;
    }

    .booster-card:hover .booster-visual img {
        transform: scale(1.02);
    }
}

/* REFACTORED Rewards Section - NiaPay Style */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.niapay-benefit-card {
    padding: var(--space-xl);
    border: 1px solid #e5e5e5;
    border-radius: var(--radius-lg);
    /* Slightly more rounded */
    background: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

/* Gold Accent Top Bar */
.niapay-benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.niapay-benefit-card:hover {
    border-color: transparent;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.niapay-benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.benefit-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    opacity: 0.8;
}

.niapay-benefit-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0d0d0d;
    margin: 0;
}

.niapay-benefit-card p {
    font-size: 1rem;
    color: #525252;
    line-height: 1.6;
}