:root {
    --dfc-green: #1f6b42;
    --dfc-green-dark: #155034;
    --dfc-green-soft: #edf7f1;
    --dfc-gold: #d6a62f;
    --dfc-ink: #1e2822;
    --dfc-muted: #5d685f;
    --dfc-border: #d9e3dc;
}

.dfc-cart-estimator {
    margin: 0 0 16px;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--dfc-border);
    border-radius: 0;
    background: transparent;
    color: var(--dfc-ink);
    box-shadow: none;
}

.dfc-cart-estimator__heading {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 14px;
}

.dfc-cart-estimator__icon {
    flex: 0 0 auto;
    font-size: 24px;
    line-height: 1;
}

.dfc-cart-estimator h3 {
    margin: 0 0 3px;
    color: var(--dfc-ink);
    font-size: 18px;
    line-height: 1.25;
}

.dfc-cart-estimator p {
    margin: 0;
}

.dfc-cart-estimator__heading p,
.dfc-cart-estimator__note {
    color: var(--dfc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.dfc-cart-estimator__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 14px;
}

.dfc-cart-estimator__form input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #aebdb4;
    border-radius: 8px;
    background: #fff;
    color: var(--dfc-ink);
    font-size: 16px;
}

.dfc-cart-estimator__form input[type="text"]:focus {
    border-color: var(--dfc-green);
    outline: 3px solid rgba(31, 107, 66, 0.14);
}

.dfc-cart-estimator__form button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 10px 15px;
    border: 0;
    border-radius: 8px;
    background: var(--dfc-green);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
}

.dfc-cart-estimator__form button:hover,
.dfc-cart-estimator__form button:focus {
    background: var(--dfc-green-dark);
}

.dfc-cart-estimator__form button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.dfc-cart-estimator__result {
    padding-top: 11px;
    border-top: 1px solid rgba(31, 107, 66, 0.18);
}

.dfc-cart-estimator__result.dfc-has-error {
    padding: 11px 12px;
    border: 1px solid #e3a4a4;
    border-radius: 8px;
    background: #fff3f3;
    color: #8b2323;
}

.dfc-cart-estimator__result.dfc-is-success {
    border-top-color: rgba(31, 107, 66, 0.32);
}

.dfc-cart-estimator__line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    padding: 3px 0;
    font-size: 14px;
}

.dfc-cart-estimator__line--total {
    margin: 5px 0 4px;
    padding-top: 9px;
    border-top: 1px dashed #b6c7bc;
    font-size: 18px;
}

.dfc-cart-estimator__line--total strong {
    color: var(--dfc-green-dark);
    font-size: 22px;
}

.dfc-delivery-information-row td {
    padding-top: 3px !important;
}

.dfc-delivery-information {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--dfc-green-soft);
    color: var(--dfc-muted);
    font-size: 12px;
    line-height: 1.4;
}

.dfc-delivery-information strong {
    color: var(--dfc-green-dark);
    font-size: 13px;
}

.dfc-payment-context {
    clear: both !important;
    display: flow-root !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 2px 0 12px;
    padding: 12px 14px;
    border-left: 4px solid var(--dfc-green);
    border-radius: 6px;
    background: var(--dfc-green-soft);
    color: var(--dfc-muted);
}

.dfc-payment-context strong,
.dfc-payment-context span {
    display: block;
}

.dfc-payment-context strong {
    margin-bottom: 2px;
    color: var(--dfc-green-dark);
}

.dfc-payment-context--pallet {
    border-left-color: var(--dfc-gold);
    background: #fff9e9;
}

.woocommerce-checkout #payment ul.payment_methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.woocommerce-checkout #payment ul.payment_methods > li {
    margin: 0 !important;
    padding: 13px 14px !important;
    border: 1px solid var(--dfc-border);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.woocommerce-checkout #payment ul.payment_methods > li.dfc-payment-selected {
    border-color: var(--dfc-green);
    background: #f7fbf8;
    box-shadow: 0 0 0 2px rgba(31, 107, 66, 0.11);
}

