/* =========================================================================
   Stereopsis — Dual Eye Selector
   Scoped under body .dg-dual-eye for high specificity vs. Elementor/JetWoo.
   ========================================================================= */

body .dg-dual-eye {
    --dg-bg:        #f3f6fb;
    --dg-card:      #ffffff;
    --dg-border:    #e1e6ee;
    --dg-text:      #1f2937;
    --dg-muted:     #6b7280;
    --dg-accent:    #1e306e;   /* brand primary */
    --dg-accent-dk: #16234f;
    --dg-radius:    12px;
    --dg-shadow:    0 1px 3px rgba(15, 23, 42, .06);

    background: var(--dg-bg) !important;
    color: var(--dg-text) !important;
    border-radius: var(--dg-radius);
    padding: 24px !important;
    margin: 24px 0 !important;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: var(--dg-shadow);
    box-sizing: border-box;
    width: 100%;
}

/* Reset — keep Elementor / theme styles from leaking in. */
body .dg-dual-eye,
body .dg-dual-eye *,
body .dg-dual-eye *::before,
body .dg-dual-eye *::after {
    box-sizing: border-box;
}

body .dg-dual-eye button {
    font-family: inherit;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    text-shadow: none;
    margin: 0;
}

body .dg-dual-eye label {
    margin: 0;
    font-weight: normal;
    text-transform: none;
    color: inherit;
}

body .dg-dual-eye select,
body .dg-dual-eye input {
    font-family: inherit;
    margin: 0;
    box-shadow: none;
}

/* ----- Tabs -------------------------------------------------------------- */

body .dg-dual-eye .dg-tabs {
    display: flex !important;
    gap: 32px;
    border-bottom: 1px solid var(--dg-border);
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body .dg-dual-eye .dg-tab {
    background: none !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 12px 0 !important;
    margin: 0 0 -1px 0 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--dg-muted) !important;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    text-decoration: none !important;
}

body .dg-dual-eye .dg-tab:hover {
    color: var(--dg-text) !important;
    background: transparent !important;
}

body .dg-dual-eye .dg-tab.is-active {
    color: var(--dg-accent) !important;
    border-bottom-color: var(--dg-accent) !important;
    background: transparent !important;
}

/* ----- Panes ------------------------------------------------------------- */

body .dg-dual-eye .dg-pane { display: none !important; }
body .dg-dual-eye .dg-pane.is-active { display: block !important; }

body .dg-dual-eye .dg-pane--different.is-active {
    display: flex !important;
    flex-direction: row;
    gap: 15px;
}

/* ----- Eye block --------------------------------------------------------- */

body .dg-dual-eye .dg-eye {
    background: var(--dg-card) !important;
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius);
    padding: 20px !important;
    margin: 0 !important;
}

body .dg-dual-eye .dg-pane--different .dg-eye {
    padding: 15px !important;
}

body .dg-dual-eye .dg-eye__title {
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .08em;
    color: #000 !important;
    text-transform: uppercase !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
}

/* ----- Fields ------------------------------------------------------------ */

body .dg-dual-eye .dg-field {
    display: grid !important;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--dg-border);
}

body .dg-dual-eye .dg-pane--different .dg-eye .dg-field {
    grid-template-columns: 90px 1fr;
}

body .dg-dual-eye .dg-field:last-child {
    border-bottom: 0;
    padding-bottom: 0 !important;
}

