/* ════════════════════════════════════════════════
   DEVON BLAGAJNA — WooCommerce Checkout Reskin
   CartFlows Canvas · Sage green · Cream · Poppins
   ════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --cream: #f0ebe0;
    --cream-light: #f7f3ec;
    --cream-warm: #ede6d8;
    --sage: #4a6741;
    --sage-dark: #2d4a28;
    --sage-light: #6b8f5e;
    --sage-muted: rgba(74, 103, 65, 0.07);
    --text-primary: #1a2418;
    --text-secondary: #3a4a35;
    --text-muted: #6b7a64;
    --text-faint: #94a38d;
    --card-bg: #ffffff;
    --card-border: rgba(74, 103, 65, 0.1);
    --card-shadow: 0 2px 8px rgba(26, 36, 24, 0.04), 0 1px 3px rgba(26, 36, 24, 0.03);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.35s;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 50px;
    --input-height: 50px;
    --section-gap: 1.5rem;
}


/* ════════════════════════════════════════════════
   GLOBAL RESET
   ════════════════════════════════════════════════ */

body {
    font-family: 'Poppins', sans-serif !important;
    background: var(--cream) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wcf-embed-checkout-form,
.wcf-embed-checkout-form .woocommerce {
    font-family: 'Poppins', sans-serif !important;
}


/* ════════════════════════════════════════════════
   SHIPPING PROGRESS BAR (injected by JS)
   ════════════════════════════════════════════════ */

.devon-shipping-bar {
    max-width: 780px;
    margin: 0 auto 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.devon-shipping-bar__text {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.devon-shipping-bar__text svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.devon-shipping-bar__text strong {
    color: var(--sage);
    font-weight: 600;
}

.devon-shipping-bar__track {
    height: 5px;
    background: var(--cream-warm);
    border-radius: 3px;
    overflow: hidden;
}

.devon-shipping-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sage-light), var(--sage));
    border-radius: 3px;
    transition: width 0.6s var(--ease-out);
    min-width: 4px;
}

.devon-shipping-bar--free .devon-shipping-bar__fill {
    background: linear-gradient(90deg, var(--sage), var(--sage-dark));
}

.devon-shipping-bar--free .devon-shipping-bar__text {
    color: var(--sage);
}


/* ════════════════════════════════════════════════
   2-COLUMN LAYOUT
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .woocommerce .wcf-col2-set,
.wcf-embed-checkout-form-two-column .woocommerce .wcf-col2-set,
.wcf-embed-checkout-form .woocommerce-checkout .col2-set {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.wcf-embed-checkout-form .wcf-col-1,
.wcf-embed-checkout-form .wcf-col-2,
.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2,
.woocommerce-page .col2-set .col-1,
.woocommerce-page .col2-set .col-2,
.wcf-embed-checkout-form-two-column .wcf-col-1,
.wcf-embed-checkout-form-two-column .wcf-col-2 {
    width: 100% !important;
    float: none !important;
}

/* Main checkout wrapper */
.wcf-embed-checkout-form .woocommerce form.checkout,
.wcf-embed-checkout-form-two-column .woocommerce form.checkout {
    display: grid !important;
    grid-template-columns: 1.1fr 400px !important;
    gap: 2.5rem !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem 2.5rem !important;
    align-items: start !important;
}

/* Left column — billing + shipping */
.wcf-embed-checkout-form .wcf-col2-set {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

/* Shipping methods wrapper */
.wcf-embed-checkout-form .wcf-shipping-methods-wrapper {
    grid-column: 1 !important;
}

/* Right column — order review + payment */
.wcf-embed-checkout-form .wcf-order-wrap {
    grid-column: 2 !important;
    grid-row: 1 / 4 !important;
    position: sticky !important;
    top: 1.5rem !important;
}


/* ════════════════════════════════════════════════
   BILLING & SHIPPING FIELDS — Card wrapper
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .woocommerce-billing-fields,
.wcf-embed-checkout-form .woocommerce-shipping-fields,
.wcf-embed-checkout-form .woocommerce-additional-fields {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 2rem 2rem 1.75rem;
    margin-bottom: var(--section-gap);
}


/* ── Section headings ── */
.wcf-embed-checkout-form #billing_fields_heading,
.wcf-embed-checkout-form #ship-to-different-address,
.wcf-embed-checkout-form #order_review_heading,
.wcf-embed-checkout-form .wcf-shipping-methods-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
    line-height: 1.4;
}