.woocommerce-checkout #payment ul.payment_methods > li > label {
    font-weight: 700;
    cursor: pointer;
}

.woocommerce-checkout #payment input.input-radio {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-grid !important;
    place-content: center;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    margin: 0 8px 0 0 !important;
    border: 2px solid #98a69d !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: none !important;
    vertical-align: -3px;
}

.woocommerce-checkout #payment input.input-radio::before {
    content: "" !important;
    display: block !important;
    width: 8px !important;
    height: 8px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--dfc-green) !important;
    font-family: inherit !important;
    transform: scale(0);
    transition: transform 0.12s ease;
}

.woocommerce-checkout #payment input.input-radio:checked {
    border-color: var(--dfc-green) !important;
}

.woocommerce-checkout #payment input.input-radio:checked::before {
    transform: scale(1);
}

.woocommerce-checkout #payment div.payment_box {
    margin: 10px 0 0 !important;
    padding: 10px 12px !important;
    border-radius: 8px;
    background: #f4f6f4 !important;
}

.dfc-payment-benefit {
    color: var(--dfc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.dfc-checkout-reassurance {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    margin: 3px 0 11px;
    color: var(--dfc-muted);
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.dfc-checkout-reassurance span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dfc-checkout-reassurance span::before {
    content: "";
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dfc-green);
}

.woocommerce-checkout .dfc-guest-note::before,
.woocommerce-checkout .dfc-delivery-status::before {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--dfc-green) !important;
    font-family: inherit !important;
    align-self: center;
    justify-self: center;
}

.woocommerce-checkout #place_order::before {
    content: none !important;
    display: none !important;
}

.woocommerce-checkout .dfc-postcode-field .description {
    display: block;
    margin-top: 5px;
    color: var(--dfc-muted);
    font-size: 12px;
    line-height: 1.4;
}

.woocommerce-checkout .woocommerce-additional-fields__field-wrapper {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.woocommerce-checkout .dfc-notes-toggle {
    width: 100% !important;
    box-sizing: border-box;
}

.dfc-seller-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #d9e7dd;
    border-radius: 9px;
    background: #f7fbf8;
    color: var(--dfc-ink);
    font-size: 13px;
    line-height: 1.35;
}

.dfc-seller-note__check {
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--dfc-green);
    color: #fff;
    font-weight: 800;
}

.dfc-seller-note strong,
.dfc-seller-note small {
    display: block;
}

.dfc-seller-note small {
    margin-top: 1px;
    color: var(--dfc-muted);
    font-size: 12px;
}

.dfc-mobile-cart-cta {
    display: none;
}

.dfc-mobile-product-cta {
    display: none !important;
}

@media (max-width: 560px) {
    body.woocommerce-checkout .elementor-widget-checkout-form > .elementor-widget-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .dfc-cart-estimator {
        padding: 14px 0 0;
    }

    .dfc-cart-estimator__form {
        grid-template-columns: minmax(0, 1fr);
    }

    .dfc-cart-estimator__form button {
        width: 100%;
    }

    .dfc-cart-estimator__line--total {
        font-size: 16px;
    }

    .dfc-cart-estimator__line--total strong {
        font-size: 20px;
    }

    .woocommerce-checkout #payment ul.payment_methods > li {
        padding: 12px !important;
    }

    .dfc-checkout-reassurance {
        flex-direction: column;
        gap: 3px;
    }
}

