@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/**
 * ASEP - Step 2.5 Lens Preferences + Step 3 Complete Your Selection
 * Presentation-only layer. It reuses the approved Step 1 / Step 2 split-screen
 * shell while preserving the existing survey, recommendation, and cart markup.
 */

/* Shared design tokens, scoped only while Step 2.5 or Step 3 is visible. */
:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) {
    --ep-step3-panel: #f7f7f7;
    --ep-step3-white: #ffffff;
    --ep-step3-ink: #111111;
    --ep-step3-muted: #5b5b5b;
    --ep-step3-border: #cccccc;
    --ep-step3-yellow: #ffd600;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333333;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-close:hover {
    background: transparent;
    color: #111111;
}

/* -------------------------------------------------------------------------
   Main split-screen shell. Left product panel matches the approved Step 1.
   ------------------------------------------------------------------------- */
:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-modal-container {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step3-white);
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-info {
    position: relative;
    display: block;
    flex: 0 0 40%;
    width: 40%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid #bbbbbb;
    background: var(--ep-step3-white);
    box-sizing: border-box;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-image {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(87.1%, 669px);
    max-width: 669px;
    height: auto;
    max-height: 217px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 669 / 217;
    background: transparent;
    transform: translate(-50%, -50%);
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-details {
    position: absolute;
    top: 68%;
    right: clamp(24px, 2.6vw, 50px);
    left: clamp(24px, 2.6vw, 50px);
    display: block;
    width: auto;
    max-width: 669px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-heading {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
    text-align: center;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-name {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--ep-step3-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(24px, 1.67vw, 32px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-detail-price {
    display: none !important;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-meta {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    margin: 0;
    padding: 0;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-meta-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-meta-label,
:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-meta-value {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--ep-step3-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(16px, 1.04vw, 20px);
    font-weight: 500;
    line-height: 1.3;
}

:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-meta-value {
    color: #222222;
    text-align: right;
}

/* -------------------------------------------------------------------------
   Right panel and shared three-step progress indicator.
   ------------------------------------------------------------------------- */
:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-select-lenses-steps {
    display: flex;
    flex: 0 0 60%;
    flex-direction: column;
    width: 60%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step3-panel);
    box-sizing: border-box;
}


#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--ep-step3-panel);
    box-sizing: border-box;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-progress,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-progress {
    position: relative;
    top: 8px;
    flex: 0 0 auto;
    min-height: 0;
    margin: 0;
    padding: clamp(34px, 4.8vh, 52px) clamp(24px, 2.14vw, 41px) 58px;
    background: transparent;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: calc(100% - 48px);
    max-width: none;
    min-height: 60px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress::before,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress::after,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress::before,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress::after {
    position: absolute;
    top: 17px;
    left: 18px;
    right: 18px;
    width: auto;
    height: 2px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: var(--ep-step3-border);
    content: "";
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress::after {
    right: auto;
    width: calc(50% - 18px);
    background: var(--ep-step3-yellow);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress::after {
    right: auto;
    width: calc(100% - 36px);
    background: var(--ep-step3-yellow);
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ep-step3-border);
    border-radius: 50%;
    background: var(--ep-step3-panel);
    color: var(--ep-step3-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point.active,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point.completed,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point.active,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point.completed {
    border-color: var(--ep-step3-yellow);
    background: var(--ep-step3-yellow);
    color: var(--ep-step3-ink);
    box-shadow: none;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point.completed,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point.completed {
    color: transparent;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point.completed::after,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point.completed::after {
    color: var(--ep-step3-ink);
    font-size: 14px;
    font-weight: 600;
}

/* Step 2.5 is between prescription entry and lens selection. The second
   numbered marker remains visually active; no extra star marker is shown. */
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point:nth-child(2).completed {
    color: var(--ep-step3-ink);
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point:nth-child(2).completed::after {
    display: none;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-subpoint {
    display: none !important;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point.skipped,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point.skipped {
    border-color: #d7dfe1;
    background: #ffffff;
    color: transparent;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point.skipped::after,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point.skipped::after {
    color: #7f8c91;
    font-size: 14px;
    font-weight: 500;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-label,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-label {
    position: absolute;
    top: 44px;
    left: 50%;
    display: block;
    width: max-content;
    max-width: 180px;
    margin: 0;
    padding: 0;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(11px, 0.73vw, 14px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    transform: translateX(-50%);
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey > h3,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses > h3 {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 0 clamp(24px, 2.14vw, 41px) 15px;
    color: #000000 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-decoration: none !important;
    box-sizing: border-box;
}

/* When the actual questionnaire is open, keep its own heading and hide the
   parent page heading to avoid displaying two competing titles. */
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey:has(.ep-survey-question-screen:not([hidden])) > h3 {
    display: none !important;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-content,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-content {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0 clamp(24px, 2.14vw, 41px) 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c7c7c7 transparent;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-content::-webkit-scrollbar,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-content::-webkit-scrollbar {
    width: 7px;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-content::-webkit-scrollbar-thumb,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-content::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: #c7c7c7;
}

/* Bottom navigation stays in place; existing Back / Continue / Add to Cart
   controls and their event handlers are not changed. */
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-navigation,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-navigation {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px clamp(24px, 2.14vw, 41px);
    border-top: 1px solid #dedede;
    background: #ffffff;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-navigation .ep-back-btn,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-navigation .ep-back-btn {
    display: inline-flex !important;
    min-height: 42px;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-navigation .ep-next-btn,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-navigation .ep-add-to-cart-btn {
    min-height: 42px;
    margin-left: auto;
}

/* -------------------------------------------------------------------------
   Step 2.5 - Lens Preferences. Keep the existing survey structure and fields.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-survey {
    width: 100%;
    max-width: none;
    margin: 0;
    color: var(--ep-step3-ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-smart-match-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(18px, 2vw, 26px);
    border: 1px solid #dce4e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.045);
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-smart-match-glasses {
    top: 14px;
    right: 20px;
    color: #7baab2;
    opacity: 0.3;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: none;
    margin: 0 0 18px;
    padding: 0 84px 16px 0;
    border: 0;
    border-bottom: 1px solid #e6ebeb;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-banner-icon {
    width: 40px;
    height: 40px;
    border: 1px solid #dce9e9;
    border-radius: 12px;
    background: #f2f7f7;
    color: #397f8a;
    box-shadow: none;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-banner-text {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    line-height: 1.5;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-banner-badge {
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff7d6;
    color: #735c00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-banner-desc {
    color: #5b6468;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-card,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 82px;
    margin: 0 0 14px;
    padding: 16px 18px 16px 62px;
    border: 1px solid #dce3e3;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.045);
    box-sizing: border-box;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-card {
    border-color: #eadb8a;
    background: #fffdf4;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip {
    margin-bottom: 0;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-choice-card-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f0f5f5;
    color: #28788a;
    transform: translateY(-50%);
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip-copy strong {
    color: #111111;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip-copy span {
    color: #667176;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-btn,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 142px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid #d6c45c;
    border-radius: 9px;
    background: #ffd600;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-btn:hover,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip-btn:hover {
    border-color: #d1b500;
    background: #f3cb00;
    color: #111111;
    transform: translateY(-1px);
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-question-screen {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: #397b85;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-screen-heading {
    margin: 0 0 18px;
    padding: 0;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #ep-preferences-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preference-category {
    margin: 0;
    padding: 18px;
    border: 1px solid #d9dfdf;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.045);
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-category-title {
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-category-description {
    margin: 6px 0 13px;
    color: #667176;
    font-size: 13px;
    line-height: 1.5;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-selection-hint.single,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-selection-hint.multiple {
    background: #f1f5f5;
    color: #52727a;
    font-size: 10px;
    font-weight: 600;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-not-required {
    color: #7b8589;
    font-size: 11px;
    font-style: normal;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-radio-label,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-checkbox-label {
    min-width: 150px;
    padding: 11px 13px;
    border: 1px solid #d6dddd;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: none;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-radio-label:hover,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-checkbox-label:hover {
    border-color: #c6b34a;
    background: #fffdf2;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-radio-label:has(input[type="radio"]:checked),
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #e0c300;
    background: #fffbea;
    box-shadow: inset 3px 0 0 #ffd600;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-option-text {
    color: #202729;
    font-size: 14px;
    font-weight: 600;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-option-description {
    color: #687478;
    font-size: 12px;
    line-height: 1.45;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preference-select {
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #d1d9d9;
    border-radius: 9px;
    background: #ffffff;
    color: #202729;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preference-select:focus {
    border-color: #c5ad00;
    box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.16);
    outline: none;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preference-slider {
    background: #e1e6e6;
    accent-color: #d6b900;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-slider-label.active {
    background: #fff6cc;
    color: #6d5a00;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #e2e7e7;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-actions .ep-skip-btn,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-actions .ep-clear-btn {
    min-height: 38px;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-actions .ep-skip-btn {
    border: 1px solid #d4c45d !important;
    background: #fffdf2 !important;
    color: #655600 !important;
}

#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-actions .ep-clear-btn {
    border: 1px solid #d7dddd !important;
    background: #ffffff !important;
    color: #697477 !important;
}

/* -------------------------------------------------------------------------
   Step 3 - Complete Your Selection. Dynamic recommendation data is untouched.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-options,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-header {
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-header h4 {
    margin: 0;
    padding: 0 0 0 13px;
    border-left: 3px solid #ffd600;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-recommendation-group-title {
    margin: 20px 0 12px;
    color: #202729;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 18px;
    border: 1px solid #d6dddd;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.07);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option:hover {
    border-color: #d8c33c;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.09);
    transform: translateY(-1px);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option.selected {
    border-color: #e0c300;
    background: #fffdf3;
    box-shadow: inset 3px 0 0 #ffd600, 0 0 0 2px rgba(255, 214, 0, 0.12);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option.selected::after {
    top: 14px;
    right: 14px;
    width: 25px;
    height: 25px;
    background: #ffd600;
    color: #111111;
    font-size: 14px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-badge {
    top: -10px;
    left: 18px;
    padding: 4px 11px;
    border: 1px solid #e4c900;
    border-radius: 999px;
    background: #fff7ce;
    color: #6e5a00;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    border: 1px solid #e4e9e9;
    border-radius: 11px;
    background: #f6f8f8;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #eef2f2;
    color: #899598;
    font-size: 11px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-info {
    display: flex;
    flex: 1 1 180px;
    flex-direction: column;
    min-width: 0;
    padding-right: 26px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-name {
    margin: 0 0 8px;
    padding: 0;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-refractive-index {
    margin: 0 0 7px;
    color: #5f6a6e;
    font-size: 13px;
    line-height: 1.5;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-refractive-index span {
    color: #313b3f;
    font-weight: 600;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price {
    margin-top: 5px;
    color: #155e75;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-matched-preferences {
    margin-top: 8px;
    color: #647276;
    font-size: 12px;
    line-height: 1.45;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-lens-recommendation-explanation {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    margin: 12px 0 0 !important;
    padding: 12px 15px !important;
    border: 1px solid #e1e6e6 !important;
    border-radius: 10px !important;
    background: #f8f9f9 !important;
    box-sizing: border-box;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-lens-recommendation-explanation summary {
    color: #344247;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-lens-recommendation-explanation-content {
    color: #59666b !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-recommendation-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 180px;
    padding: 36px 20px;
    color: #657176;
    text-align: center;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-recommendation-loading p {
    margin: 0;
    color: #657176;
    font-size: 14px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-spinner {
    border-color: #ece6bf;
    border-top-color: #c4a900;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .no-lenses,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-error {
    margin: 0;
    padding: 28px 20px;
    border: 1px solid #e1e6e6;
    border-radius: 12px;
    background: #ffffff;
    color: #657176;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

/* Keep typography and controls consistent, without changing any behavior. */
:is(
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
) .ep-product-info *,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey,
#ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey *,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses * {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

/* -------------------------------------------------------------------------
   Responsive layout: retain the same 40/60 desktop and stacked mobile model.
   ------------------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-info {
        flex-basis: 36%;
        width: 36%;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-select-lenses-steps {
        flex-basis: 64%;
        width: 64%;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-details {
        top: 67%;
        right: 20px;
        left: 20px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-progress,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-progress {
        padding-right: 20px;
        padding-left: 20px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey > h3,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses > h3 {
        padding-right: 20px;
        padding-left: 20px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-content,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-content {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media screen and (max-width: 768px) {
    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-modal-content > .ep-close {
        top: 8px;
        right: 8px;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-modal-container {
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-info {
        display: none;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-select-lenses-steps {
        flex: 1 1 100%;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-progress,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-progress {
        padding: 28px 18px 34px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress {
        width: calc(100% - 12px);
        min-height: 56px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress::before,
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress::after,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress::before,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress::after {
        top: 15px;
        left: 16px;
        right: 16px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .steps-progress::after {
        width: calc(50% - 16px);
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .steps-progress::after {
        width: calc(100% - 32px);
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-label,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-label {
        top: 40px;
        font-size: 10px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey > h3,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses > h3 {
        padding: 0 18px 16px;
        font-size: 23px !important;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-content,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-content {
        padding: 0 18px 18px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-navigation,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-navigation {
        padding: 12px 18px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-card,
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 16px 14px 16px 54px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-btn,
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip-btn {
        align-self: flex-start;
        min-width: 132px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-banner {
        padding-right: 48px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-smart-match-glasses {
        top: 10px;
        right: 8px;
        transform: scale(0.72);
        transform-origin: top right;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option {
        gap: 13px;
        padding: 14px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
        flex-basis: 76px;
        width: 76px;
        height: 76px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-progress,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-progress {
        padding-right: 14px;
        padding-left: 14px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey > h3,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses > h3 {
        padding-right: 14px;
        padding-left: 14px;
        font-size: 21px !important;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .ep-step-content,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .ep-step-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-smart-match-panel {
        padding: 14px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-preferences-banner {
        padding-right: 40px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-start-card,
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-survey-quick-skip {
        padding-left: 48px;
    }

    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) .ep-choice-card-icon {
        left: 12px;
    }
}

@media screen and (min-width: 769px) and (max-height: 620px) {
    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 32px 24px;
        overflow-y: auto;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-image,
    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-details {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: 669px;
        margin: 0 auto;
        transform: none;
    }

    :is(
        #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])),
        #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"]))
    ) .ep-product-image {
        flex: 0 0 auto;
        max-height: 160px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ep-lens-modal:has(#step2-5-preferences-survey:not([style*="display: none"])) #step2-5-preferences-survey .step-point,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses .step-point,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option {
        transition: none;
    }
}


/* -------------------------------------------------------------------------
   Step 3 - Figma-aligned flat lens cards.
   All compatible lenses share one compact horizontal card structure.
   Existing .lens-option selection state and data attributes are preserved.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses > h3 {
    margin: 0;
    padding-bottom: 8px;
    font-size: clamp(20px, 1.45vw, 25px) !important;
    line-height: 1.3 !important;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-step-three-intro {
    margin: 0 0 18px;
    padding: 0;
    color: #5b5b5b;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-header,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-recommendation-group-title,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-lens-recommendation-explanation,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-matched-preferences {
    display: none !important;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
    position: relative;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    min-height: 78px;
    margin: 0 0 13px !important;
    padding: 12px 14px;
    border: 1px solid #d5d5d5;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
    cursor: pointer;
    transform: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option:last-of-type,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option:last-of-type {
    margin-bottom: 0 !important;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option:hover,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option:hover {
    border-color: #8bb8ff;
    box-shadow: 0 3px 9px rgba(31, 121, 255, 0.10);
    transform: none;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.recommended,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.recommended {
    border-color: #3985ff;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(31, 121, 255, 0.08);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.selected,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.selected {
    border-color: #e0c300;
    background: #fffdf3;
    box-shadow: inset 3px 0 0 #ffd600, 0 0 0 2px rgba(255, 214, 0, 0.12);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-badge {
    top: -10px;
    left: 14px;
    z-index: 2;
    padding: 3px 9px;
    border: 1px solid #ffd600;
    border-radius: 999px;
    background: #ffd600;
    color: #222222;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: none;
    white-space: nowrap;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #eef1f1;
    overflow: hidden;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #eef1f1;
    color: #8b9699;
    font-size: 8px;
    line-height: 1.2;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: 0;
    gap: 4px;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-name {
    margin: 0;
    padding: 0;
    color: #111111;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction {
    display: block;
    margin: 0;
    padding: 0;
    color: #666666;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price {
    flex: 0 0 auto;
    margin: 0 27px 0 auto;
    padding: 0;
    color: #5b5b5b;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-refractive-index {
    display: none !important;
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-step-three-intro {
        margin-bottom: 14px;
        font-size: 12px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
        gap: 11px;
        min-height: 70px;
        padding: 11px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-name {
        font-size: 13px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction {
        font-size: 11px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price {
        margin-right: 25px;
        font-size: 12px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
        gap: 9px;
        padding: 10px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price {
        margin-right: 22px;
        font-size: 11px;
    }
}


/* Keep long descriptions compact and prevent the price from colliding with
   the selected-state checkmark. */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option.selected .lens-price {
    margin-right: 50px;
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option.selected .lens-price {
        margin-right: 46px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option.selected .lens-price {
        margin-right: 42px;
    }
}


/* Step 3 interaction refinement:
   - recommendation alone does not create a blue outline;
   - hover uses blue;
   - click/selected uses blue (not the previous yellow);
   - clicking the selected card again clears its selected state via JS. */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.recommended,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.recommended {
    border-color: #d5d5d5;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option:hover,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option:hover {
    border-color: #1f79ff;
    box-shadow: 0 3px 9px rgba(31, 121, 255, 0.12);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.selected,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.selected {
    border-color: #1f79ff;
    background: #f5f9ff;
    box-shadow: inset 3px 0 0 #1f79ff, 0 0 0 2px rgba(31, 121, 255, 0.12);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.selected::after,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.selected::after {
    background: #1f79ff;
    color: #ffffff;
}


/* -------------------------------------------------------------------------
   Step 3 - simplified Figma layout refinement.
   Only the heading, intro line, and four lens-card surfaces are adjusted.
   Existing recommendation, selection, pricing, and cart behavior is retained.
   ------------------------------------------------------------------------- */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #step3-select-your-lenses > h3 {
    color: #000000 !important;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-step-three-intro {
    margin: 0 0 18px;
    padding: 0;
    color: #000000;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
    width: 100%;
    max-width: 1070px;
    min-height: 103px;
    height: auto;
    padding: 16px 18px;
    border: 1px solid #cccccc;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 2px 6px #cccccc;
    box-sizing: border-box;
}

/* Recommendation is communicated by its yellow badge, not a permanent blue
   card border. Blue is reserved for hover and the customer's active choice. */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.recommended,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.recommended {
    border-color: #cccccc;
    background: #ffffff;
    box-shadow: 0 2px 6px #cccccc;
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option:hover,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option:hover {
    border-color: #1f79ff;
    box-shadow: 0 3px 9px rgba(31, 121, 255, 0.12);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.selected,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.selected {
    border-color: #1f79ff;
    background: #f5f9ff;
    box-shadow: inset 3px 0 0 #1f79ff, 0 0 0 2px rgba(31, 121, 255, 0.12);
}

#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option.selected::after,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option.selected::after {
    background: #1f79ff;
    color: #ffffff;
}

@media screen and (max-width: 768px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-step-three-intro {
        font-size: 18px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
        min-height: 92px;
        padding: 13px 14px;
        border-radius: 16px;
    }
}

@media screen and (max-width: 420px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .ep-step-three-intro {
        font-size: 16px;
    }

    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .lens-option,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
        min-height: 88px;
        padding: 11px 12px;
        border-radius: 14px;
    }
}


/* ========================================================================
   Step 3 / Select Lenses — Figma card layout (CSS only).
   Never rewrite backend names, descriptions or prices.
   1070px is a maximum, not a fixed viewport width.
   ======================================================================== */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container {
    width: 100%;
    max-width: 1070px;
    margin-inline: auto;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options {
    width: 100%;
    max-width: 1070px;
    margin-inline: auto;
    row-gap: 18px;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    align-content: flex-start;
    column-gap: 22px;
    row-gap: 0;
    width: 100%;
    max-width: 1070px;
    min-height: 103px;
    height: auto;
    margin: 0 0 18px !important;
    padding: 18px 37px;
    border: 1px solid #cccccc;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 2px 6px #cccccc;
    box-sizing: border-box;
    transform: none;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .fallback-lens-options .lens-option {
    margin-bottom: 0 !important;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option:last-child {
    margin-bottom: 0 !important;
}
/* Recommendation badge does not itself select the card. */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.recommended {
    border-color: #cccccc;
    background: #ffffff;
    box-shadow: 0 2px 6px #cccccc;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option:hover {
    border-color: #1f79ff;
    background: #ffffff;
    box-shadow: 0 2px 6px #cccccc;
    transform: none;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.selected,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.is-expanded,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.recommended.selected,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.recommended.is-expanded {
    border-color: #1f79ff;
    background: #ffffff;
    box-shadow: 0 2px 6px #cccccc;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-badge {
    top: -14px;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 231px;
    max-width: calc(100% - 16px);
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 15px 10px 10px 0;
    background: #ffe600;
    color: #000000;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none !important;
    box-sizing: border-box;
    white-space: nowrap;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
    flex: 0 0 75px;
    width: 75px;
    height: 65px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #d9d9d9;
    overflow: hidden;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image .placeholder-image {
    width: 100%;
    height: 100%;
    background: #d9d9d9;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image .placeholder-image::after {
    content: none;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-info {
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-name {
    margin: 0;
    padding: 0;
    color: #000000;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none !important;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction {
    display: block;
    margin: 0;
    padding: 0;
    color: #5b5b5b;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none !important;
    /* Keep long descriptions legible rather than truncating backend text. */
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-price,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option.selected .lens-price {
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    padding: 0;
    color: #5b5b5b;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price .woocommerce-Price-amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}
/* Preserve the selection check for plain lenses without covering the price. */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.selected .lens-price {
    margin-right: 42px;
}
@media (max-width: 900px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option {
        min-height: 92px;
        padding: 16px 20px;
        column-gap: 16px;
        border-radius: 16px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
        flex-basis: 64px;
        width: 64px;
        height: 58px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-name { font-size: 18px; }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction { font-size: 15px; }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.selected .lens-price {
        font-size: 18px;
    }
}
@media (max-width: 540px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option {
        min-height: 82px;
        padding: 13px 12px;
        column-gap: 11px;
        border-radius: 14px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-option-image {
        flex-basis: 50px;
        width: 50px;
        height: 48px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-name { font-size: 15px; }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-instruction { font-size: 12px; line-height: 1.4; }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .lens-price,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.selected .lens-price {
        font-size: 15px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option.selected .lens-price {
        margin-right: 27px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) .recommendation-badge {
        top: -11px;
        left: 0;
        width: auto;
        max-width: calc(100% - 10px);
        height: 26px;
        padding: 0 10px;
        font-size: 11px;
    }
}


/* ========================================================================
   Step 3 / Single Vision — feature-based lens sections.
   This is display-only: scores, eligibility, selection and cart data stay in
   the original .lens-option elements and data-lens-* attributes.
   ======================================================================== */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-group {
    display: block;
    width: 100%;
    margin: 32px 0 0;
    padding: 30px 0 0;
    border-top: 1px solid #dde4e9;
    box-sizing: border-box;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-group:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 0 2px;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading-copy {
    min-width: 0;
    flex: 1 1 auto;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading h4 {
    display: block !important;
    margin: 0 0 5px;
    padding: 0;
    border: 0;
    color: #1b303e;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.2px;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading p {
    margin: 0;
    color: #647782;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-count {
    flex: 0 0 auto;
    margin-top: 3px;
    padding: 5px 10px;
    border: 1px solid #e1e8ec;
    border-radius: 999px;
    background: #f7f9fa;
    color: #5e707c;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option {
    width: 100%;
    max-width: none;
    min-height: 94px;
    margin: 0 !important;
    padding: 17px 22px;
    border: 1px solid #d9e2e8;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(21, 45, 63, 0.06);
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option.recommended {
    border-color: #e6ce68;
    background: #fffef9;
    box-shadow: 0 2px 9px rgba(21, 45, 63, 0.08);
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option:hover {
    border-color: #77b6db;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(21, 45, 63, 0.10);
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option.selected,
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option.recommended.selected {
    border-color: #1f79ff;
    background: #f8fbff;
    box-shadow: 0 0 0 2px rgba(31, 121, 255, 0.12);
}
@media (max-width: 900px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-group {
        margin-top: 26px;
        padding-top: 25px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading h4 {
        font-size: 18px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option {
        padding: 15px 17px;
    }
}
@media (max-width: 540px) {
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-group {
        margin-top: 22px;
        padding-top: 21px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading {
        gap: 10px;
        margin-bottom: 13px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading h4 {
        font-size: 16px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-heading p {
        font-size: 12px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-count {
        padding: 4px 7px;
        font-size: 10px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards {
        gap: 12px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option {
        min-height: 82px;
        padding: 13px 12px;
    }
}

/* Missing lens images use the same lightweight lens symbol in all
   recommendation layouts, including Email Later. Real images are unchanged. */
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option-image:has(.placeholder-image) {
    position: relative;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border: 1px solid #d7e2e8;
    border-radius: 50%;
    background: #f8fbfc;
    overflow: hidden;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .placeholder-image {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .placeholder-image::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 17px;
    width: 25px;
    height: 33px;
    border: 1.8px solid #3c6476;
    border-radius: 48% 52% 49% 51%;
    transform: rotate(18deg);
    box-sizing: border-box;
}
#ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .placeholder-image::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 23px;
    width: 7px;
    height: 12px;
    border-left: 2px solid #a3c4d2;
    border-radius: 50%;
    transform: rotate(18deg);
}
@media (max-width: 540px) {
    /* Let long real product names use the whole right column on phones.
       The price moves below the description rather than squeezing it. */
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option {
        display: grid !important;
        grid-template-columns: 50px minmax(0, 1fr);
        grid-template-areas: "image info" "image price";
        align-items: start;
        column-gap: 12px;
        row-gap: 6px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option-image {
        grid-area: image;
        width: 50px;
        height: 50px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .lens-option-image:has(.placeholder-image) {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .placeholder-image::before {
        top: 10px;
        left: 13px;
        width: 21px;
        height: 26px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) :is(#lens-recommendations-container, .fallback-lens-options) .placeholder-image::after {
        top: 13px;
        left: 18px;
        width: 6px;
        height: 10px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option-info {
        grid-area: info;
        min-width: 0;
        padding-right: 16px;
    }
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-price,
    #ep-lens-modal:has(#step3-select-your-lenses:not([style*="display: none"])) #lens-recommendations-container .ep-lens-feature-cards .lens-option.selected .lens-price {
        grid-area: price;
        justify-self: start;
        margin: 0 !important;
        padding: 0;
    }
}
