/* CYT-CART-CHECKOUT-001-R6
 * Scoped cart + classic-checkout design. Checkout hiding/locking is enabled
 * only after JavaScript completes and adds .cyt-checkout-enhanced.
 */

:root {
    --cyt-cc-forest: #0d4a38;
    --cyt-cc-forest-2: #17674d;
    --cyt-cc-sage: #eaf3ee;
    --cyt-cc-sage-2: #d9ede2;
    --cyt-cc-ivory: #fbfaf6;
    --cyt-cc-ink: #172b24;
    --cyt-cc-muted: #5c6c66;
    --cyt-cc-line: #d8e2dc;
    --cyt-cc-gold: #b8924f;
    --cyt-cc-focus: #0b6146;
    --cyt-cc-danger: #a83f35;
    --cyt-cc-shadow: 0 20px 55px rgba(13, 74, 56, 0.08);
}

body.woocommerce-cart .cyt-commerce-intro,
body.woocommerce-checkout .cyt-commerce-intro {
    align-items: center;
    background: var(--cyt-cc-sage);
    border: 1px solid #cfe1d7;
    border-radius: 10px;
    color: var(--cyt-cc-ink);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 0 auto 28px;
    max-width: 1280px;
    padding: 18px 22px;
}

.cyt-commerce-intro p { margin: 0; }
.cyt-commerce-intro span { color: var(--cyt-cc-forest); font-size: 13px; font-weight: 650; text-align: right; }

