/**
 * Tous Les Gouts — COD Checkout Form
 * Version: 2.1.0 — Navy Maritime Brand
 * Palette: Navy #0E2A47 · Cream #FAF6EC · Gold #C9A24C
 */

/* ================================
   DESIGN TOKENS
   ================================ */
.mcod-checkout-form-wrapper {
    /* Brand */
    --tlg-navy:        #0E2A47;
    --tlg-navy-deep:   #08203A;
    --tlg-navy-soft:   #1E4570;

    --tlg-cream:       #FAF6EC;
    --tlg-cream-dark:  #F2EBD9;

    --tlg-gold:        #C9A24C;
    --tlg-gold-soft:   #E0C283;
    --tlg-gold-pale:   #FBF3DF;

    /* Surfaces */
    --tlg-white:       #FFFFFF;
    --tlg-surface:     #FFFFFF;
    --tlg-tint:        rgba(14, 42, 71, 0.04);
    --tlg-overlay:     rgba(14, 42, 71, 0.08);

    /* Text */
    --tlg-text:        #0E2A47;
    --tlg-text-soft:   #45597A;
    --tlg-text-muted:  #7C8AA1;

    /* State */
    --tlg-success:     #1F8F5B;
    --tlg-success-bg:  #E6F4ED;
    --tlg-error:       #C73E3E;
    --tlg-error-bg:    #FBE9E9;

    /* Borders */
    --tlg-border:        #DDE3EE;
    --tlg-border-soft:   #E9EDF4;
    --tlg-border-strong: #C3CCD9;

    /* Effects */
    --tlg-shadow-sm:   0 1px 2px rgba(14, 42, 71, 0.06);
    --tlg-shadow:      0 4px 18px rgba(14, 42, 71, 0.08);
    --tlg-shadow-lg:   0 12px 32px rgba(14, 42, 71, 0.14);
    --tlg-ring:        0 0 0 4px rgba(14, 42, 71, 0.12);

    /* Radii */
    --tlg-r-xs:   6px;
    --tlg-r-sm:  10px;
    --tlg-r:     14px;
    --tlg-r-lg:  18px;
    --tlg-r-pill: 999px;

    /* Typography */
    --tlg-font: 'Cairo', 'Tajawal', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Motion */
    --tlg-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --tlg-fast: 0.15s var(--tlg-ease);
    --tlg-base: 0.25s var(--tlg-ease);
    --tlg-slow: 0.4s var(--tlg-ease);
}

/* ================================
   WRAPPER / SHELL
   ================================ */
.mcod-checkout-form-wrapper {
    position: relative;
    margin: 24px 0;
    direction: rtl;
    text-align: start;
    font-family: var(--tlg-font);
    color: var(--tlg-text);
    line-height: 1.5;
}

.mcod-checkout-form-wrapper *,
.mcod-checkout-form-wrapper *::before,
.mcod-checkout-form-wrapper *::after {
    box-sizing: border-box;
}

.mcod-checkout-form {
    position: relative;
    background: var(--tlg-surface);
    border: 1px solid var(--tlg-border-soft);
    border-radius: var(--tlg-r-lg);
    box-shadow: var(--tlg-shadow);
    overflow: hidden;
}

/* ================================
   BRAND HEADER
   ================================ */
.mcod-brand-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(201,162,76,0.18) 0%, transparent 50%),
        linear-gradient(135deg, var(--tlg-navy) 0%, var(--tlg-navy-deep) 100%);
    color: #fff;
}

.mcod-brand-header::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--tlg-gold), transparent);
}

.mcod-brand-anchor {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(224, 194, 131, 0.45);
    border-radius: 50%;
    color: var(--tlg-gold-soft);
}

.mcod-brand-anchor svg {
    width: 24px;
    height: 24px;
}

.mcod-brand-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
    min-width: 0;
}