.wcf-embed-checkout-form #ship-to-different-address {
    font-size: 0.92rem !important;
    margin: 0 !important;
    padding: 0.25rem 0 !important;
}

.wcf-embed-checkout-form #ship-to-different-address label {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.wcf-embed-checkout-form #ship-to-different-address span {
    font-weight: 500;
}


/* ── Labels ── */
.wcf-embed-checkout-form .form-row label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    margin-bottom: 0.3rem !important;
    display: block;
}

.wcf-embed-checkout-form .form-row label .required {
    color: var(--sage) !important;
    font-weight: 700;
}

.wcf-embed-checkout-form .form-row label .optional {
    color: var(--text-faint) !important;
    font-size: 0.75rem;
    font-weight: 400;
}


/* ── Input fields ── */
.wcf-embed-checkout-form .form-row input.input-text,
.wcf-embed-checkout-form .form-row textarea,
.wcf-embed-checkout-form .form-row select,
.wcf-embed-checkout-form .form-row .select2-container .select2-selection {
    height: var(--input-height) !important;
    padding: 0 1.15rem !important;
    border: 1.5px solid var(--card-border) !important;
    border-radius: 12px !important;
    background: var(--cream-light) !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.92rem !important;
    color: var(--text-primary) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
    -webkit-appearance: none;
    width: 100%;
    box-sizing: border-box;
}

.wcf-embed-checkout-form .form-row textarea {
    height: auto !important;
    padding: 0.75rem 1rem !important;
    min-height: 80px;
    resize: vertical;
}

.wcf-embed-checkout-form .form-row input.input-text:focus,
.wcf-embed-checkout-form .form-row textarea:focus,
.wcf-embed-checkout-form .form-row select:focus {
    border-color: var(--sage) !important;
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1) !important;
}

.wcf-embed-checkout-form .form-row input.input-text::placeholder,
.wcf-embed-checkout-form .form-row textarea::placeholder {
    color: var(--text-faint) !important;
    font-weight: 400;
}

/* Select2 dropdown match */
.wcf-embed-checkout-form .select2-container--default .select2-selection--single {
    display: flex !important;
    align-items: center !important;
}

.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.9rem !important;
    padding: 0 !important;
    line-height: var(--input-height) !important;
}

.wcf-embed-checkout-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: var(--input-height) !important;
}

/* Field layout — half-width rows */
.wcf-embed-checkout-form .woocommerce-billing-fields__field-wrapper,
.wcf-embed-checkout-form .woocommerce-shipping-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.wcf-embed-checkout-form .form-row {
    margin: 0 !important;
    padding: 0 !important;
}

.wcf-embed-checkout-form .form-row-wide,
.wcf-embed-checkout-form .wcf-column-100 {
    flex: 0 0 100% !important;
}

.wcf-embed-checkout-form .form-row-first,
.wcf-embed-checkout-form .form-row-last,
.wcf-embed-checkout-form .wcf-column-50 {
    flex: 0 0 calc(50% - 0.5rem) !important;
}

.wcf-embed-checkout-form .wcf-column-33 {
    flex: 0 0 calc(33.333% - 0.667rem) !important;
}


/* ── Checkbox styling ── */
.wcf-embed-checkout-form input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    border: 1.5px solid var(--card-border) !important;
    border-radius: 4px !important;
    background: var(--cream-light) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    margin-right: 0.4rem !important;
    transition: all 0.2s ease;
}

.wcf-embed-checkout-form input[type="checkbox"]:checked {
    background: var(--sage) !important;
    border-color: var(--sage) !important;
}

.wcf-embed-checkout-form input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.wcf-embed-checkout-form input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15) !important;
}


/* ── Radio buttons ── */
.wcf-embed-checkout-form input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    border: 2px solid rgba(74, 103, 65, 0.25) !important;
    border-radius: 50% !important;
    background: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    vertical-align: middle;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease;
    box-shadow: none !important;
    outline: none !important;
}

.wcf-embed-checkout-form input[type="radio"]:checked {
    border-color: var(--sage) !important;
    background: #fff !important;
}

.wcf-embed-checkout-form input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sage);
}