.cyt-cart-progress {
    align-items: center;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    margin: 0 auto 22px;
    max-width: 760px;
    padding: 0;
}
.cyt-cart-progress li { align-items: center; color: var(--cyt-cc-muted); display: flex; font-size: 13px; font-weight: 650; gap: 8px; justify-content: center; position: relative; }
.cyt-cart-progress li:not(:last-child)::after { background: var(--cyt-cc-line); content: ''; height: 1px; left: calc(50% + 45px); position: absolute; right: calc(-50% + 45px); top: 16px; }
.cyt-cart-progress li span { align-items: center; background: #fff; border: 1px solid #b8c9c0; border-radius: 50%; display: inline-flex; height: 32px; justify-content: center; width: 32px; }
.cyt-cart-progress li[aria-current='step'] { color: var(--cyt-cc-forest); }
.cyt-cart-progress li[aria-current='step'] span { background: var(--cyt-cc-forest); border-color: var(--cyt-cc-forest); color: #fff; }

/* Cart option 2 — preserve the native form and controls. */
body.woocommerce-cart.cyt-cart-enhanced .site-main .page-content > .container > .woocommerce,
body.cyt-cart-enhanced .site-main > .woocommerce,
body.cyt-cart-enhanced .entry-content > .woocommerce {
    display: grid;
    gap: 26px;
    grid-template-columns: minmax(0, 1fr) 360px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1280px;
}

body.cyt-cart-enhanced .woocommerce-notices-wrapper,
body.cyt-cart-enhanced .cyt-commerce-intro,
body.cyt-cart-enhanced .woocommerce > .return-to-shop {
    grid-column: 1 / -1;
}

body.cyt-cart-enhanced .woocommerce-cart-form {
    background: #fff;
    border: 1px solid var(--cyt-cc-line);
    border-radius: 12px;
    box-shadow: var(--cyt-cc-shadow);
    grid-column: 1;
    overflow: hidden;
}

body.cyt-cart-enhanced table.shop_table {
    border: 0;
    border-collapse: collapse;
    margin: 0;
}

body.cyt-cart-enhanced table.shop_table th {
    background: var(--cyt-cc-ivory);
    border-bottom: 1px solid var(--cyt-cc-line);
    color: var(--cyt-cc-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    padding: 16px;
    text-transform: uppercase;
}

body.cyt-cart-enhanced table.shop_table td {
    border-bottom: 1px solid var(--cyt-cc-line);
    padding: 22px 16px;
    vertical-align: middle;
}

body.cyt-cart-enhanced td.product-thumbnail img { border-radius: 8px; width: 90px; }
body.cyt-cart-enhanced td.product-name a { color: var(--cyt-cc-ink); font-weight: 700; }
body.cyt-cart-enhanced td.product-remove a { align-items: center; border: 1px solid var(--cyt-cc-line); border-radius: 50%; color: var(--cyt-cc-muted) !important; display: inline-flex; height: 30px; justify-content: center; width: 30px; }
body.cyt-cart-enhanced td.product-remove a:hover { border-color: var(--cyt-cc-danger); color: var(--cyt-cc-danger) !important; }

body.cyt-cart-enhanced .quantity .qty {
    border: 1px solid #bdccc4;
    border-radius: 6px;
    min-height: 42px;
    width: 72px;
}

/* Keep the native desktop/tablet cart readable at every pre-mobile width. */
@media (min-width: 1024px) {
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table {
        table-layout: fixed;
        width: 100%;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form th,
    body.cyt-cart-enhanced .woocommerce-cart-form td {
        box-sizing: border-box;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-remove { width: 48px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-thumbnail { width: 92px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-price { width: 92px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-quantity { width: 104px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-subtotal { width: 108px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-name {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form td.product-name,
    body.cyt-cart-enhanced .woocommerce-cart-form td.product-name a {
        font-family: inherit;
        font-size: 15px;
        line-height: 1.45;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-price,
    body.cyt-cart-enhanced .woocommerce-cart-form .product-subtotal {
        white-space: nowrap;
    }
}

@media (min-width: 1024px) and (max-width: 1179.98px) {
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table th,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table td {
        padding-left: 11px;
        padding-right: 11px;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-remove { width: 44px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-thumbnail { width: 82px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-price { width: 84px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-quantity { width: 94px; }
    body.cyt-cart-enhanced .woocommerce-cart-form .product-subtotal { width: 94px; }
}

/* A six-column cart is too brittle on tablet. Keep the native controls but
 * present each item as a spacious two-column card until desktop width. */
@media (min-width: 768px) and (max-width: 1023.98px) {
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive tbody {
        display: block;
        width: 100%;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive thead { display: none; }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive tr.cart_item {
        border-bottom: 1px solid var(--cyt-cc-line);
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        padding: 22px 20px;
        position: relative;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive tr.cart_item > td {
        border: 0;
        box-sizing: border-box;
        display: block;
        padding: 6px 10px;
        text-align: left !important;
        width: auto !important;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive tr.cart_item > td::before {
        color: var(--cyt-cc-muted);
        float: none;
        font-size: 11px;
        letter-spacing: 0.06em;
        margin-right: 10px;
        text-transform: uppercase;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-name::before { content: attr(data-title); }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-price::before { content: attr(data-title); }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-quantity::before { content: attr(data-title); }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-subtotal::before { content: attr(data-title); }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-remove::before,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-thumbnail::before { content: none !important; display: none !important; }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-remove { grid-column: 1; grid-row: 1; }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-thumbnail { grid-column: 1; grid-row: 2 / span 4; }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-thumbnail img { width: 82px; }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-name,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-price,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-quantity,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-subtotal { grid-column: 2; min-width: 0; }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-name,
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive td.product-name a {
        font-family: inherit;
        font-size: 16px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive tr:not(.cart_item) {
        display: block;
        width: 100%;
    }
    body.cyt-cart-enhanced .woocommerce-cart-form table.shop_table_responsive tr > td.actions {
        display: grid;
        gap: 12px;
        padding: 20px;
        width: 100% !important;
    }
}

body.cyt-cart-enhanced .shop_table .actions {
    background: #fff;
    padding: 18px;
}

body.cyt-cart-enhanced .coupon { display: flex; gap: 8px; }
body.cyt-cart-enhanced .coupon #coupon_code { border: 1px solid #bdccc4; border-radius: 6px; min-height: 44px; min-width: 180px; padding: 0 12px; }
body.cyt-cart-enhanced .button,
body.cyt-cart-enhanced .checkout-button {
    border-radius: 6px !important;
    min-height: 44px;
}

body.cyt-cart-enhanced .cart-collaterals {
    align-self: start;
    background: #fff;
    border: 1px solid var(--cyt-cc-line);
    border-radius: 12px;
    box-shadow: var(--cyt-cc-shadow);
    grid-column: 2;
    padding: 24px;
    position: sticky;
    top: 24px;
}

body.cyt-cart-enhanced .cart-collaterals .cart_totals { float: none; width: 100%; }
body.cyt-cart-enhanced .cart-collaterals .cart_totals,
body.cyt-cart-enhanced .cart-collaterals .cart_totals table.shop_table {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
}
body.cyt-cart-enhanced .cart-collaterals h2 { color: var(--cyt-cc-ink); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(28px, 2.4vw, 38px); margin: 0 0 18px; }
body.cyt-cart-enhanced .wc-proceed-to-checkout { padding-bottom: 0; }
body.cyt-cart-enhanced .wc-proceed-to-checkout .checkout-button { background: var(--cyt-cc-forest) !important; font-size: 15px; letter-spacing: 0.04em; padding: 16px 20px !important; text-transform: uppercase; }
body.cyt-cart-enhanced .wc-proceed-to-checkout .checkout-button:hover { background: #083b2d !important; }

.cyt-delivery-credit {
    background: var(--cyt-cc-sage);
    border: 1px solid #cfe1d7;
    border-radius: 9px;
    margin-bottom: 20px;
    padding: 18px;
}

.cyt-delivery-credit > strong { color: var(--cyt-cc-forest); display: block; font-size: 15px; }
.cyt-delivery-credit p { color: var(--cyt-cc-muted); font-size: 13px; line-height: 1.55; margin: 10px 0 0; }
.cyt-delivery-credit__track { background: #fff; border: 1px solid #c2d6ca; border-radius: 999px; height: 8px; margin-top: 12px; overflow: hidden; }
.cyt-delivery-credit__track span { background: var(--cyt-cc-gold); display: block; height: 100%; }

/* Native shipping-rate copy, shared by cart and checkout. */
.cyt-shipping-method-copy {
    color: var(--cyt-cc-muted);
    display: grid;
    font-size: 14px;
    gap: 7px;
    line-height: 1.5;
    margin: 12px 0 2px 28px;
}

.cyt-shipping-method-copy > strong { color: var(--cyt-cc-ink); font-weight: 600; }
.cyt-shipping-method-copy__badge { background: var(--cyt-cc-sage-2); border-radius: 999px; color: var(--cyt-cc-forest); font-size: 11px; font-weight: 700; justify-self: start; letter-spacing: 0.06em; padding: 4px 9px; text-transform: uppercase; }
.cyt-shipping-method-copy__timing { color: var(--cyt-cc-forest); font-weight: 650; }
.cyt-shipping-method-copy__credit { background: #f8f2e7; border-left: 3px solid var(--cyt-cc-gold); color: #5e4a27; padding: 8px 10px; }

/* The native cart totals shipping row is a two-column table by default. Long
 * service explanations need the full summary-card width, not a narrow cell. */
body.cyt-cart-enhanced .cart_totals tr.woocommerce-shipping-totals,
body.cyt-cart-enhanced .cart_totals tr.shipping,
body.cyt-cart-enhanced .cart_totals tr.woocommerce-shipping-totals > th,
body.cyt-cart-enhanced .cart_totals tr.woocommerce-shipping-totals > td,
body.cyt-cart-enhanced .cart_totals tr.shipping > th,
body.cyt-cart-enhanced .cart_totals tr.shipping > td {
    box-sizing: border-box;
    display: block !important;
    width: 100% !important;
}
body.cyt-cart-enhanced .cart_totals tr.woocommerce-shipping-totals > th,
body.cyt-cart-enhanced .cart_totals tr.shipping > th {
    padding-bottom: 10px !important;
    text-align: left !important;
}
body.cyt-cart-enhanced .cart_totals tr.woocommerce-shipping-totals > td,
body.cyt-cart-enhanced .cart_totals tr.shipping > td {
    padding-top: 0 !important;
    text-align: left !important;
}
body.cyt-cart-enhanced .cart_totals tr.woocommerce-shipping-totals > td::before,
body.cyt-cart-enhanced .cart_totals tr.shipping > td::before { display: none !important; }
body.cyt-cart-enhanced .cart_totals ul#shipping_method,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods {
    display: grid !important;
    gap: 12px;
    list-style: none !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
}
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li {
    align-items: start;
    background: #fff;
    border: 1px solid var(--cyt-cc-line);
    border-radius: 8px;
    box-sizing: border-box;
    display: grid !important;
    gap: 0 10px;
    grid-template-columns: 22px minmax(0, 1fr);
    list-style: none !important;
    margin: 0 !important;
    padding: 15px !important;
    width: 100% !important;
}
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li::marker,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li::marker { content: ''; }
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li > input,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li > input { grid-column: 1; margin: 3px 0 0 !important; }
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li > label,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li > label {
    align-items: flex-start;
    display: flex !important;
    gap: 12px;
    grid-column: 2;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li > label .amount,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li > label .amount { flex: 0 0 auto; white-space: nowrap; }
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li > .cyt-shipping-method-copy,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li > .cyt-shipping-method-copy {
    grid-column: 2;
    margin: 10px 0 0;
    min-width: 0;
}
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li:has(> input[type='hidden']),
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li:has(> input[type='hidden']) { grid-template-columns: minmax(0, 1fr); }
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li:has(> input[type='hidden']) > label,
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li:has(> input[type='hidden']) > .cyt-shipping-method-copy,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li:has(> input[type='hidden']) > label,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li:has(> input[type='hidden']) > .cyt-shipping-method-copy { grid-column: 1; }
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li.cyt-shipping-rate--single-hidden,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li.cyt-shipping-rate--single-hidden { grid-template-columns: minmax(0, 1fr); }
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li.cyt-shipping-rate--single-hidden > label,
body.cyt-cart-enhanced .cart_totals ul#shipping_method > li.cyt-shipping-rate--single-hidden > .cyt-shipping-method-copy,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li.cyt-shipping-rate--single-hidden > label,
body.cyt-cart-enhanced .cart_totals ul.woocommerce-shipping-methods > li.cyt-shipping-rate--single-hidden > .cyt-shipping-method-copy { grid-column: 1; }

/* Checkout option 3. These layout rules activate only after successful JS. */
html.cyt-checkout-enhanced { scroll-padding-top: 24px; }
body.cyt-checkout-enhanced form.checkout.woocommerce-checkout > #customer_details,
body.cyt-checkout-enhanced form.checkout.woocommerce-checkout > #order_review_heading,
body.cyt-checkout-enhanced form.checkout.woocommerce-checkout > #order_review {
    display: none !important;
}

body.cyt-checkout-enhanced form.checkout.woocommerce-checkout {
    float: none;
    margin: 0 auto;
    max-width: 1280px;
    width: 100%;
}

.cyt-checkout-shell {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.cyt-checkout-steps { display: grid; gap: 14px; }
.cyt-checkout-step {
    background: #fff;
    border: 1px solid var(--cyt-cc-line);
    border-radius: 10px;
    overflow: clip;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cyt-checkout-step:has(.cyt-checkout-step__header[aria-expanded='true']) { border-color: #a9c9b7; box-shadow: 0 12px 35px rgba(13, 74, 56, 0.06); }
.cyt-checkout-step__header {
    align-items: center;
    background: #fff;
    border: 0;
    color: var(--cyt-cc-ink);
    cursor: pointer;
    display: grid;
    font: inherit;
    grid-template-columns: 46px 1fr auto;
    min-height: 86px;
    padding: 14px 22px;
    text-align: left;
    width: 100%;
}

.cyt-checkout-step__header:focus-visible,
.cyt-checkout-next:focus-visible,
.cyt-checkout-ledger__edit:focus-visible,
body.cyt-cart-enhanced a:focus-visible,
body.cyt-cart-enhanced button:focus-visible,
body.cyt-cart-enhanced input:focus-visible {
    outline: 3px solid var(--cyt-cc-focus);
    outline-offset: 3px;
}

.cyt-checkout-step__header:disabled { cursor: not-allowed; opacity: 0.58; }
.cyt-checkout-step__number { align-items: center; background: var(--cyt-cc-forest); border-radius: 50%; color: #fff; display: inline-flex; font-weight: 700; height: 38px; justify-content: center; width: 38px; }
.cyt-checkout-step__title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(22px, 2.2vw, 30px); }
.cyt-checkout-step__heading { display: grid; gap: 4px; }
.cyt-checkout-step__summary { color: var(--cyt-cc-muted); font-size: 13px; font-weight: 400; line-height: 1.35; }
.cyt-checkout-step__state { color: var(--cyt-cc-forest); font-size: 22px; font-weight: 700; }
.cyt-checkout-step.is-locked .cyt-checkout-step__number { background: #9baaa3; }
.cyt-checkout-step__panel { border-top: 1px solid var(--cyt-cc-line); padding: 24px; }
.cyt-checkout-step__panel[hidden] { display: none !important; }
.cyt-checkout-step__panel .form-row { box-sizing: border-box; clear: none; float: none; margin: 0 0 16px; width: 100%; }
.cyt-checkout-step__panel .form-row-first,
.cyt-checkout-step__panel .form-row-last { display: inline-block; vertical-align: top; width: calc(50% - 7px); }
.cyt-checkout-step__panel .form-row-first { margin-right: 10px; }
.cyt-checkout-step__panel label { color: var(--cyt-cc-ink); font-size: 14px; font-weight: 600; }
.cyt-checkout-step__panel input.input-text,
.cyt-checkout-step__panel select,
.cyt-checkout-step__panel textarea {
    background: #fff;
    border: 1px solid #bdccc4;
    border-radius: 7px;
    box-sizing: border-box;
    color: var(--cyt-cc-ink);
    min-height: 48px;
    padding: 10px 12px;
    width: 100%;
}

.cyt-checkout-step__panel .select2-container .select2-selection--single { border: 1px solid #bdccc4; border-radius: 7px; height: 48px; }
.cyt-checkout-step__panel .select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px; }
.cyt-checkout-step__panel .select2-container .select2-selection--single .select2-selection__arrow { height: 46px; }
.cyt-checkout-phone-grid {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(190px, 0.9fr) minmax(0, 1.1fr);
}
.cyt-checkout-phone-grid .form-row { margin-bottom: 16px; }
.cyt-checkout-phone-grid .select2-container { max-width: 100%; width: 100% !important; }
.cyt-checkout-phone-grid .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cyt-checkout-phone-grid .cyt-phone-native--fallback-hidden { left: -9999px !important; position: absolute !important; width: 1px !important; }
.cyt-checkout-phone-grid .cyt-phone-code-fallback { box-sizing: border-box; min-height: 48px; width: 100%; }
.cyt-checkout-phone-grid .woocommerce-invalid .select2-selection,
.cyt-checkout-phone-grid .woocommerce-invalid .cyt-phone-code-fallback { border-color: #a62828 !important; box-shadow: 0 0 0 1px #a62828; }
.cyt-phone-code-dropdown .select2-search--dropdown { display: block !important; padding: 8px; }
.cyt-phone-code-dropdown .select2-search__field { box-sizing: border-box; min-height: 42px; width: 100% !important; }
.cyt-checkout-step__intro { background: var(--cyt-cc-sage); border-radius: 8px; color: var(--cyt-cc-ink); display: grid; gap: 3px; line-height: 1.55; margin: 0 0 14px; padding: 15px 17px; }
.cyt-checkout-step__intro strong { font-weight: 650; }
.cyt-checkout-step__intro span { color: var(--cyt-cc-muted); font-size: 13px; }
.cyt-shipping-match { color: var(--cyt-cc-ink); line-height: 1.55; margin: 0 0 18px; }
.cyt-checkout-next { align-items: center; background: var(--cyt-cc-forest) !important; border: 0 !important; border-radius: 6px !important; color: #fff !important; display: inline-flex; font-size: 14px !important; justify-content: center; margin-top: 10px !important; min-height: 46px; padding: 12px 20px !important; }
.cyt-checkout-next:hover { background: #083b2d !important; }
.cyt-checkout-status { height: 1px; margin: 0; overflow: hidden; position: absolute; width: 1px; clip: rect(0 0 0 0); }

body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native,
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native tbody,
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native tr,
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native td {
    box-sizing: border-box;
    display: block !important;
    max-width: none !important;
    width: 100% !important;
}
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native { border: 0 !important; margin: 0 !important; table-layout: fixed !important; }
.cyt-checkout-step__panel[aria-busy='true'] .cyt-shipping-native,
.cyt-checkout-step__panel[aria-busy='true'] .cyt-shipping-credit-note { display: none !important; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native th { display: none !important; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native td { padding: 0 !important; text-align: left !important; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native td::before { display: none !important; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul#shipping_method,
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul.woocommerce-shipping-methods {
    display: grid !important;
    gap: 12px;
    list-style: none !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
}
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul > li {
    align-items: start;
    background: #fff;
    border: 1px solid var(--cyt-cc-line);
    border-radius: 8px;
    box-sizing: border-box;
    display: grid !important;
    gap: 0 10px;
    grid-template-columns: 22px minmax(0, 1fr);
    list-style: none !important;
    margin: 0 !important;
    padding: 18px !important;
    width: 100% !important;
}
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul > li::marker { content: ''; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul > li:has(input:checked),
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul > li.cyt-shipping-rate--selected { background: #f1f8f4; border-color: #3b8c67; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native input[type='radio'] {
    accent-color: var(--cyt-cc-forest);
    float: none !important;
    grid-column: 1;
    height: 20px;
    margin: 3px 0 0 !important;
    width: 20px;
}
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native label {
    align-items: flex-start;
    display: flex !important;
    font-size: 16px;
    gap: 12px;
    grid-column: 2;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native label .amount { flex: 0 0 auto; white-space: nowrap; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native .cyt-shipping-method-copy {
    grid-column: 2;
    margin: 10px 0 0;
    min-width: 0;
}
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native li:has(> input[type='hidden']) { grid-template-columns: minmax(0, 1fr); }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native li:has(> input[type='hidden']) > label,
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native li:has(> input[type='hidden']) > .cyt-shipping-method-copy { grid-column: 1; }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native li.cyt-shipping-rate--single-hidden { grid-template-columns: minmax(0, 1fr); }
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native li.cyt-shipping-rate--single-hidden > label,
body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native li.cyt-shipping-rate--single-hidden > .cyt-shipping-method-copy { grid-column: 1; }
.cyt-shipping-credit-note {
    background: var(--cyt-cc-sage);
    border-radius: 8px;
    color: var(--cyt-cc-muted);
    font-size: 13px;
    line-height: 1.55;
    margin: 16px 0 4px;
    padding: 13px 15px;
}

.cyt-checkout-step--payment #payment { background: transparent !important; }
.cyt-checkout-step--payment #payment ul.payment_methods { border: 0; padding: 0; }
.cyt-checkout-step--payment #payment div.payment_box { background: var(--cyt-cc-sage); border-radius: 7px; color: var(--cyt-cc-ink); }
.cyt-checkout-step--payment #payment div.payment_box::before { border-bottom-color: var(--cyt-cc-sage); }

.cyt-checkout-ledger {
    background: #fff;
    border: 1px solid var(--cyt-cc-line);
    border-radius: 10px;
    box-shadow: var(--cyt-cc-shadow);
    padding: 24px;
    position: sticky;
    top: 24px;
}
.cyt-checkout-ledger__heading { align-items: center; border-bottom: 1px solid var(--cyt-cc-line); display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 16px; }
.cyt-checkout-ledger__heading h2 { color: var(--cyt-cc-ink); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(26px, 2.2vw, 36px); margin: 0; }
.cyt-checkout-ledger__title p { color: var(--cyt-cc-muted); font-size: 13px; margin: 3px 0 0; }
.cyt-checkout-ledger__edit { color: var(--cyt-cc-forest); font-size: 14px; font-weight: 650; }
.cyt-review-native .woocommerce-checkout-review-order-table { width: 100%; }
.cyt-review-native .woocommerce-checkout-review-order-table th,
.cyt-review-native .woocommerce-checkout-review-order-table td { border-bottom: 1px solid var(--cyt-cc-line); padding: 13px 4px; }
.cyt-review-native .woocommerce-checkout-review-order-table td { text-align: right; }
.cyt-review-native .place-order { display: none; }
.cyt-checkout-shell.is-review-ready .cyt-review-native .place-order { display: block; margin-top: 20px; }
.cyt-review-native #place_order { background: var(--cyt-cc-forest) !important; border-radius: 6px !important; float: none; min-height: 50px; width: 100%; }
.cyt-review-native #place_order:disabled { cursor: not-allowed; opacity: 0.52; }
.cyt-place-order-placeholder { margin-top: 20px; }
.cyt-place-order-placeholder[hidden] { display: none !important; }
.cyt-place-order-placeholder .button { background: #8aa197 !important; border: 0 !important; border-radius: 6px !important; color: #fff !important; min-height: 50px; opacity: 0.7; width: 100%; }
.cyt-place-order-placeholder p { color: var(--cyt-cc-muted); font-size: 12px; line-height: 1.5; margin: 9px 0 0; text-align: center; }
.cyt-checkout-trust { color: var(--cyt-cc-ink); display: grid; font-size: 13px; gap: 9px; list-style: none; margin: 18px 0 0; padding: 16px 0 0; }
.cyt-checkout-trust li { align-items: center; display: flex; gap: 9px; }
.cyt-checkout-trust li::before { color: var(--cyt-cc-forest); content: '✓'; font-weight: 800; }

@media (max-width: 1180px) {
    body.woocommerce-cart.cyt-cart-enhanced .site-main .page-content > .container > .woocommerce,
    body.cyt-cart-enhanced .site-main > .woocommerce,
    body.cyt-cart-enhanced .entry-content > .woocommerce,
    .cyt-checkout-shell { grid-template-columns: 1fr; }
    body.cyt-cart-enhanced .woocommerce-cart-form,
    body.cyt-cart-enhanced .cart-collaterals { grid-column: 1; }
    body.cyt-cart-enhanced .cart-collaterals,
    .cyt-checkout-ledger { position: static; }
}

@media (max-width: 767.98px) {
    .cyt-cart-progress { margin-bottom: 18px; }
    .cyt-cart-progress li { flex-direction: column; font-size: 11px; gap: 5px; }
    .cyt-cart-progress li:not(:last-child)::after { left: calc(50% + 22px); right: calc(-50% + 22px); top: 16px; }
    body.woocommerce-cart .cyt-commerce-intro,
    body.woocommerce-checkout .cyt-commerce-intro { align-items: flex-start; border-radius: 8px; flex-direction: column; margin-bottom: 20px; padding: 15px; }
    .cyt-commerce-intro span { text-align: left; }
    body.woocommerce-cart.cyt-cart-enhanced .site-main .page-content > .container > .woocommerce,
    body.cyt-cart-enhanced .site-main > .woocommerce,
    body.cyt-cart-enhanced .entry-content > .woocommerce { gap: 18px; }
    body.cyt-cart-enhanced .woocommerce-cart-form,
    body.cyt-cart-enhanced .cart-collaterals { border-radius: 8px; }
    body.cyt-cart-enhanced .cart-collaterals { padding: 18px; }
    body.cyt-cart-enhanced table.shop_table_responsive tr { border-bottom: 1px solid var(--cyt-cc-line); display: grid; grid-template-columns: 72px minmax(0, 1fr); padding: 18px 12px; }
    body.cyt-cart-enhanced table.shop_table_responsive tr td { border: 0; display: block; padding: 6px 8px; text-align: left !important; }
    body.cyt-cart-enhanced table.shop_table_responsive tr td::before { color: var(--cyt-cc-muted); float: none; font-size: 11px; letter-spacing: 0.06em; margin-right: 8px; text-transform: uppercase; }
    body.cyt-cart-enhanced table.shop_table_responsive td.product-remove { grid-column: 1; grid-row: 1; }
    body.cyt-cart-enhanced table.shop_table_responsive td.product-thumbnail { grid-column: 1; grid-row: 2 / span 4; }
    body.cyt-cart-enhanced table.shop_table_responsive td.product-name,
    body.cyt-cart-enhanced table.shop_table_responsive td.product-price,
    body.cyt-cart-enhanced table.shop_table_responsive td.product-quantity,
    body.cyt-cart-enhanced table.shop_table_responsive td.product-subtotal { grid-column: 2; }
    body.cyt-cart-enhanced table.shop_table_responsive td.product-name,
    body.cyt-cart-enhanced table.shop_table_responsive td.product-name a {
        font-family: inherit;
        font-size: 15px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: normal;
    }
    body.cyt-cart-enhanced table.shop_table_responsive tr td.actions { display: grid; gap: 10px; grid-column: 1 / -1; padding-top: 16px; }
    body.cyt-cart-enhanced .coupon { display: grid; }
    body.cyt-cart-enhanced .coupon #coupon_code { min-width: 0; width: 100%; }
    .cyt-checkout-step__header { grid-template-columns: 42px 1fr auto; min-height: 76px; padding: 12px 14px; }
    .cyt-checkout-step__number { height: 34px; width: 34px; }
    .cyt-checkout-step__title { font-size: 22px; }
    .cyt-checkout-step__panel { padding: 18px 14px; }
    .cyt-checkout-step__panel .form-row-first,
    .cyt-checkout-step__panel .form-row-last { display: block; margin-right: 0; width: 100%; }
    .cyt-checkout-phone-grid { grid-template-columns: 1fr; gap: 0; }
    .cyt-checkout-next { width: 100%; }
    .cyt-checkout-ledger { border-radius: 8px; padding: 18px; }
    body.cyt-checkout-enhanced .cyt-checkout-step--shipping .cyt-shipping-native ul > li { padding: 15px 12px !important; }
    .cyt-shipping-method-copy { font-size: 13px; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cyt-checkout-step { transition: none; }
    html.cyt-checkout-enhanced { scroll-behavior: auto; }
}

/* CYT-CART-CONTAINER-SHADOW-001: expand the actual cart parent above the two-column breakpoint. */
@media (min-width: 1180.02px) {
    body.woocommerce-cart.cyt-cart-enhanced .site-main .page-content > .container {
        max-width: 1180px;
    }
}

/* CYT-CART-CHECKOUT-001-R8: the native totals table must use the full card,
 * and the product form must end with its contents instead of stretching. */
body.woocommerce-cart.cyt-cart-enhanced .woocommerce-cart-form {
    align-self: start;
}
body.woocommerce-cart.cyt-cart-enhanced .cart-collaterals .cart_totals {
    background: transparent;
    margin-top: 0;
    padding: 0;
}
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table,
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody {
    display: block;
    width: 100%;
}
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
}
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody > tr > th,
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody > tr > td {
    display: block !important;
    min-width: 0;
    padding: 14px 0;
}
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody > tr > th {
    text-align: left;
}
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody > tr:not(.shipping):not(.woocommerce-shipping-totals) > td {
    text-align: right !important;
}
body.woocommerce-cart.cyt-cart-enhanced .cart_totals table.shop_table > tbody > tr > td::before {
    display: none !important;
}

/* CYT-CART-CHECKOUT-001-R9: approved items-only Cart summary, no delivery selector. */
body.woocommerce-cart .cyt-cart-summary h2 { margin: 0 0 20px; }
body.woocommerce-cart .cyt-cart-summary th { color: #475b52; }
body.woocommerce-cart .cyt-cart-summary__note {
    color: #475b52; font-size: 13px; line-height: 1.6; margin: 14px 0 20px;
}
body.woocommerce-cart .cyt-cart-summary .cyt-delivery-credit { margin: 0 0 20px; }
body.woocommerce-cart .cyt-cart-summary .cyt-cart-items-net { font-weight: 600; }
body.woocommerce-cart .cyt-cart-summary .cart-discount > th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .cart-discount > th {
    color: #316f50;
}
body.woocommerce-cart .cyt-cart-summary .woocommerce-remove-coupon {
    display: inline-block; text-decoration: underline; color: #316f50;
}
body.woocommerce-cart .cyt-cart-summary .wc-proceed-to-checkout { padding-bottom: 0; }
