/* =========================================================
   ePostcode product pages — redesign + mobile-first
   Covers: postcode-lookup, address-validation, data-cleansing
   (dd-* and ob-* variants)
   ========================================================= */

/* ---------- Shared section rhythm ---------- */
.dd-features,
.dd-technical,
.dd-pricing,
.dd-api,
.dd-cta,
.ob-features,
.ob-pricing,
.ob-cta,
.section.low-price-guarantee,
.low-price-guarantee,
#intelligent-credit.section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.dd-features > .container,
.dd-technical > .container,
.dd-pricing > .container,
.dd-api > .container,
.ob-features > .container,
.ob-pricing > .container,
#intelligent-credit > .container,
.low-price-guarantee > .container {
    max-width: min(1200px, 100%);
    padding-left: var(--page-gutter, clamp(16px, 3vw, 28px));
    padding-right: var(--page-gutter, clamp(16px, 3vw, 28px));
}

.dd-features .section-header,
.dd-technical .section-header,
.dd-pricing .section-header,
.dd-api .section-header,
.ob-features .section-header,
.ob-pricing .section-header,
#intelligent-credit .section-header {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.25rem;
}

.dd-features .section-title,
.dd-technical .section-title,
.dd-pricing .section-title,
.dd-api .section-title,
.ob-features .section-title,
.ob-pricing .section-title {
    font-size: clamp(1.65rem, 3.5vw, 2.25rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--secondary-color, #1A1A1A);
}

.dd-features .section-subtitle,
.dd-technical .section-subtitle,
.dd-pricing .section-subtitle,
.dd-api .section-subtitle,
.ob-features .section-subtitle,
.ob-pricing .section-subtitle {
    font-size: clamp(0.98rem, 2vw, 1.1rem);
    color: var(--text-light, #666);
    line-height: 1.65;
}

.product-section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #EC2E5E 0%, #8B1538 100%);
    color: #fff;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 18px rgba(236, 46, 94, 0.2);
}

.section-header .product-section-badge {
    display: inline-block;
}

.section-header h2.section-title {
    margin-top: 0.15rem;
}

/* ---------- Heroes ---------- */
.dd-hero.product-hero,
.ob-hero.product-hero {
    min-height: auto;
    padding: clamp(6.5rem, 12vw, 8.5rem) 0 clamp(3rem, 6vw, 4.5rem);
    display: flex;
    align-items: center;
}

.dd-hero.product-hero .container,
.ob-hero.product-hero .container {
    width: 100%;
    max-width: min(1200px, 100%);
    position: relative;
    z-index: 2;
}

.product-hero-content.dd-hero-content,
.product-hero-content.ob-hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
}

.product-hero .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
    backdrop-filter: blur(8px);
}

.product-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.product-hero .lead {
    font-size: clamp(1rem, 2.2vw, 1.2rem) !important;
    line-height: 1.65 !important;
    max-width: 38rem;
    margin-bottom: 1.35rem !important;
    opacity: 0.96;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

/* Horizontal pills instead of tall stack */
.product-hero .hero-features {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.55rem !important;
    margin-bottom: 1.5rem !important;
    max-width: none;
}

.product-hero .hero-feature-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.product-hero .hero-feature-item i {
    color: #ff8fab !important;
    font-size: 0.95rem !important;
}

.product-hero .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-hero .hero-buttons .btn {
    min-height: 48px;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.product-hero .hero-buttons .btn-primary {
    background: #EC2E5E;
    color: #fff;
    border: 2px solid #EC2E5E;
    box-shadow: 0 8px 22px rgba(236, 46, 94, 0.35);
}

.product-hero .hero-buttons .btn-primary:hover {
    background: #D11E4A;
    border-color: #D11E4A;
    color: #fff;
    transform: translateY(-2px);
}

.product-hero .hero-buttons .btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.product-hero .hero-buttons .btn-secondary:hover {
    background: #fff;
    color: #EC2E5E;
}

/* Hero side panel (replaces heavy hex stack on small screens) */
.product-hero-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-hero-card {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 1.35rem 1.35rem 1.15rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    color: #fff;
}

.product-hero-card .phc-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.65rem;
}

.product-hero-card .phc-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 0.55rem;
}