/* ════════════════════════════════════════════════
   COMPANY / PODJETJE SECTION
   ════════════════════════════════════════════════ */

/* Company section — separate card like "Dostavi na drug naslov" */
.devon-company-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 1.35rem 2rem;
    margin-bottom: var(--section-gap);
    margin-top: var(--section-gap);
}

.devon-company-toggle {
    margin: 0 !important;
    padding: 0 !important;
}

.devon-company-toggle label,
.devon-company-toggle .woocommerce-input-wrapper label {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
}

.devon-company-toggle .woocommerce-input-wrapper {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100%;
}

.devon-company-toggle label .woocommerce-input-wrapper {
    display: flex;
    align-items: center;
}

.devon-company-fields {
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out), opacity 0.3s ease;
    padding: 0;
    height: 0;
    display: none;
}

.devon-company-fields[style*="display: block"],
.devon-company-fields.devon-open {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 1rem;
    height: auto;
}

.devon-company-fields .form-row {
    margin: 0 !important;
}

.devon-company-section .devon-company-fields .form-row.form-row-wide {
    grid-column: 1 / -1;
}

.devon-company-section .devon-company-fields .form-row.form-row-first {
    grid-column: 1;
}

.devon-company-section .devon-company-fields .form-row.form-row-last {
    grid-column: 2;
}

/* Company inputi — polna širina znotraj grid celice */
.devon-company-section .devon-company-fields .form-row {
    width: 100% !important;
    float: none !important;
}

.devon-company-section .devon-company-fields .form-row input.input-text {
    width: 100% !important;
    min-height: var(--input-height) !important;
    box-sizing: border-box;
}

.devon-company-section .devon-company-fields .form-row .woocommerce-input-wrapper {
    width: 100% !important;
    display: block !important;
}

/* form-row-first/last ne sme omejiti širine v gridu */
.devon-company-section .devon-company-fields .form-row.form-row-first,
.devon-company-section .devon-company-fields .form-row.form-row-last {
    width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}


/* ════════════════════════════════════════════════
   SHIPPING METHODS
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .wcf-shipping-methods-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem 2rem;
    margin-bottom: var(--section-gap);
}

.wcf-embed-checkout-form .woocommerce-shipping-methods {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wcf-embed-checkout-form .woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--cream-light);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: border-color 0.25s ease;
}

.wcf-embed-checkout-form .woocommerce-shipping-methods li:last-child {
    margin-bottom: 0;
}

.wcf-embed-checkout-form .woocommerce-shipping-methods label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wcf-embed-checkout-form .woocommerce-shipping-methods .woocommerce-Price-amount {
    color: var(--text-muted);
    font-weight: 400;
}


/* ════════════════════════════════════════════════
   ORDER REVIEW (right column)
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .wcf-order-wrap,
.wcf-embed-checkout-form-two-column .woocommerce-checkout .wcf-order-wrap {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 1.75rem 2rem;
    width: 100% !important;
}

/* Order review heading */
.wcf-embed-checkout-form #order_review_heading {
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1rem !important;
}

/* Order review table */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table {
    border: none !important;
    margin: 0 0 1rem !important;
    width: 100% !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table thead th {
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--text-faint) !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0 0.5rem !important;
    border-bottom: 1px solid var(--card-border) !important;
}