.mcod-brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mcod-brand-tag {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mcod-brand-trust {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(201, 162, 76, 0.18);
    border: 1px solid rgba(224, 194, 131, 0.35);
    border-radius: var(--tlg-r-pill);
    color: var(--tlg-gold-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.mcod-brand-trust svg {
    width: 14px;
    height: 14px;
}

/* ================================
   PRODUCT SUMMARY
   ================================ */
.mcod-product-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--tlg-cream);
    border-bottom: 1px solid var(--tlg-cream-dark);
}

.mcod-product-image {
    width: 72px;
    height: 72px;
    border-radius: var(--tlg-r-sm);
    object-fit: cover;
    background: var(--tlg-white);
    border: 1px solid var(--tlg-border);
    box-shadow: var(--tlg-shadow-sm);
}

.mcod-product-info {
    flex: 1 1 auto;
    min-width: 0;
}

.mcod-product-name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--tlg-navy);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mcod-product-price-display,
.mcod-product-price-display .amount,
.mcod-product-price-display bdi {
    font-size: 22px;
    font-weight: 800;
    color: var(--tlg-navy);
}

/* ================================
   FORM BODY
   ================================ */
.mcod-form-body {
    position: relative;
    padding: 22px;
}

/* ================================
   SECTIONS
   ================================ */
.mcod-form-section {
    margin-bottom: 22px;
}

.mcod-form-section:last-of-type {
    margin-bottom: 0;
}

.mcod-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 800;
    color: var(--tlg-navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mcod-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--tlg-gold);
    flex: 0 0 auto;
}

.mcod-section-title::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(to left, var(--tlg-border) 0%, transparent 100%);
}

[dir="ltr"] .mcod-section-title::after {
    background: linear-gradient(to right, var(--tlg-border) 0%, transparent 100%);
}

/* ================================
   FORM ROWS / INPUTS
   ================================ */
.mcod-form-row {
    margin-bottom: 14px;
}

.mcod-form-row:last-child {
    margin-bottom: 0;
}

.mcod-form-row > label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tlg-text-soft);
}

.mcod-form-row .required {
    color: var(--tlg-error);
    margin-inline-start: 2px;
    font-weight: 700;
}

.mcod-input-wrapper {
    position: relative;
}

.mcod-checkout-form input[type="text"],
.mcod-checkout-form input[type="tel"],
.mcod-checkout-form input[type="email"],
.mcod-checkout-form input[type="number"],
.mcod-checkout-form select {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    background: var(--tlg-white);
    border: 1.5px solid var(--tlg-border);
    border-radius: var(--tlg-r-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--tlg-text);
    transition: border-color var(--tlg-fast), box-shadow var(--tlg-fast), background-color var(--tlg-fast);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    box-shadow: none;
}

.mcod-checkout-form input::placeholder {
    color: var(--tlg-text-muted);
    font-weight: 400;
    opacity: 1;
}

.mcod-checkout-form input:focus,
.mcod-checkout-form select:focus {
    border-color: var(--tlg-navy);
    box-shadow: var(--tlg-ring);
}

.mcod-checkout-form input:hover:not(:focus):not(:disabled),
.mcod-checkout-form select:hover:not(:focus):not(:disabled) {
    border-color: var(--tlg-border-strong);
}

.mcod-checkout-form input:disabled,
.mcod-checkout-form select:disabled {
    background: var(--tlg-tint);
    color: var(--tlg-text-muted);
    cursor: not-allowed;
}

.mcod-checkout-form input.mcod-error,
.mcod-checkout-form select.mcod-error {
    border-color: var(--tlg-error);
    background: var(--tlg-error-bg);
}

.mcod-checkout-form input.mcod-error:focus,
.mcod-checkout-form select.mcod-error:focus {
    box-shadow: 0 0 0 4px rgba(199, 62, 62, 0.18);
}

/* Trailing icon (RTL aware) — selector specificity must match the base input rule */
.mcod-checkout-form .mcod-input-wrapper input {
    padding-inline-end: 54px;
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

/* Keep the phone number readable as 05xxxxxxxx but anchored to the right */
.mcod-checkout-form .mcod-input-wrapper input[type="tel"],
.mcod-checkout-form .mcod-input-wrapper input[type="number"] {
    direction: ltr;
    text-align: right;
}

.mcod-checkout-form .mcod-input-wrapper input[type="tel"]::placeholder,
.mcod-checkout-form .mcod-input-wrapper input[type="number"]::placeholder {
    text-align: right;
    direction: ltr;
}

.mcod-input-icon {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--tlg-text-muted);
    pointer-events: none;
    transition: color var(--tlg-fast);
}

.mcod-input-wrapper input:focus + .mcod-input-icon {
    color: var(--tlg-navy);
}

/* Select chevron */
.mcod-checkout-form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E2A47' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 18px;
    padding-inline-start: 42px;
    padding-inline-end: 16px;
}