/* Prefer .phc-icon wrapper; keep legacy bare <i> usable */
.product-hero-card .phc-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #EC2E5E, #8B1538);
    color: #fff;
    flex-shrink: 0;
}

.product-hero-card .phc-icon i,
.product-hero-card .phc-icon .fas {
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.product-hero-card .phc-row > i {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #EC2E5E, #8B1538);
    color: #fff !important;
    flex-shrink: 0;
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

.product-hero-card .phc-row > i::before {
    color: #fff !important;
}

.product-hero-card .phc-row strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.product-hero-card .phc-row span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.85;
}

.product-hero-card .phc-foot {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    opacity: 0.85;
    text-align: center;
}

/* Hide old decorative stacks when panel present */
.product-hero .hexagon-stack,
.product-hero .bank-icons {
    display: none !important;
}

/* ---------- Feature / technical cards ---------- */
.dd-features .features-grid,
.ob-features .features-grid,
.dd-technical .technical-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem !important;
}

.dd-features .features-grid > *,
.ob-features .features-grid > *,
.dd-technical .technical-grid > * {
    flex: 1 1 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    min-width: min(260px, 100%);
    box-sizing: border-box;
}

.dd-features .feature-card,
.ob-features .feature-card,
.dd-technical .technical-card,
.dd-technical .technical-item {
    background: #fff;
    border: 1px solid rgba(18, 19, 26, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.05);
    padding: 1.5rem 1.35rem !important;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dd-features .feature-card:hover,
.ob-features .feature-card:hover,
.dd-technical .technical-card:hover {
    transform: translateY(-4px);
    border-color: rgba(236, 46, 94, 0.28);
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.1);
}

.dd-features .feature-card-icon,
.ob-features .feature-card-icon,
.dd-technical .technical-icon,
.dd-technical .tech-icon,
.technical-card .technical-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px;
    min-height: 56px;
    border-radius: 14px !important;
    clip-path: none !important;
    background: linear-gradient(145deg, #EC2E5E 0%, #8B1538 100%) !important;
    font-size: 1.35rem !important;
    margin-bottom: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    line-height: 1 !important;
    flex-shrink: 0;
}

.dd-features .feature-card-icon i,
.ob-features .feature-card-icon i,
.dd-technical .technical-icon i,
.dd-technical .tech-icon i,
.technical-card .technical-icon i {
    color: #fff !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
    display: inline-block;
    width: auto;
    height: auto;
}

.dd-features .feature-card h3,
.ob-features .feature-card h3,
.dd-technical .technical-card h3 {
    font-size: 1.15rem !important;
    margin-bottom: 0.55rem !important;
    line-height: 1.3;
}

.dd-features .feature-card p,
.ob-features .feature-card p,
.dd-technical .technical-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.dd-features .feature-list li {
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

/* ---------- Pricing calculator mobile ---------- */
.dd-pricing .pricing-calculator,
.ob-pricing .pricing-calculator,
.pricing-calculator {
    max-width: min(1040px, 100%) !important;
    margin-top: 1.5rem !important;
    border-radius: 18px !important;
}

.pricing-calculator .calculator-header {
    padding: clamp(1.35rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) !important;
}

.pricing-calculator .calculator-header h3 {
    font-size: clamp(1.35rem, 3vw, 2rem) !important;
}

.pricing-calculator .calculator-controls {
    padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) !important;
}

.pricing-calculator .pricing-body {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.25rem !important;
    padding: clamp(1.15rem, 3vw, 2rem) !important;
}

.pricing-calculator .result-card {
    padding: 1.15rem 1.25rem !important;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.pricing-calculator .result-value {
    font-size: clamp(1.6rem, 4vw, 2.4rem) !important;
    min-width: 0 !important;
    text-align: left !important;
}

.pricing-calculator .result-card.highlighted {
    padding: 1.25rem 1.35rem !important;
}

.pricing-calculator .slider-label {
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
}

.pricing-calculator .slider-label strong {
    font-size: clamp(1.35rem, 3vw, 1.85rem) !important;
    min-width: 0 !important;
    text-align: left !important;
}

/* ---------- Intelligent credit / guarantee ---------- */
#intelligent-credit > .container {
    max-width: min(1280px, 100%);
}