/* Product rows with thumbnails */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart_item td {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid rgba(74, 103, 65, 0.05) !important;
    vertical-align: middle !important;
    font-family: 'Poppins', sans-serif !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart_item .product-name {
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

/* Thumbnail + name inline (added by PHP) */
.devon-checkout-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.devon-checkout-thumb {
    width: 48px !important;
    height: 48px !important;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--card-border);
}

.devon-checkout-product-name {
    flex: 1;
    line-height: 1.35;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart_item .product-total {
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    text-align: right !important;
    white-space: nowrap;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .product-quantity {
    font-weight: 400 !important;
    color: var(--text-muted) !important;
    font-size: 0.82rem !important;
}


/* ── Totals rows ── */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table tfoot th,
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table tfoot td {
    padding: 0.6rem 0 !important;
    border: none !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.88rem !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table tfoot th {
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    text-align: left !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table tfoot td {
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    text-align: right !important;
}

/* Discount */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart-discount th,
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart-discount td {
    color: var(--sage) !important;
    font-weight: 600 !important;
}

/* Order total */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .order-total th {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--card-border) !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .order-total td {
    font-weight: 700 !important;
    color: var(--sage) !important;
    font-size: 1.15rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--card-border) !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .order-total small.includes_tax {
    display: block !important;
    font-size: 0.65rem !important;
    font-weight: 400;
    color: var(--text-faint);
    margin-top: 0.1rem;
    white-space: nowrap !important;
}

/* Dostava row — lepši prikaz s sage badge */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart-shipping td {
    text-align: right !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart-shipping td .woocommerce-shipping-methods {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart-shipping td .woocommerce-shipping-methods label {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}


/* ════════════════════════════════════════════════
   COUPON FIELD
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .wcf-custom-coupon-field {
    display: flex !important;
    gap: 0.5rem !important;
    margin: 1.25rem 0 !important;
    padding: 0 !important;
    border: none !important;
}

.wcf-embed-checkout-form .wcf-coupon-col-1 {
    flex: 1 !important;
}

.wcf-embed-checkout-form .wcf-coupon-col-2 {
    flex: 0 0 auto !important;
}

.wcf-embed-checkout-form .wcf-coupon-code-input {
    height: 42px !important;
    padding: 0 1rem !important;
    border: 1.5px solid var(--card-border) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--cream-light) !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.85rem !important;
    color: var(--text-primary) !important;
    width: 100% !important;
    outline: none !important;
    transition: border-color 0.25s ease !important;
    box-sizing: border-box;
}

.wcf-embed-checkout-form .wcf-coupon-code-input:focus {
    border-color: var(--sage) !important;
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1) !important;
}

.wcf-embed-checkout-form .wcf-submit-coupon {
    height: 42px !important;
    padding: 0 1.25rem !important;
    border: none !important;
    border-radius: var(--radius-pill) !important;
    background: var(--sage) !important;
    color: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.wcf-embed-checkout-form .wcf-submit-coupon:hover {
    background: var(--sage-dark) !important;
    box-shadow: 0 4px 12px rgba(74, 103, 65, 0.25) !important;
}


/* ════════════════════════════════════════════════
   UPSELL CARD (injected by JS)
   ════════════════════════════════════════════════ */

.devon-upsell {
    margin: 1.25rem 0;
    padding: 1.15rem;
    background: var(--cream-light);
    border: 1.5px solid var(--card-border);
    border-left: 3px solid var(--sage);
    border-radius: var(--radius-sm);
    display: none; /* ZAENKRAT SKRIT — vklopi z display:flex ko bo upsell ready */
    align-items: center;
    gap: 0.75rem;
}

.devon-upsell__img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--card-border);
}

.devon-upsell__info {
    flex: 1;
    min-width: 0;
}

.devon-upsell__title {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-faint);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.devon-upsell__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.devon-upsell__price {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--sage);
    margin-top: 0.1rem;
}

.devon-upsell__btn {
    height: 36px;
    padding: 0 1rem;
    border: 1.5px solid var(--sage);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--sage);
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.devon-upsell__btn:hover {
    background: var(--sage);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 103, 65, 0.2);
}

.devon-upsell__btn--added {
    background: var(--sage) !important;
    color: #fff !important;
    pointer-events: none;
}


/* ════════════════════════════════════════════════
   PAYMENT METHODS
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form #payment {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 1.5rem !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Payment methods list ABOVE place order */
.wcf-embed-checkout-form .wc_payment_methods {
    order: 1 !important;
}

/* Terms + privacy ABOVE place order */
.wcf-embed-checkout-form .woocommerce-terms-and-conditions-wrapper {
    order: 2 !important;
}

/* Place order section */
.wcf-embed-checkout-form .form-row.place-order {
    order: 3 !important;
}

.wcf-embed-checkout-form .wc_payment_methods {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.wcf-embed-checkout-form .wc_payment_method {
    border: none !important;
    border-radius: var(--radius-sm) !important;
    margin-bottom: 0.75rem !important;
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
    background: var(--cream-light) !important;
}

/* Hide the default radio that sits outside label */
.wcf-embed-checkout-form .wc_payment_method > input.input-radio {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.wcf-embed-checkout-form .wc_payment_method:has(input:checked) {
    border-color: var(--sage) !important;
    background: rgba(74, 103, 65, 0.03) !important;
}

.wcf-embed-checkout-form .wc_payment_method > label {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding: 1.15rem 1.5rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    margin: 0 !important;
}

/* Custom radio circle inside label */
.wcf-embed-checkout-form .wc_payment_method > label::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(74, 103, 65, 0.25);
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wcf-embed-checkout-form .wc_payment_method:has(input:checked) > label::before {
    border-color: var(--sage);
    background: radial-gradient(circle, var(--sage) 40%, #fff 41%);
}

.wcf-embed-checkout-form .wc_payment_method > label img {
    max-height: 24px;
    width: auto;
}

.wcf-embed-checkout-form .payment_box {
    padding: 1rem 1.5rem 1.15rem !important;
    padding-left: calc(1.5rem + 20px + 0.85rem + 0.15rem) !important;
    background: rgba(74, 103, 65, 0.02) !important;
    border-top: 1px solid var(--card-border) !important;
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    line-height: 1.6;
}

.wcf-embed-checkout-form .payment_box::before {
    display: none !important;
}

/* PayPal popup container — centered */
.wcf-embed-checkout-form .wc-ppcp-popup__container {
    text-align: center;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wcf-embed-checkout-form .wc-ppcp-popup__container img {
    max-width: 52px;
    opacity: 0.45;
    margin: 0 auto;
    display: block;
}

.wcf-embed-checkout-form .wc-ppcp-popup__container p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.65rem 0 0;
    text-align: center;
}

/* PayPal payment_box — center content, override left padding */
.wcf-embed-checkout-form .payment_method_ppcp .payment_box {
    padding-left: 1.5rem !important;
    text-align: center;
}


/* ════════════════════════════════════════════════
   PLACE ORDER BUTTON
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .place-order {
    padding: 0 !important;
    margin-top: 2rem !important;
}

.wcf-embed-checkout-form #place_order {
    display: block !important;
    width: 100% !important;
    height: 56px !important;
    border: none !important;
    border-radius: var(--radius-pill) !important;
    background: var(--sage) !important;
    color: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    cursor: pointer !important;
    transition: all 0.3s var(--ease-out) !important;
    box-shadow: 0 4px 16px rgba(74, 103, 65, 0.25) !important;
}

.wcf-embed-checkout-form #place_order:hover {
    background: var(--sage-dark) !important;
    box-shadow: 0 8px 28px rgba(74, 103, 65, 0.35) !important;
    transform: translateY(-1px);
}

.wcf-embed-checkout-form #place_order:active {
    transform: translateY(0);
}


/* ── Terms & Privacy ── */
.wcf-embed-checkout-form .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 1.25rem !important;
}

.wcf-embed-checkout-form .woocommerce-privacy-policy-text {
    font-size: 0.75rem !important;
    color: var(--text-faint) !important;
    line-height: 1.6;
    margin-bottom: 0.75rem !important;
}

.wcf-embed-checkout-form .woocommerce-privacy-policy-text a {
    color: var(--sage) !important;
    text-decoration: underline;
}

.wcf-embed-checkout-form .woocommerce-terms-and-conditions-wrapper .form-row {
    margin-bottom: 1rem !important;
}

.wcf-embed-checkout-form .woocommerce-terms-and-conditions-wrapper label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    font-size: 0.82rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.5;
    cursor: pointer;
}

.wcf-embed-checkout-form .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    margin-top: 2px !important;
    margin-right: 0 !important;
}

.wcf-embed-checkout-form .woocommerce-terms-and-conditions-checkbox-text {
    font-size: 0.82rem !important;
    color: var(--text-secondary) !important;
}

.wcf-embed-checkout-form .woocommerce-terms-and-conditions-checkbox-text a {
    color: var(--sage) !important;
    text-decoration: underline;
}


/* ── Trust badges under place order ── */
.devon-checkout-trust {
    display: flex !important;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    width: 100% !important;
    min-width: 100% !important;
}

.devon-checkout-trust__item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-faint);
    font-weight: 500;
}

.devon-checkout-trust__item svg {
    width: 13px;
    height: 13px;
    color: var(--sage-light);
}


/* ════════════════════════════════════════════════
   FIELD VALIDATION HINTS
   ════════════════════════════════════════════════ */

.devon-field-hint {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #c87832;
    margin-top: 0.3rem;
    padding-left: 0.15rem;
    animation: devonHintIn 0.25s ease;
}

@keyframes devonHintIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ════════════════════════════════════════════════
   WOOCOMMERCE NOTICES
   ════════════════════════════════════════════════ */

.wcf-embed-checkout-form .woocommerce-NoticeGroup,
.wcf-embed-checkout-form .woocommerce-notices-wrapper {
    grid-column: 1 / -1 !important;
}

.wcf-embed-checkout-form .woocommerce-error,
.wcf-embed-checkout-form .woocommerce-NoticeGroup {
    background: var(--card-bg) !important;
    border: 1px solid rgba(200, 50, 50, 0.15) !important;
    border-left: 3px solid #c83232 !important;
    border-radius: var(--radius-sm) !important;
    list-style: none !important;
    padding: 1rem 1.25rem !important;
    margin: 0 0 1.5rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.85rem !important;
    color: #c83232 !important;
    grid-column: 1 / -1 !important;
}

.wcf-embed-checkout-form .woocommerce-message {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-left: 3px solid var(--sage) !important;
    border-radius: var(--radius-sm) !important;
    padding: 1rem 1.25rem !important;
    margin: 0 0 1rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.85rem !important;
}


/* ════════════════════════════════════════════════
   CARTFLOWS ELEMENTOR OVERRIDES
   ════════════════════════════════════════════════ */

/* Hide CartFlows green/black top bar ("Izkoristite brezplačno poštnino") */
.elementor-element[data-id="3a89537"] {
    display: none !important;
}

/* Header section — BEL PAS, samo logo */
.elementor-element[data-id="9b1586d"] {
    background: #fff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 0.75rem 0 !important;
}

/* Hide garancija badge from header */
.elementor-element[data-id="9259eda"],
.elementor-element[data-id="02335ec"] {
    display: none !important;
}

/* Fix title section background + font */
.elementor-element[data-id="42be73d"] {
    background: var(--cream) !important;
}

.elementor-element[data-id="42be73d"] .elementor-heading-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-style: normal !important;
    font-size: 1.5rem !important;
    color: var(--text-primary) !important;
}