[dir="ltr"] .mcod-checkout-form select {
    background-position: right 14px center;
    padding-inline-end: 42px;
    padding-inline-start: 16px;
}

/* ================================
   VARIATIONS
   ================================ */
.mcod-variations-wrapper {
    margin-bottom: 22px;
    padding: 16px;
    background: var(--tlg-cream);
    border: 1px solid var(--tlg-cream-dark);
    border-radius: var(--tlg-r);
}

.mcod-variation-row {
    margin-bottom: 12px;
}

.mcod-variation-row:last-child {
    margin-bottom: 0;
}

.mcod-variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mcod-variation-option {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding: 10px 18px;
    background: var(--tlg-white);
    border: 1.5px solid var(--tlg-border);
    border-radius: var(--tlg-r-pill);
    color: var(--tlg-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--tlg-fast);
}

.mcod-variation-option:hover:not(.disabled):not(:disabled) {
    border-color: var(--tlg-navy);
    color: var(--tlg-navy);
    transform: translateY(-1px);
}

.mcod-variation-option.selected,
.mcod-variation-option.active {
    background: var(--tlg-navy);
    border-color: var(--tlg-navy);
    color: var(--tlg-white);
    box-shadow: var(--tlg-shadow-sm);
}

.mcod-variation-option.disabled,
.mcod-variation-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ================================
   SHIPPING METHOD CARDS
   ================================ */
.mcod-shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mcod-shipping-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--tlg-white);
    border: 1.5px solid var(--tlg-border);
    border-radius: var(--tlg-r);
    cursor: pointer;
    transition: all var(--tlg-fast);
}

.mcod-shipping-option:hover {
    border-color: var(--tlg-navy-soft);
    background: var(--tlg-tint);
}

.mcod-shipping-option.selected {
    border-color: var(--tlg-navy);
    background:
        linear-gradient(135deg, rgba(14,42,71,0.04) 0%, rgba(201,162,76,0.05) 100%);
    box-shadow: var(--tlg-ring);
}

.mcod-shipping-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.mcod-shipping-option::after {
    content: '';
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 2px solid var(--tlg-border-strong);
    border-radius: 50%;
    background: var(--tlg-white);
    transition: all var(--tlg-fast);
    order: 99;
}

.mcod-shipping-option.selected::after {
    border-color: var(--tlg-navy);
    background: var(--tlg-navy);
    box-shadow: inset 0 0 0 4px var(--tlg-white);
}

.mcod-shipping-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--tlg-cream);
    border-radius: var(--tlg-r-sm);
    color: var(--tlg-navy);
    transition: all var(--tlg-fast);
}

.mcod-shipping-option.selected .mcod-shipping-icon {
    background: var(--tlg-navy);
    color: var(--tlg-gold-soft);
}

.mcod-shipping-icon svg {
    width: 22px;
    height: 22px;
}

.mcod-shipping-details {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "name  price"
        "desc  price";
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
}

.mcod-shipping-name {
    grid-area: name;
    font-size: 15px;
    font-weight: 700;
    color: var(--tlg-navy);
}

.mcod-shipping-desc {
    grid-area: desc;
    font-size: 12px;
    color: var(--tlg-text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mcod-shipping-price {
    grid-area: price;
    align-self: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--tlg-navy);
    background: var(--tlg-gold-pale);
    padding: 5px 12px;
    border-radius: var(--tlg-r-pill);
    white-space: nowrap;
    transition: all var(--tlg-fast);
}

.mcod-shipping-option.selected .mcod-shipping-price {
    background: var(--tlg-gold);
    color: var(--tlg-white);
    box-shadow: 0 4px 10px rgba(201, 162, 76, 0.35);
}

/* ================================
   QUANTITY STEPPER
   ================================ */
.mcod-quantity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--tlg-cream);
    border: 1px solid var(--tlg-cream-dark);
    border-radius: var(--tlg-r);
    margin-bottom: 22px;
}

.mcod-quantity-section > label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--tlg-navy);
}

.mcod-quantity-wrapper {
    display: inline-flex;
    align-items: center;
    background: var(--tlg-white);
    border: 1.5px solid var(--tlg-border);
    border-radius: var(--tlg-r-pill);
    overflow: hidden;
    box-shadow: var(--tlg-shadow-sm);
}