body .dg-dual-eye .dg-field__label {
    font-size: 15px !important;
    color: var(--dg-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
}

body .dg-dual-eye .dg-field__select {
    width: 100% !important;
    height: 44px !important;
    padding: 0 40px 0 16px !important;
    background-color: var(--dg-card) !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M6 8 0 0h12z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 10px !important;
    border: 1px solid var(--dg-border) !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    color: var(--dg-text) !important;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: border-color .15s;
    line-height: 44px !important;
}

body .dg-dual-eye .dg-field__select:focus {
    outline: 0 !important;
    border-color: var(--dg-accent) !important;
    box-shadow: 0 0 0 3px rgba(30, 48, 110, .12) !important;
}

body .dg-dual-eye .dg-field__select:disabled,
body .dg-dual-eye .dg-field__select option:disabled {
    color: #c5cad3 !important;
}

/* ----- Quantity ---------------------------------------------------------- */

body .dg-dual-eye .dg-qty {
    display: inline-flex !important;
    align-items: center;
    height: 44px;
    width: 100%;
    max-width: 220px;
    border: 1px solid var(--dg-border);
    border-radius: 999px;
    background: var(--dg-card) !important;
    overflow: hidden;
    padding: 0 !important;
}

body .dg-dual-eye .dg-qty__btn {
    width: 44px !important;
    height: 100% !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: 20px !important;
    color: var(--dg-muted) !important;
    cursor: pointer;
    padding: 0 !important;
    transition: color .15s, background .15s;
    font-weight: 400 !important;
    line-height: 1 !important;
}

body .dg-dual-eye .dg-qty__btn:hover {
    color: var(--dg-accent) !important;
    background: rgba(30, 48, 110, .06) !important;
}

body .dg-dual-eye .dg-qty__input {
    flex: 1 !important;
    height: 100% !important;
    border: 0 !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 15px !important;
    color: var(--dg-text) !important;
    padding: 0 !important;
    -moz-appearance: textfield !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 50px;
}

body .dg-dual-eye .dg-qty__input::-webkit-outer-spin-button,
body .dg-dual-eye .dg-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ----- Summary ----------------------------------------------------------- */

body .dg-dual-eye .dg-summary {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--dg-border);
    display: flex !important;
    flex-direction: column;
    gap: 14px;
}

body .dg-dual-eye .dg-summary__total {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 !important;
    padding: 0 !important;
}

body .dg-dual-eye .dg-summary__label {
    font-size: 14px !important;
    color: var(--dg-muted) !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}

body .dg-dual-eye .dg-summary__price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--dg-text) !important;
    line-height: 1 !important;
}

body .dg-dual-eye .dg-submit {
    display: block !important;
    width: 100% !important;
    height: 52px !important;
    background: var(--dg-accent) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: background .15s, opacity .15s;
    box-shadow: none !important;
    line-height: 1 !important;
}

body .dg-dual-eye .dg-submit:hover:not(:disabled) {
    background: var(--dg-accent-dk) !important;
    color: #fff !important;
}

body .dg-dual-eye .dg-submit:disabled {
    opacity: .45 !important;
    cursor: not-allowed;
}

body .dg-dual-eye .dg-notice {
    min-height: 20px;
    font-size: 14px;
    text-align: center;
    margin: 0;
    padding: 0;
}

body .dg-dual-eye .dg-notice.is-success { color: var(--dg-accent-dk) !important; }
body .dg-dual-eye .dg-notice.is-error   { color: #c1272d !important; }

/* ----- Responsive -------------------------------------------------------- */

@media (max-width: 640px) {
    body .dg-dual-eye  { padding: 16px !important; }
    body .dg-dual-eye .dg-field { grid-template-columns: 1fr !important; gap: 6px; }
    body .dg-dual-eye .dg-tabs  { gap: 20px; }
    body .dg-dual-eye .dg-summary__price { font-size: 22px !important; }
}

/* =========================================================================
   Hide the default JetWooBuilder / WooCommerce variations widget on
   single product pages where our dual-eye form is rendered.
   ========================================================================= */

body.stereopsis-has-dual-eye .elementor-jet-single-add-to-cart,
body.stereopsis-has-dual-eye .jet-woo-builder-single-ajax-add-to-cart,
body.stereopsis-has-dual-eye .jet-woo-builder-single-add-to-cart,
body.stereopsis-has-dual-eye .elementor-widget-jet-single-add-to-cart,
body.stereopsis-has-dual-eye form.variations_form.cart {
    display: none !important;
}

@media (max-width: 767px) {
    body .dg-dual-eye .dg-pane--different.is-active{
        flex-direction: column;
    }
}
@media (min-width: 768px) and (max-width: 992px) {
    body .dg-dual-eye .dg-pane--different.is-active{
        flex-direction: column;
    }
}