/* FIX: Elementor checkout widget container has white bg — must be transparent */
.elementor-element[data-id="561301e"] > .elementor-widget-container {
    background: transparent !important;
}

/* Also catch any other elementor widget container wrapping checkout */
.elementor-widget-checkout .elementor-widget-container,
.elementor-widget-wc-checkout .elementor-widget-container {
    background: transparent !important;
}

/* HIDE standalone shipping section (left column) — shipping info is in order review table */
.wcf-embed-checkout-form .wcf-shipping-methods-wrapper {
    display: none !important;
}

/* Place order button styling — NE prepisuj teksta, PayPal plugin upravlja vidnost */
.wcf-embed-checkout-form #place_order,
.wcf-embed-checkout-form button[name="woocommerce_checkout_place_order"] {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    border-radius: var(--radius-pill) !important;
    height: 56px !important;
    box-shadow: 0 4px 16px rgba(74, 103, 65, 0.25) !important;
}

/* Hide sage "Pay with PayPal" button when PayPal is selected — SDK buttons are enough */
.wcf-embed-checkout-form #place_order.wc-ppcp-hide-button {
    display: none !important;
}

/* PayPal SDK buttons — style to match our design */
.wcf-embed-checkout-form .wc-ppcp-checkout-container {
    margin-bottom: 0.75rem !important;
}