@media (max-width: 767px) {
    .dfh-site-header {
        border-bottom: 1px solid #e5ebe6 !important;
        box-shadow: 0 4px 14px rgba(18, 45, 23, 0.10) !important;
    }

    .dfh-site-header .dfh-service-strip {
        display: none !important;
    }

    .dfh-site-header .dfh-main {
        min-height: 0 !important;
        padding: 3px 10px 5px !important;
        gap: 3px 8px !important;
        grid-template-rows: 38px 36px !important;
    }

    .dfh-site-header .dfh-logo,
    .dfh-site-header .dfh-logo .custom-logo-link,
    .dfh-site-header .dfh-logo .custom-logo {
        height: 38px !important;
        max-height: 38px !important;
    }

    .dfh-site-header .dfh-logo .custom-logo {
        width: auto !important;
    }

    .dfh-site-header .dfh-actions {
        height: 38px !important;
    }

    .dfh-site-header .dfh-menu-toggle {
        border-radius: 10px !important;
    }

    .dfh-site-header .dfh-search,
    .dfh-site-header .dfh-search-form,
    .dfh-site-header .dfh-search-form input,
    .dfh-site-header .dfh-search-form button {
        height: 36px !important;
        min-height: 36px !important;
    }

    .dfh-site-header .dfh-search-form {
        overflow: hidden;
        border-radius: 8px !important;
        background: #f6f8f6 !important;
    }

    /* Prima acțiune de pe homepage rămâne deasupra pliului pe telefoane. */
    body.home .dfccro-home-hero {
        display: block !important;
        min-height: 0 !important;
        margin-top: 0 !important;
        padding: 16px 15px 18px !important;
    }

    body.home .dfccro-home-copy {
        width: 100% !important;
        min-height: 0 !important;
    }

    body.home .dfccro-eyebrow {
        margin: 0 0 6px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }

    body.home #dfccro-home-title {
        margin: 0 0 9px !important;
        font-size: clamp(30px, 9.2vw, 35px) !important;
        line-height: 1.04 !important;
        letter-spacing: -0.035em !important;
    }

    body.home .dfccro-home-lead {
        margin: 0 0 13px !important;
        font-size: 14px !important;
        line-height: 1.42 !important;
    }

    body.home .dfccro-home-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 8px !important;
        height: auto !important;
        margin: 0 !important;
    }

    body.home .dfccro-home-actions .dfccro-button {
        display: inline-flex !important;
        min-height: 44px !important;
        padding: 9px 8px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        line-height: 1.15 !important;
        text-align: center !important;
    }

    body.home .dfccro-home-benefits {
        display: none !important;
    }

    /* Pe categorii, produsele apar imediat după un ghid scurt, nu după trei ecrane. */
    body.tax-product_cat .dfc-ad-guide {
        min-height: 0 !important;
        margin: 0 0 10px !important;
        padding: 14px 12px !important;
    }

    body.tax-product_cat .dfc-ad-guide__copy {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 0 10px !important;
    }

    body.tax-product_cat .dfc-ad-guide__eyebrow,
    body.tax-product_cat .dfc-ad-guide__copy > p {
        display: none !important;
    }

    body.tax-product_cat .dfc-ad-guide__copy h1,
    body.tax-product_cat #dfc-ad-guide-title {
        margin: 0 !important;
        font-size: 26px !important;
        line-height: 1.08 !important;
        letter-spacing: -0.025em !important;
    }

    body.tax-product_cat .dfc-ad-guide__choices {
        display: flex !important;
        width: calc(100% + 12px) !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 12px 5px 0 !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    body.tax-product_cat .dfc-ad-guide__choice {
        display: flex !important;
        flex: 0 0 142px !important;
        min-height: 70px !important;
        padding: 9px 10px !important;
        gap: 1px !important;
        scroll-snap-align: start;
    }

    body.tax-product_cat .dfc-ad-guide__choice strong {
        font-size: 13px !important;
        line-height: 1.2 !important;
    }

    body.tax-product_cat .dfc-ad-guide__choice > span {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    body.tax-product_cat .dfc-ad-guide__choice small {
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

    body.tax-product_cat .dfc-ad-guide__trust {
        display: none !important;
    }

    body.tax-product_cat .dfcgt-catalog-promotion {
        min-height: 0 !important;
        margin: 8px 0 !important;
        padding: 9px 11px !important;
        gap: 9px !important;
    }

    body.tax-product_cat .dfcgt-catalog-promotion__badge {
        flex: 0 0 36px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 12px !important;
    }

    body.tax-product_cat .dfcgt-catalog-promotion > span:not(.dfcgt-catalog-promotion__badge) {
        font-size: 12px !important;
        line-height: 1.28 !important;
    }

    body.tax-product_cat .dfcgt-catalog-promotion small {
        display: none !important;
    }

    body.tax-product_cat .dfc-catalog-toolbar {
        min-height: 0 !important;
        margin: 8px 0 12px !important;
        padding: 8px !important;
        gap: 7px !important;
    }

    body.tax-product_cat .dfc-toolbar-summary {
        display: none !important;
    }

    body.tax-product_cat .dfc-toolbar-controls {
        display: grid !important;
        width: 100% !important;
        grid-template-columns: auto minmax(0, 1fr) !important;
        gap: 7px !important;
        align-items: center !important;
    }

    body.tax-product_cat .dfc-toolbar-controls select,
    body.tax-product_cat .dfc-toolbar-controls button,
    body.tax-product_cat .dfc-toolbar-controls label {
        min-height: 42px !important;
        margin: 0 !important;
        font-size: 12px !important;
    }

    body.tax-product_cat ul.products {
        margin-top: 0 !important;
    }

    /* CTA produs: după preț, cu informația secundară mutată mai jos. */
    body.single-product div.product .summary.entry-summary {
        display: flex !important;
        flex-direction: column !important;
    }

    body.single-product .summary .woocommerce-breadcrumb { order: 1; }
    body.single-product .summary .single-product-category { order: 2; }
    body.single-product .summary .product_title { order: 3; }
    body.single-product .summary > .price { order: 4; }
    body.single-product .summary > .dfc-seller-note { order: 5; }
    body.single-product .summary > form.cart { order: 6; }
    body.single-product .summary > .woocommerce-product-details__short-description { order: 7; }
    body.single-product .summary > .dfc-buy-confidence { order: 8; }
    body.single-product .summary > #wc-stripe-payment-request-wrapper { order: 9; }
    body.single-product .summary > .product_meta { order: 10; }
    body.single-product .summary > .dfcgt-quantity-offer { order: 11; }

    body.single-product .summary > .price {
        margin-bottom: 8px !important;
    }

    body.single-product .dfc-seller-note {
        margin: 0 0 10px !important;
        padding: 8px 10px !important;
    }

    body.single-product .summary > form.cart {
        display: flex !important;
        width: 100% !important;
        min-height: 52px !important;
        margin: 0 0 14px !important;
        padding: 0 !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    body.single-product .summary > form.cart .single_add_to_cart_button {
        display: inline-flex !important;
        flex: 1 1 auto !important;
        min-height: 52px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body.single-product .summary > .woocommerce-product-details__short-description {
        margin-top: 0 !important;
    }

    /* Coș: butonul nativ nu mai poate fi ascuns de tema mobilă. */
    body.woocommerce-cart .wc-proceed-to-checkout {
        display: flex !important;
        width: 100% !important;
        flex-direction: column !important;
    }

    body.woocommerce-cart .wc-proceed-to-checkout .dfc-cart-estimator {
        order: 1 !important;
    }

    body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 2 !important;
        width: 100% !important;
        min-height: 54px !important;
        margin: 4px 0 10px !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.25 !important;
    }

    body.woocommerce-cart .wc-proceed-to-checkout .dfcmc-reassurance {
        order: 3 !important;
    }

    body.woocommerce-cart .wc-proceed-to-checkout .dfcmc-continue {
        order: 4 !important;
    }

    body.woocommerce-cart .dfcmc-cart-intro {
        min-height: 0 !important;
        margin-bottom: 10px !important;
        padding: 10px 0 0 !important;
    }

    body.woocommerce-cart .dfcmc-cart-intro .dfcmc-eyebrow,
    body.woocommerce-cart .dfcmc-cart-intro .dfcmc-intro-copy {
        display: none !important;
    }

    body.woocommerce-cart .dfcmc-cart-intro h1 {
        margin: 0 !important;
        font-size: 28px !important;
        line-height: 1.1 !important;
    }

    body.woocommerce-cart .dfcmc-cart-journey {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 0 10px !important;
        padding: 6px !important;
        gap: 4px !important;
    }

    body.woocommerce-cart .dfcmc-cart-journey > div {
        height: auto !important;
        min-height: 42px !important;
        padding: 5px 4px !important;
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

    body.woocommerce-cart .dfcmc-cart-journey > div > *:last-child {
        display: none !important;
    }

    body.woocommerce-cart .dfcgt-cart-progress {
        min-height: 0 !important;
        margin: 8px 0 10px !important;
        padding: 10px 12px !important;
    }

    body.woocommerce-cart .dfcgt-cart-progress > div:first-child {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }

    body.woocommerce-cart .dfcgt-cart-progress__steps {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    body.woocommerce-cart .dfcmc-reassurance {
        gap: 7px !important;
        padding: 8px 0 !important;
    }

    body.woocommerce-cart .dfcmc-reassurance small {
        display: none !important;
    }

    /* Acțiuni fixe, compacte, doar când butonul original a ieșit din ecran. */
    body.dfc-mobile-cta-visible {
        padding-bottom: 84px !important;
    }

    .dfc-mobile-cart-cta {
        position: fixed;
        z-index: 9997;
        right: 10px;
        bottom: 10px;
        left: 10px;
        display: flex;
        min-height: 60px;
        padding: 8px;
        border: 1px solid rgba(18, 74, 45, 0.18);
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 12px 32px rgba(16, 48, 28, 0.24);
        align-items: center;
        gap: 8px;
        transform: translateY(120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .dfc-mobile-cart-cta.dfc-is-visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .dfc-mobile-cart-cta__total {
        flex: 0 0 auto;
        color: var(--dfc-ink);
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
    }

    .dfc-mobile-cart-cta__button {
        display: inline-flex;
        flex: 1 1 auto;
        min-height: 44px;
        padding: 8px 10px;
        border: 0;
        border-radius: 9px;
        background: var(--dfc-green);
        color: #fff !important;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.15;
        text-align: center;
        text-decoration: none !important;
    }

    /* Checkout mai scurt, fără schimbarea câmpurilor sau a metodelor de plată. */
    body.woocommerce-checkout .dfc-payment-context {
        margin-bottom: 8px !important;
        padding: 9px 11px !important;
        font-size: 12px !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods {
        gap: 7px !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods > li {
        padding: 8px !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods > li > label {
        display: inline-flex !important;
        width: auto !important;
        margin: 0 !important;
        align-items: center !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
        vertical-align: top !important;
    }

    body.woocommerce-checkout #payment input.input-radio {
        margin-right: 5px !important;
    }

    body.woocommerce-checkout #payment div.payment_box {
        width: 100% !important;
        margin-top: 6px !important;
        padding: 7px 8px !important;
        box-sizing: border-box !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    body.woocommerce-checkout #payment div.payment_box p {
        margin: 0 !important;
    }

    body.woocommerce-checkout #payment .dfc-checkout-help {
        min-height: 0 !important;
        padding: 7px 9px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }

    body.woocommerce-checkout #mailpoet_woocommerce_checkout_optin_present_field:empty {
        display: none !important;
    }

    body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
        font-size: 12px !important;
        line-height: 1.38 !important;
    }

    body.woocommerce-checkout .woocommerce-privacy-policy-text p {
        margin-bottom: 8px !important;
    }

    body.woocommerce-checkout .dfc-checkout-reassurance {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin: 0 0 7px !important;
        gap: 3px 8px !important;
        font-size: 10px !important;
        text-align: left !important;
    }

    body.woocommerce-checkout .dfc-order-obligation-note {
        margin: 5px 0 7px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dfc-mobile-cart-cta {
        transition: none !important;
    }
}