.mcod-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--tlg-navy);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--tlg-fast), color var(--tlg-fast);
    line-height: 1;
    padding: 0;
}

.mcod-qty-btn:hover {
    background: var(--tlg-cream);
}

.mcod-qty-btn:active {
    background: var(--tlg-overlay);
}

.mcod-quantity-wrapper input[type="number"] {
    width: 52px !important;
    height: 40px !important;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--tlg-navy);
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    -moz-appearance: textfield;
}

.mcod-quantity-wrapper input[type="number"]::-webkit-outer-spin-button,
.mcod-quantity-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ================================
   PROMO CODE
   ================================ */
.mcod-promo-section {
    margin-bottom: 22px;
    border: 1.5px dashed var(--tlg-gold);
    border-radius: var(--tlg-r);
    overflow: hidden;
    background: var(--tlg-gold-pale);
}

.mcod-promo-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--tlg-navy);
    transition: background var(--tlg-fast);
    user-select: none;
}

.mcod-promo-toggle:hover {
    background: rgba(201, 162, 76, 0.12);
}

.mcod-promo-toggle > svg:first-child {
    width: 18px;
    height: 18px;
    color: var(--tlg-gold);
    flex: 0 0 auto;
}

.mcod-promo-toggle > span {
    flex: 1 1 auto;
}

.mcod-promo-chevron {
    width: 16px;
    height: 16px;
    color: var(--tlg-navy);
    transition: transform var(--tlg-base);
    flex: 0 0 auto;
}

.mcod-promo-section.is-open .mcod-promo-chevron,
.mcod-promo-toggle.is-open .mcod-promo-chevron {
    transform: rotate(180deg);
}

.mcod-promo-body {
    padding: 12px 16px 16px;
    border-top: 1px dashed var(--tlg-gold-soft);
    background: var(--tlg-white);
}

.mcod-promo-input-row {
    display: flex;
    gap: 8px;
}

.mcod-promo-input-row input {
    flex: 1 1 auto;
    height: 44px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.mcod-promo-btn {
    height: 44px;
    padding: 0 18px;
    background: var(--tlg-navy);
    color: var(--tlg-white);
    border: none;
    border-radius: var(--tlg-r-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--tlg-fast), transform var(--tlg-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 90px;
}

.mcod-promo-btn:hover {
    background: var(--tlg-navy-deep);
}

.mcod-promo-btn:active {
    transform: scale(0.98);
}

.mcod-promo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mcod-promo-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--tlg-white);
    border-radius: 50%;
    animation: mcod-spin 0.7s linear infinite;
    display: inline-block;
}

.mcod-promo-message {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--tlg-r-sm);
}

.mcod-promo-message.is-error,
.mcod-promo-message.error {
    color: var(--tlg-error);
    background: var(--tlg-error-bg);
}

.mcod-promo-message.is-success,
.mcod-promo-message.success {
    color: var(--tlg-success);
    background: var(--tlg-success-bg);
}

.mcod-promo-applied {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--tlg-success-bg);
    border: 1px solid rgba(31, 143, 91, 0.25);
    border-radius: var(--tlg-r-sm);
}

.mcod-promo-applied-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tlg-success);
    font-size: 13px;
    font-weight: 700;
}

.mcod-promo-applied-info svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.mcod-promo-remove-btn {
    background: transparent;
    border: none;
    color: var(--tlg-error);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--tlg-r-xs);
    transition: background var(--tlg-fast);
}

.mcod-promo-remove-btn:hover {
    background: var(--tlg-error-bg);
}

.mcod-promo-remove-btn svg {
    width: 14px;
    height: 14px;
}

/* ================================
   ORDER SUMMARY
   ================================ */
.mcod-order-summary {
    margin-bottom: 18px;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--tlg-cream) 0%, #FBF7EB 100%);
    border: 1px solid var(--tlg-cream-dark);
    border-radius: var(--tlg-r);
    position: relative;
    overflow: hidden;
}

.mcod-order-summary::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--tlg-gold) 0%, var(--tlg-navy) 100%);
}

.mcod-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--tlg-text-soft);
    gap: 12px;
}

.mcod-summary-row > span:first-child {
    font-weight: 500;
}

.mcod-summary-row > span:last-child {
    font-weight: 700;
    color: var(--tlg-navy);
    text-align: end;
}