/* Hide "Apply store credit discounts?" from Advanced Coupons */
.wcf-embed-checkout-form .acfw-store-credits-checkout-section,
.wcf-embed-checkout-form [class*="store-credit"],
.wcf-embed-checkout-form .acfw-store-credit {
    display: none !important;
}

/* Override CartFlows "Kupite sedaj" button to match Devon style */
.wcf-embed-checkout-form #place_order,
.wcf-embed-checkout-form .wcf-place-order-button,
.wcf-embed-checkout-form button[name="woocommerce_checkout_place_order"] {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    border-radius: var(--radius-pill) !important;
    height: 56px !important;
    box-shadow: 0 4px 16px rgba(74, 103, 65, 0.25) !important;
}

/* Override table header "Delni znesek" → "Znesek" via CSS content */
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table thead th.product-total {
    font-size: 0 !important;
    line-height: 0 !important;
}
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table thead th.product-total::after {
    content: 'ZNESEK' !important;
    font-size: 0.75rem !important;
    line-height: normal !important;
    letter-spacing: 0.06em;
}

/* ════════════════════════════════════════════════
   CHECKOUT HEADER (CartFlows Canvas)
   ════════════════════════════════════════════════ */

.devon-checkout-header {
    margin-bottom: 0;
}

.devon-checkout-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 2.5rem;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.devon-checkout-header__logo img {
    height: 36px;
    width: auto;
}