#intelligent-credit .container--wide {
    max-width: min(1280px, 100%);
}

.low-price-guarantee .container {
    max-width: min(1100px, 100%);
}

.low-price-guarantee {
    overflow: hidden;
}

/* ---------- API section ---------- */
.dd-api .api-content,
.dd-api .code-block,
.dd-api pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dd-api pre,
.dd-api code {
    word-break: normal;
    white-space: pre;
    font-size: 0.85rem;
}

/* ---------- CTA ---------- */
.dd-cta,
.ob-cta {
    background: linear-gradient(135deg, #EC2E5E 0%, #8B1538 100%) !important;
}

.dd-cta .cta-buttons,
.ob-cta .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.dd-cta .cta-buttons .btn,
.ob-cta .cta-buttons .btn {
    min-height: 48px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .product-hero-content.dd-hero-content,
    .product-hero-content.ob-hero-content {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        text-align: left;
    }

    .product-hero-panel {
        order: -1;
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }

    .product-hero .lead {
        max-width: none;
    }

    .dd-features .features-grid > *,
    .ob-features .features-grid > *,
    .dd-technical .technical-grid > * {
        flex: 1 1 calc(50% - 0.85rem);
        max-width: calc(50% - 0.85rem);
    }

    .pricing-calculator .pricing-body {
        grid-template-columns: 1fr !important;
    }
}

/* Override aggressive 968px single-column from legacy CSS */
@media (max-width: 968px) {
    .dd-features .features-grid,
    .dd-technical .technical-grid,
    .ob-features .features-grid {
        grid-template-columns: unset !important;
    }

    .dd-features .features-grid > *,
    .ob-features .features-grid > *,
    .dd-technical .technical-grid > * {
        flex: 1 1 calc(50% - 0.85rem) !important;
        max-width: calc(50% - 0.85rem) !important;
    }

    .dd-hero-visual.product-hero-panel,
    .ob-hero-visual.product-hero-panel {
        margin-top: 0 !important;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
    .dd-hero.product-hero,
    .ob-hero.product-hero {
        padding-top: 5.75rem;
        padding-bottom: 2.5rem;
        min-height: 0;
    }

    .product-hero-panel {
        order: 0;
        max-width: 100%;
    }

    .product-hero-card {
        max-width: 100%;
        padding: 1.1rem;
    }

    .product-hero .hero-buttons {
        width: 100%;
        flex-direction: column;
    }

    .product-hero .hero-buttons .btn {
        width: 100%;
    }

    .product-hero .hero-features {
        gap: 0.45rem !important;
    }

    .product-hero .hero-feature-item {
        font-size: 0.82rem;
        padding: 0.4rem 0.7rem;
    }

    .dd-features .features-grid > *,
    .ob-features .features-grid > *,
    .dd-technical .technical-grid > * {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .dd-features .feature-card,
    .ob-features .feature-card,
    .dd-technical .technical-card {
        padding: 1.25rem 1.15rem !important;
    }

    .pricing-calculator .result-card:hover,
    .pricing-calculator .result-card.highlighted:hover {
        transform: none !important;
    }

    .pricing-calculator .result-card {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .pricing-calculator .result-value {
        text-align: left !important;
        width: 100%;
    }

    .dd-cta .cta-buttons,
    .ob-cta .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .dd-cta .cta-buttons .btn,
    .ob-cta .cta-buttons .btn {
        width: 100%;
    }

    .dd-cta .cta-stats,
    .ob-cta .cta-stats {
        flex-direction: column;
        gap: 1.25rem !important;
    }

    /* Horizontal scroll safety */
    .dd-api,
    .dd-pricing,
    .ob-pricing,
    .product-hero {
        overflow-x: clip;
    }
}

@media (max-width: 480px) {
    .product-hero h1 {
        font-size: 1.85rem !important;
    }

    .calculator-header p {
        font-size: 0.95rem !important;
    }

    .newsletter-form,
    .pricing-calculator {
        border-radius: 14px !important;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .dd-features .feature-card,
    .ob-features .feature-card,
    .pricing-calculator .result-card,
    .product-hero .hero-buttons .btn {
        transition: none !important;
    }
}