.mcod-summary-row.mcod-discount-row,
.mcod-summary-row.mcod-discount-row > span:first-child,
.mcod-summary-row.mcod-discount-row > span:last-child,
.mcod-discount-value {
    color: var(--tlg-success) !important;
}

.mcod-summary-row.mcod-total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1.5px dashed var(--tlg-border-strong);
}

.mcod-summary-row.mcod-total > span:first-child {
    font-size: 15px;
    font-weight: 800;
    color: var(--tlg-navy);
}

.mcod-summary-row.mcod-total > span:last-child,
.mcod-summary-row.mcod-total .amount,
.mcod-summary-row.mcod-total bdi {
    font-size: 22px;
    font-weight: 800;
    color: var(--tlg-navy);
}

/* ================================
   SUBMIT BUTTON
   ================================ */
.mcod-form-submit {
    margin-bottom: 18px;
}

.mcod-submit-button {
    width: 100%;
    min-height: 58px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--tlg-navy) 0%, var(--tlg-navy-deep) 100%);
    color: var(--tlg-white);
    border: none;
    border-radius: var(--tlg-r);
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform var(--tlg-fast), box-shadow var(--tlg-fast), filter var(--tlg-fast);
    box-shadow: 0 8px 24px rgba(14, 42, 71, 0.28);
}

.mcod-submit-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform var(--tlg-slow);
    pointer-events: none;
}

.mcod-submit-button:hover::before {
    transform: translateX(100%);
}

.mcod-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(14, 42, 71, 0.36);
    filter: brightness(1.08);
}

.mcod-submit-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(14, 42, 71, 0.28);
}

.mcod-submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.mcod-btn-text,
.mcod-btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.mcod-btn-text svg {
    width: 22px;
    height: 22px;
    color: var(--tlg-gold-soft);
}

.mcod-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--tlg-white);
    border-radius: 50%;
    animation: mcod-spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes mcod-spin {
    to { transform: rotate(360deg); }
}

/* ================================
   TRUST BADGES
   ================================ */
.mcod-trust-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--tlg-border-soft);
}

.mcod-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tlg-text-soft);
    letter-spacing: 0.02em;
}

.mcod-trust-badge svg {
    width: 16px;
    height: 16px;
    color: var(--tlg-gold);
    flex: 0 0 auto;
}

/* ================================
   MESSAGES
   ================================ */
.mcod-messages {
    margin-top: 14px;
}

.mcod-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--tlg-r-sm);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    animation: mcod-slide-in 0.3s var(--tlg-ease);
}

.mcod-message.success {
    background: var(--tlg-success-bg);
    color: var(--tlg-success);
    border: 1px solid rgba(31, 143, 91, 0.2);
}

.mcod-message.error {
    background: var(--tlg-error-bg);
    color: var(--tlg-error);
    border: 1px solid rgba(199, 62, 62, 0.2);
}

.mcod-message.info {
    background: var(--tlg-cream);
    color: var(--tlg-navy);
    border: 1px solid var(--tlg-cream-dark);
}

@keyframes mcod-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================
   OUT OF STOCK
   ================================ */
.mcod-checkout-form-wrapper.mcod-out-of-stock .mcod-form-body > *:not(.mcod-stock-overlay) {
    opacity: 0.35;
    filter: grayscale(0.4);
    pointer-events: none;
    user-select: none;
}

.mcod-stock-overlay {
    position: absolute;
    inset: 22px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--tlg-r);
    border: 1px dashed var(--tlg-border-strong);
    text-align: center;
}

.mcod-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--tlg-error-bg);
    color: var(--tlg-error);
    border-radius: var(--tlg-r-pill);
    font-size: 15px;
    font-weight: 800;
    border: 1px solid rgba(199, 62, 62, 0.25);
}

.mcod-stock-badge svg {
    width: 22px;
    height: 22px;
}