.devon-header-badges {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.devon-header-badges span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.devon-checkout-header__title {
    padding: 1.75rem 2.5rem 1.25rem;
    text-align: center;
}

.devon-checkout-header__title h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.elementor-section-wrap .elementor-section,
.e-con {
    font-family: 'Poppins', sans-serif !important;
}


/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */

@media (max-width: 960px) {
    .wcf-embed-checkout-form .woocommerce form.checkout {
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem !important;
        gap: 0 !important;
    }

    .wcf-embed-checkout-form .wcf-col2-set {
        order: 1 !important;
        width: 100%;
    }

    /* Shipping methods — right after billing, before order review */
    .wcf-embed-checkout-form .wcf-shipping-methods-wrapper {
        order: 2 !important;
        width: 100%;
    }

    /* Order review after shipping */
    .wcf-embed-checkout-form .wcf-order-wrap {
        position: static !important;
        order: 3 !important;
        width: 100%;
    }

    /* Reduce card padding on tablet */
    .wcf-embed-checkout-form .wcf-order-wrap {
        padding: 1.25rem 1.15rem;
    }

    .wcf-embed-checkout-form .woocommerce-billing-fields,
    .wcf-embed-checkout-form .woocommerce-shipping-fields,
    .wcf-embed-checkout-form .woocommerce-additional-fields {
        padding: 1.5rem 1.25rem 1.25rem;
    }
}

@media (max-width: 600px) {
    /* Full-width form rows */
    .wcf-embed-checkout-form .form-row-first,
    .wcf-embed-checkout-form .form-row-last,
    .wcf-embed-checkout-form .wcf-column-50 {
        flex: 0 0 100% !important;
    }

    .wcf-embed-checkout-form .wcf-column-33 {
        flex: 0 0 100% !important;
    }

    /* Tighter padding on mobile */
    .wcf-embed-checkout-form .woocommerce form.checkout {
        padding: 0.75rem !important;
    }

    .wcf-embed-checkout-form .wcf-order-wrap {
        padding: 1rem !important;
    }

    .wcf-embed-checkout-form .woocommerce-billing-fields,
    .wcf-embed-checkout-form .woocommerce-shipping-fields,
    .wcf-embed-checkout-form .woocommerce-additional-fields {
        padding: 1.25rem 1rem 1rem;
    }

    /* Coupon — stack vertically */
    .wcf-embed-checkout-form .wcf-custom-coupon-field {
        flex-direction: column !important;
    }

    /* Upsell — keep row but compact */
    .devon-upsell {
        padding: 0.85rem;
        gap: 0.6rem;
    }

    .devon-upsell__img {
        width: 48px;
        height: 48px;
    }

    .devon-upsell__name {
        font-size: 0.82rem;
        white-space: normal;
    }

    .devon-upsell__title {
        font-size: 0.72rem;
    }

    .devon-upsell__btn {
        height: 38px;
        padding: 0 0.85rem;
        font-size: 0.78rem;
    }

    /* Shipping bar */
    .devon-shipping-bar {
        margin: 0 0 1rem;
        padding: 0.75rem 1rem;
    }

    /* Payment methods — compact labels */
    .wcf-embed-checkout-form .wc_payment_method > label {
        padding: 0.85rem 1rem !important;
        font-size: 0.85rem !important;
        gap: 0.65rem !important;
    }

    .wcf-embed-checkout-form .payment_box {
        padding: 0.85rem 1rem 0.85rem calc(1rem + 20px + 0.65rem) !important;
    }

    /* PayPal box */
    .wcf-embed-checkout-form .payment_method_ppcp .payment_box {
        padding: 0.85rem 1rem !important;
    }

    /* Order review product rows — tighter */
    .wcf-embed-checkout-form .woocommerce-checkout-review-order-table .cart_item td {
        padding: 0.5rem 0 !important;
    }

    .devon-checkout-thumb {
        width: 40px !important;
        height: 40px !important;
    }

    .devon-checkout-product {
        gap: 0.5rem;
    }

    .devon-checkout-product-name {
        font-size: 0.82rem !important;
    }

    /* Totals */
    .wcf-embed-checkout-form .woocommerce-checkout-review-order-table tfoot th,
    .wcf-embed-checkout-form .woocommerce-checkout-review-order-table tfoot td {
        font-size: 0.82rem !important;
    }

    /* Trust badges */
    .devon-checkout-trust {
        gap: 0.5rem 1rem;
        font-size: 0.72rem;
    }

    /* Company section — compact */
    .devon-company-section {
        padding: 0.85rem 1rem !important;
    }

    /* Place order button */
    .wcf-embed-checkout-form #place_order {
        font-size: 0.95rem !important;
        height: 52px !important;
    }

    /* Terms text smaller */
    .wcf-embed-checkout-form .woocommerce-terms-and-conditions-wrapper p {
        font-size: 0.75rem !important;
    }

    /* Shipping methods compact */
    .wcf-embed-checkout-form .wcf-shipping-methods-wrapper {
        padding: 1rem !important;
    }

    .wcf-embed-checkout-form .woocommerce-shipping-methods li {
        padding: 0.65rem 0.85rem !important;
    }

    /* Header badges — stack or shrink */
    .devon-checkout-header .devon-header-badges {
        gap: 0.5rem;
    }

    .devon-checkout-header .devon-header-badges span {
        font-size: 0.72rem;
    }
}