.mcod-stock-overlay p {
    margin: 0;
    color: var(--tlg-text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ================================
   SIMILAR PRODUCTS
   ================================ */
.mcod-similar-products {
    margin-top: 24px;
    padding: 22px;
    background: var(--tlg-surface);
    border: 1px solid var(--tlg-border-soft);
    border-radius: var(--tlg-r-lg);
    box-shadow: var(--tlg-shadow);
}

.mcod-similar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 800;
    color: var(--tlg-navy);
}

.mcod-similar-title svg {
    width: 22px;
    height: 22px;
    color: var(--tlg-gold);
}

.mcod-similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.mcod-similar-card {
    display: block;
    text-decoration: none;
    background: var(--tlg-white);
    border: 1px solid var(--tlg-border-soft);
    border-radius: var(--tlg-r-sm);
    overflow: hidden;
    transition: transform var(--tlg-fast), box-shadow var(--tlg-fast), border-color var(--tlg-fast);
}

.mcod-similar-card:hover {
    transform: translateY(-3px);
    border-color: var(--tlg-navy);
    box-shadow: var(--tlg-shadow);
}

.mcod-similar-card img,
.mcod-similar-card-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--tlg-cream);
    display: block;
}

.mcod-similar-card-info {
    padding: 10px 12px;
}

.mcod-similar-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--tlg-navy);
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mcod-similar-card-price,
.mcod-similar-card-price .amount,
.mcod-similar-card-price bdi {
    font-size: 13px;
    font-weight: 800;
    color: var(--tlg-navy);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 600px) {
    .mcod-checkout-form-wrapper {
        margin: 16px 0;
    }

    .mcod-checkout-form {
        border-radius: var(--tlg-r);
    }

    .mcod-brand-header {
        padding: 14px 18px;
        gap: 12px;
    }

    .mcod-brand-anchor {
        width: 40px;
        height: 40px;
    }

    .mcod-brand-anchor svg {
        width: 20px;
        height: 20px;
    }

    .mcod-brand-name {
        font-size: 15px;
        letter-spacing: 0.04em;
    }

    .mcod-brand-tag {
        font-size: 10px;
    }

    .mcod-brand-trust {
        padding: 5px 10px;
        font-size: 11px;
    }

    .mcod-product-summary {
        padding: 14px 18px;
        gap: 12px;
    }

    .mcod-product-image {
        width: 60px;
        height: 60px;
    }

    .mcod-product-name {
        font-size: 14px;
    }

    .mcod-product-price-display,
    .mcod-product-price-display .amount,
    .mcod-product-price-display bdi {
        font-size: 19px;
    }

    .mcod-form-body {
        padding: 18px;
    }

    .mcod-form-section {
        margin-bottom: 20px;
    }

    .mcod-section-title {
        font-size: 12px;
    }

    .mcod-checkout-form input[type="text"],
    .mcod-checkout-form input[type="tel"],
    .mcod-checkout-form input[type="number"],
    .mcod-checkout-form select {
        font-size: 16px; /* prevent iOS zoom */
        height: 48px;
    }

    .mcod-shipping-option {
        padding: 12px 14px;
        gap: 12px;
    }

    .mcod-shipping-icon {
        width: 38px;
        height: 38px;
    }

    .mcod-shipping-icon svg {
        width: 20px;
        height: 20px;
    }

    .mcod-shipping-name {
        font-size: 14px;
    }

    .mcod-shipping-price {
        font-size: 13px;
        padding: 4px 10px;
    }

    .mcod-submit-button {
        min-height: 54px;
        font-size: 15px;
    }

    .mcod-summary-row.mcod-total > span:last-child,
    .mcod-summary-row.mcod-total .amount,
    .mcod-summary-row.mcod-total bdi {
        font-size: 20px;
    }

    .mcod-trust-section {
        gap: 12px;
    }

    .mcod-trust-badge {
        font-size: 11px;
    }

    .mcod-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 380px) {
    .mcod-brand-trust span {
        display: none;
    }

    .mcod-trust-section {
        gap: 10px;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */
.mcod-checkout-form button:focus-visible {
    outline: 2px solid var(--tlg-gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .mcod-checkout-form *,
    .mcod-checkout-form *::before,
    .mcod-checkout-form *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ================================
   THEME OVERRIDES (Woodmart safety)
   ================================ */
.mcod-checkout-form-wrapper button {
    text-transform: none;
    letter-spacing: normal;
}

.mcod-checkout-form-wrapper .mcod-section-title,
.mcod-checkout-form-wrapper .mcod-brand-name,
.mcod-checkout-form-wrapper .mcod-brand-tag {
    text-transform: uppercase;
}

.mcod-checkout-form-wrapper a {
    color: var(--tlg-navy);
}

.mcod-checkout-form-wrapper a:hover {
    color: var(--tlg-gold);
}