/* ── Small phone (320px) ── */
@media (max-width: 360px) {
    .wcf-embed-checkout-form .woocommerce form.checkout {
        padding: 0.5rem !important;
    }

    .wcf-embed-checkout-form .woocommerce-billing-fields,
    .wcf-embed-checkout-form .woocommerce-shipping-fields,
    .wcf-embed-checkout-form .woocommerce-additional-fields {
        padding: 1rem 0.75rem 0.85rem;
    }

    .wcf-embed-checkout-form .form-row label {
        font-size: 0.78rem;
    }

    .wcf-embed-checkout-form .wcf-order-wrap {
        padding: 0.75rem !important;
    }

    .devon-upsell {
        padding: 0.65rem;
        gap: 0.5rem;
    }

    .devon-upsell__img {
        width: 40px;
        height: 40px;
    }

    .devon-checkout-thumb {
        width: 36px !important;
        height: 36px !important;
    }

    .wcf-embed-checkout-form .wc_payment_method > label {
        padding: 0.75rem 0.85rem !important;
        font-size: 0.82rem !important;
    }

    .wcf-embed-checkout-form #place_order {
        font-size: 0.88rem !important;
        height: 48px !important;
    }

    .devon-checkout-header .devon-header-badges {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
    }
}


/* ════════════════════════════════════════════════
   BILLING FIELDS LOCKED BY COMPANY ORDER
   ════════════════════════════════════════════════ */

.devon-billing--locked {
    background-color: var(--cream-warm) !important;
    opacity: 0.6;
    cursor: not-allowed !important;
    transition: all 0.2s ease;
    border-color: var(--card-border) !important;
    color: var(--text-muted) !important;
}

/* Parent row: osivljeno + ✕ indikator na hover */
.form-row.devon-billing-row--locked {
    position: relative;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.form-row.devon-billing-row--locked label {
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

.form-row.devon-billing-row--locked:hover {
    opacity: 0.95;
}

/* ✕ na hover (na form-row, ne na input — ::after ne deluje na <input>) */
.form-row.devon-billing-row--locked::after {
    content: '✕';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-faint);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.form-row.devon-billing-row--locked:hover::after {
    opacity: 0.7;
}


/* ════════════════════════════════════════════════
   SHIP TO DIFFERENT ADDRESS — SUBTILNA ANIMACIJA
   ════════════════════════════════════════════════ */

.shipping_address {
    border-radius: var(--radius);
    margin-top: 0.75rem;
    padding: 0.5rem 0.25rem 0 !important;
}

/* Skrij "Naziv podjetja" v shipping poljih */
.shipping_address #shipping_company_field {
    display: none !important;
}
