/**
 * Custom Checkout Styles
 * @author AK Digital
 */

.custom-checkout {
    --primary: #0B3954;
    --accent: #e3001a;
    --text: #2B2B2B;
    --text-light: #666;
    --bg: #fff;
    --bg-alt: #f8f9fa;
    --border: #e8e8e8;
    --success: #10b981;
    --radius: 10px;

    font-family: 'Lato', sans-serif;
    color: var(--text);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.custom-checkout .checkout-empty {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.custom-checkout .checkout-empty__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #ccc;
}

.custom-checkout .checkout-empty__icon svg {
    width: 100%;
    height: 100%;
}

.custom-checkout .checkout-empty h3 {
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    margin: 0 0 10px;
    color: var(--text);
}

.custom-checkout .checkout-empty p {
    color: var(--text-light);
    margin: 0 0 24px;
}

.custom-checkout .checkout-empty__btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.custom-checkout .checkout-empty__btn:hover {
    background: #c5001a;
    color: #fff;
}

/* ============================================
   LAYOUT
   ============================================ */

.custom-checkout .checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.custom-checkout .checkout-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================
   SECTIONS
   ============================================ */

.custom-checkout .checkout-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.custom-checkout .checkout-section__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.custom-checkout .checkout-section__number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.custom-checkout .checkout-section__title {
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-checkout .checkout-section__optional {
    font-size: 12px;
    color: var(--text-light);
    margin-left: auto;
}

.custom-checkout .checkout-section__content {
    padding: 24px;
}

.custom-checkout .checkout-section--shipping-toggle {
    border: none;
    background: transparent;
}

.custom-checkout .checkout-section--shipping-toggle .checkout-section__content {
    padding: 0;
}

/* ============================================
   CUSTOM CHECKBOX
   ============================================ */

.custom-checkout .checkout-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.custom-checkout .checkout-checkbox__input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkout .checkout-checkbox__mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkout .checkout-checkbox__input:checked~.checkout-checkbox__mark {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkout .checkout-checkbox__mark::after {
    content: '';
    display: none;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.custom-checkout .checkout-checkbox__input:checked~.checkout-checkbox__mark::after {
    display: block;
}

/* ============================================
   FORM FIELDS
   ============================================ */

.custom-checkout .woocommerce-billing-fields>h3,
.custom-checkout .woocommerce-shipping-fields>h3,
.custom-checkout .woocommerce-additional-fields>h3 {
    display: none;
}

.custom-checkout h3#ship-to-different-address {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-transform: none;
    letter-spacing: normal;
}

.custom-checkout .woocommerce-billing-fields__field-wrapper,
.custom-checkout .woocommerce-shipping-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.custom-checkout .form-row {
    margin: 0;
    padding: 0;
    float: none;
    width: 100%;
}

/* WooCommerce form-row classes → grid columns */
.custom-checkout .form-row-first {
    grid-column: 1;
}

.custom-checkout .form-row-last {
    grid-column: 2;
}

/* --- Champs pleine largeur (prénom/nom, entreprise, pays) --- */
.custom-checkout .form-row-wide,
.custom-checkout #shipping_company_field,
.custom-checkout #shipping_address_1_field,
.custom-checkout #shipping_address_2_field {
    grid-column: 1 / -1;
}

/* Ligne 1 : prénom / nom */
.custom-checkout #billing_first_name_field,
.custom-checkout #shipping_first_name_field {
    grid-column: 1;
    order: 1;
}

.custom-checkout #billing_last_name_field,
.custom-checkout #shipping_last_name_field {
    grid-column: 2;
    order: 2;
}

/* Ligne 2 : entreprise (pleine largeur) */
.custom-checkout #billing_company_field {
    grid-column: 1 / -1;
    order: 3;
}

/* Ligne 3 : pays / état (si affiché à côté) */
.custom-checkout #billing_country_field,
.custom-checkout #shipping_country_field {
    grid-column: 1 / -1;
    order: 4;
}

/* --- Colonne gauche : adresse --- */
.custom-checkout #billing_address_1_field {
    grid-column: 1;
    order: 10;
}

.custom-checkout #billing_address_2_field {
    grid-column: 1;
    order: 11;
}

.custom-checkout #billing_city_field,
.custom-checkout #billing_postcode_field {
    order: 12;
}

/* --- Colonne droite : contact --- */
.custom-checkout #billing_phone_field {
    grid-column: 2;
    order: 10;
}

.custom-checkout #billing_email_field {
    grid-column: 2;
    order: 11;
}

.custom-checkout #vat_number_field {
    grid-column: 2;
    order: 13;
}

/* --- Shipping fields --- */
.custom-checkout #shipping_address_1_field {
    grid-column: 1 / -1;
    order: 10;
}

.custom-checkout #shipping_address_2_field {
    grid-column: 1 / -1;
    order: 11;
}

.custom-checkout #shipping_city_field,
.custom-checkout #shipping_postcode_field {
    order: 12;
}

.custom-checkout #shipping_state_field {
    grid-column: 2;
    order: 14;
}

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

.custom-checkout .form-row label .required {
    color: var(--accent);
}

.custom-checkout .form-row label .optional {
    font-weight: 400;
    color: var(--text-light);
    font-size: 12px;
}

.custom-checkout .form-row input.input-text,
.custom-checkout .form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s ease;
    box-shadow: none;
    -webkit-appearance: none;
}

.custom-checkout .form-row input.input-text:focus,
.custom-checkout .form-row textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.custom-checkout .form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.custom-checkout .form-row select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.custom-checkout .form-row select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Select2 Override */
.custom-checkout .select2-container {
    width: 100%;
}

.custom-checkout .select2-container--default .select2-selection--single {
    height: auto;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
}

.custom-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 1.5;
    font-size: 14px;
    color: var(--text);
}

.custom-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 10px;
    top: 0;
}

.custom-checkout .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary);
    box-shadow: none;
}

/* ============================================
   SHIPPING METHODS
   ============================================ */

.custom-checkout .checkout-shipping-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-checkout .checkout-shipping-item {
    margin: 0;
    padding: 0;
}

.custom-checkout #shipping_method li.checkout-shipping-item {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.custom-checkout .checkout-shipping-label {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--bg);
}

.custom-checkout .checkout-shipping-label:hover {
    border-color: var(--primary);
}

.custom-checkout .checkout-shipping-item.is-selected .checkout-shipping-label {
    border-color: var(--primary);
    background: #f0f7ff;
}

.custom-checkout .checkout-shipping-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkout .checkout-shipping-label__mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.custom-checkout .checkout-shipping-item.is-selected .checkout-shipping-label__mark {
    border-color: var(--primary);
}

.custom-checkout .checkout-shipping-item.is-selected .checkout-shipping-label__mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.custom-checkout .checkout-shipping-label__logo {
    width: 80px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.custom-checkout .checkout-shipping-label__icon {
    flex-shrink: 0;
    color: var(--primary);
    width: 80px;
    height: 40px;
}

.custom-checkout .checkout-shipping-label__text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.custom-checkout .checkout-shipping-label__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.custom-checkout .checkout-shipping-label__price .free {
    color: var(--success);
}

.custom-checkout .checkout-shipping-notice {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
    padding: 16px;
    background: var(--bg-alt);
    border-radius: 8px;
    text-align: center;
}

/* ============================================
   PAYMENT METHODS
   ============================================ */

.custom-checkout #payment {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

.custom-checkout .wc_payment_methods {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-checkout .wc_payment_method {
    margin: 0;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    transition: border-color 0.2s ease;
}

.custom-checkout .wc_payment_method.is-selected {
    border-color: var(--primary);
    background: #f0f7ff;
}

.custom-checkout .wc_payment_method>label,
.custom-checkout .wc_payment_method .checkout-payment-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.custom-checkout .wc_payment_method input[type="radio"],
.custom-checkout .checkout-payment-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkout .checkout-payment-label__mark {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #c0c0c0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.custom-checkout .wc_payment_method.is-selected .checkout-payment-label__mark {
    border-color: var(--primary) !important;
}

.custom-checkout .wc_payment_method.is-selected .checkout-payment-label__mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.custom-checkout .checkout-payment-label__text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.custom-checkout .wc_payment_method .payment_box {
    padding: 16px 20px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

.custom-checkout .wc_payment_method .payment_box::before {
    display: none;
}

.custom-checkout .wc_payment_method .payment_box p {
    margin: 0;
}

/* ============================================
   AXEPTA PAYMENT CARDS OVERRIDE
   ============================================ */

/* Remove background and shadows from Axepta card buttons */
.custom-checkout .computop-display-card button,
.custom-checkout .computop-display-sdd button,
.custom-checkout .computop-display-card-oneclick button {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    border: none !important;
    padding: 5px !important;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.custom-checkout .computop-display-card button:hover,
.custom-checkout .computop-display-sdd button:hover,
.custom-checkout .computop-display-card-oneclick button:hover {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    transform: scale(1.05);
    opacity: 0.8;
}

/* Card container styling */
.custom-checkout .computop-display-card,
.custom-checkout .computop-display-sdd,
.custom-checkout .computop-display-card-oneclick {
    display: inline-flex !important;
    float: none !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Card images - uniform appearance (also for order-pay page) */
.custom-checkout .computop-display-card img,
.custom-checkout .computop-display-sdd img,
.custom-checkout .computop-display-card-oneclick img,
.woocommerce-checkout-payment .computop-display-card img,
.woocommerce-checkout-payment .computop-display-sdd img,
.woocommerce-checkout-payment .computop-display-card-oneclick img {
    height: 40px;
    width: auto;
    display: block;
    background: #fff;
    border-radius: 4px;
    padding: 4px 8px;
    box-sizing: content-box;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Selected card state */
.custom-checkout .computop-display-card.is-selected img,
.custom-checkout .computop-display-sdd.is-selected img,
.custom-checkout .computop-display-card-oneclick.is-selected img,
.computop-display-card.is-selected img,
.computop-display-sdd.is-selected img,
.computop-display-card-oneclick.is-selected img {
    border-color: #e3001a !important;
    box-shadow: 0 0 0 2px rgba(227, 0, 26, 0.2) !important;
}

/* Container for all cards */
.custom-checkout #computop_one_time_cards {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 15px;
    align-items: center;
    padding: 10px 0;
}

/* Payment selection message */
.custom-checkout #axepta_selecte_payment {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Hide the clear div */
.custom-checkout #computop_one_time_cards .computop-clear {
    display: none !important;
}

/* Register card checkbox container (moved by JS) */
.custom-checkout .axepta-register-moved {
    margin-top: 15px;
    display: flex;
    align-items: center;
}

/* Register card checkbox */
.custom-checkout #computop_register {
    margin: 0 8px 0 0 !important;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Register card label */
.custom-checkout label[for="computop_register"] {
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    margin-bottom: 0 !important;
}

/* ============================================
   PLACE ORDER BUTTON
   ============================================ */

.custom-checkout .place-order {
    margin: 0;
    padding: 0;
}

.custom-checkout .checkout-submit,
.custom-checkout #place_order {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: none;
}

.custom-checkout .checkout-submit:hover,
.custom-checkout #place_order:hover {
    background: #c5001a;
}

.custom-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px;
}

.custom-checkout .woocommerce-privacy-policy-text {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.custom-checkout .woocommerce-privacy-policy-text a {
    color: var(--primary);
}

/* ============================================
   SIDEBAR
   ============================================ */

.custom-checkout .checkout-sidebar {
    position: sticky;
    top: 120px;
}

.custom-checkout .checkout-summary {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.custom-checkout .checkout-summary__title {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Products List */
.custom-checkout .checkout-summary__products {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
}

.custom-checkout .checkout-summary__products::-webkit-scrollbar {
    width: 4px;
}

.custom-checkout .checkout-summary__products::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-radius: 2px;
}

.custom-checkout .checkout-summary__products::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.custom-checkout .checkout-product {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.custom-checkout .checkout-product:last-child {
    border-bottom: none;
}

.custom-checkout .checkout-product__image {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: visible;
    border: 1px solid var(--border);
    background: var(--bg);
}

.custom-checkout .checkout-product__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.custom-checkout .checkout-product__remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--text-light);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    transition: background 0.2s ease;
    cursor: pointer;
    z-index: 10;
    padding: 0;
}

.custom-checkout .checkout-product__remove svg {
    width: 10px;
    height: 10px;
    stroke: currentColor;
}

.custom-checkout .checkout-product__remove:hover {
    background: var(--accent);
    color: #fff;
}

.custom-checkout .checkout-product__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-checkout .checkout-product__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.custom-checkout .checkout-product__qty {
    font-size: 12px;
    color: var(--text-light);
}

.custom-checkout .checkout-product__meta {
    font-size: 11px;
    color: var(--text-light);
}

.custom-checkout .checkout-product__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    align-self: flex-start;
}

/* ============================================
   COUPON
   ============================================ */

.custom-checkout .checkout-coupon {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.custom-checkout .checkout-coupon__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.custom-checkout .checkout-coupon__toggle:hover {
    color: var(--primary);
}

.custom-checkout .checkout-coupon__form {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.custom-checkout .checkout-coupon__toggle.is-open+.checkout-coupon__form {
    display: flex !important;
}

.custom-checkout .checkout-coupon__message {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.custom-checkout .checkout-coupon__message.is-success {
    display: block;
    background: #f0fdf4;
    color: var(--success);
}

.custom-checkout .checkout-coupon__message.is-error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
}

.custom-checkout .checkout-coupon__input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
    height: 40px;
}

.custom-checkout .checkout-coupon__input:focus {
    outline: none;
    border-color: var(--primary);
}

.custom-checkout .checkout-coupon__btn {
    padding: 10px 16px;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    height: 40px;
    white-space: nowrap;
    flex-shrink: 0;
}

.custom-checkout .checkout-coupon__btn:hover {
    background: #0a2d42;
}

.custom-checkout .checkout-coupon__applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 10px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 13px;
}

.custom-checkout .checkout-coupon__remove {
    color: var(--accent);
    text-decoration: none;
    font-size: 18px;
    font-weight: 400;
    margin-left: 6px;
    line-height: 1;
}

.custom-checkout .checkout-coupon__discount {
    color: var(--success);
    font-weight: 600;
}

/* ============================================
   TOTALS
   ============================================ */

.custom-checkout .checkout-totals {
    margin-bottom: 16px;
    transition: opacity 0.2s ease;
}

.custom-checkout .checkout-totals__line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.custom-checkout .checkout-totals__line:last-of-type,
.custom-checkout .checkout-totals__line:last-child,
.custom-checkout .checkout-totals__line--last {
    border-bottom: none !important;
}

.custom-checkout .checkout-totals__line span:first-child {
    color: var(--text-light);
}

.custom-checkout .checkout-totals__line span:first-child small {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

.custom-checkout .checkout-totals__line span:last-child {
    font-weight: 500;
    color: var(--text);
}

.custom-checkout .checkout-totals__line--discount span:last-child {
    color: var(--success);
}

.custom-checkout .checkout-totals__line .free-shipping {
    color: var(--success);
}

.custom-checkout .checkout-totals__total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    padding-bottom: 0;
    border-top: 2px solid var(--border);
    margin-top: 8px;
    align-items: center;
}

.custom-checkout .checkout-totals__total span:first-child {
    font-size: 16px;
    font-weight: 600;
}

.custom-checkout .checkout-total-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

/* ============================================
   TRUST BADGES
   ============================================ */

.custom-checkout .checkout-trust {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    padding-bottom: 0;
    border-top: 1px solid var(--border);
}

.custom-checkout .checkout-trust__item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-size: 12px;
    font-weight: 500;
}

.custom-checkout .checkout-trust__icons {
    display: flex;
    gap: 6px;
}

.custom-checkout .checkout-payment-icon {
    height: 22px;
    width: auto;
}

/* ============================================
   LOGIN FORM
   ============================================ */

.custom-checkout .checkout-login-section {
    max-width: 600px;
    margin: 0 auto;
}

.custom-checkout .checkout-login-toggle {
    margin-bottom: 20px;
}

.custom-checkout .checkout-login-message {
    font-size: 14px;
    color: var(--text);
    margin: 0;
}

.custom-checkout .checkout-login-message a {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

.custom-checkout .checkout-login-message a:hover {
    color: var(--accent);
}

.custom-checkout .woocommerce-form-login {
    margin-top: 20px;
}

.custom-checkout .woocommerce-form-login p {
    margin-bottom: 16px;
}

.custom-checkout .woocommerce-form-login label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.custom-checkout .woocommerce-form-login input[type="text"],
.custom-checkout .woocommerce-form-login input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s ease;
}

.custom-checkout .woocommerce-form-login input:focus {
    outline: none;
    border-color: var(--primary);
}

.custom-checkout .woocommerce-form-login .form-row {
    margin-bottom: 16px;
}

.custom-checkout .woocommerce-form-login .woocommerce-form-login__submit {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-checkout .woocommerce-form-login__submit:hover {
    background: #0a2d42;
}

.custom-checkout .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.custom-checkout .woocommerce-form-login__rememberme input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.custom-checkout .woocommerce-form-login__rememberme label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.custom-checkout .woocommerce-LostPassword {
    margin-top: 12px;
    font-size: 13px;
}

.custom-checkout .woocommerce-LostPassword a {
    color: var(--primary);
    text-decoration: underline;
}

.custom-checkout .woocommerce-LostPassword a:hover {
    color: var(--accent);
}

/* ============================================
   NOTICES
   ============================================ */

.custom-checkout .woocommerce-error,
.custom-checkout .woocommerce-message,
.custom-checkout .woocommerce-info {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    list-style: none;
}

.custom-checkout .woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.custom-checkout .woocommerce-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.custom-checkout .woocommerce-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .custom-checkout .checkout-layout {
        grid-template-columns: 1fr 360px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .custom-checkout {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 900px) {
    .custom-checkout .checkout-layout {
        grid-template-columns: 1fr;
    }

    .custom-checkout .checkout-sidebar {
        position: static;
        order: -1;
    }

    .custom-checkout .checkout-summary__products {
        max-height: none;
    }
}

@media (max-width: 600px) {

    .custom-checkout .woocommerce-billing-fields__field-wrapper,
    .custom-checkout .woocommerce-shipping-fields__field-wrapper {
        grid-template-columns: 1fr;
    }

    .custom-checkout .form-row,
    .custom-checkout #billing_first_name_field,
    .custom-checkout #billing_last_name_field,
    .custom-checkout #billing_company_field,
    .custom-checkout #billing_country_field,
    .custom-checkout #billing_address_1_field,
    .custom-checkout #billing_address_2_field,
    .custom-checkout #billing_postcode_field,
    .custom-checkout #billing_state_field,
    .custom-checkout #billing_city_field,
    .custom-checkout #billing_phone_field,
    .custom-checkout #billing_email_field,
    .custom-checkout #vat_number_field,
    .custom-checkout #shipping_first_name_field,
    .custom-checkout #shipping_last_name_field,
    .custom-checkout #shipping_postcode_field,
    .custom-checkout #shipping_city_field,
    .custom-checkout #shipping_country_field,
    .custom-checkout #shipping_state_field {
        grid-column: 1;
        order: unset;
    }

    .custom-checkout .checkout-section__header {
        padding: 14px 18px;
    }

    .custom-checkout .checkout-section__content {
        padding: 18px;
    }

    .custom-checkout .checkout-summary {
        padding: 18px;
    }

    .custom-checkout .checkout-product__image {
        width: 48px;
        height: 48px;
    }

    .custom-checkout .checkout-total-amount {
        font-size: 20px;
    }

    .custom-checkout .checkout-shipping-label {
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .custom-checkout .checkout-trust {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 440px) {
    .custom-checkout .checkout-shipping-label__logo {
        width: 50px;
        height: 28px;
    }

    .custom-checkout .checkout-shipping-label__icon {
        width: 50px;
        height: 28px;
    }
}

@media (max-width: 1325px) {
    .elementor-element-5b7aa14 .elementor-icon-list-icon {
        margin-left: 10px;
    }
}

@media (max-width: 525px) {
    .elementor-element-5b7aa14 .elementor-icon-list-text {
        display: none;
    }

    .elementor-element-5b7aa14 .elementor-icon-list-icon svg {
        width: 28px !important;
        height: 28px !important;
    }

    .elementor-element-5b7aa14 .elementor-icon-list-icon i {
        font-size: 28px !important;
    }

    .elementor-element-5b7aa14 .elementor-icon-list-icon {
        font-size: 28px !important;
    }
}

@media (max-width: 410px) {
    .custom-checkout .checkout-shipping-label__logo,
    .custom-checkout .checkout-shipping-label__icon {
        display: none;
    }
}

/* Order Recap Styles */
.order-recap {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.order-recap__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.order-recap__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.order-recap__meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.order-recap__number,
.order-recap__date,
.order-recap__status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.order-recap__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.order-recap__value {
    font-size: 16px;
    font-weight: 600;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status--completed {
    background: #4caf50;
    color: white;
}

.order-status--processing {
    background: #ff9800;
    color: white;
}

.order-status--on-hold {
    background: #2196f3;
    color: white;
}

.order-recap__content {
    padding: 30px;
}

.order-recap__section {
    margin-bottom: 30px;
}

.order-recap__section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.order-recap__billing,
.order-recap__shipping {
    line-height: 1.6;
    color: #555;
}

.order-recap__billing p,
.order-recap__shipping p {
    margin: 0 0 5px 0;
}

.order-recap__products {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-recap__product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.order-recap__product-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.order-recap__product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-recap__product-info {
    flex: 1;
    min-width: 0;
}

.order-recap__product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-recap__product-qty {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}

.order-recap__product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.order-recap__meta-item {
    font-size: 12px;
    color: #6c757d;
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
}

.order-recap__product-sku {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.order-recap__product-price {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.order-recap__totals {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.order-recap__total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-recap__total-line:last-child {
    border-bottom: none;
}

.order-recap__total-line--discount {
    color: #28a745;
}

.order-recap__total-line--total {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
    padding-top: 15px;
}

.order-recap__payment,
.order-recap__notes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    line-height: 1.6;
    color: #555;
}

.order-recap__footer {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #e9ecef;
}

.order-recap__actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.order-recap__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.order-recap__btn--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.order-recap__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.order-recap__btn--secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.order-recap__btn--secondary:hover {
    background: #667eea;
    color: white;
}

.order-notice {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.order-notice--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .order-recap__header {
        padding: 20px;
    }

    .order-recap__title {
        font-size: 24px;
    }

    .order-recap__meta {
        flex-direction: column;
        gap: 15px;
    }

    .order-recap__content {
        padding: 20px;
    }

    .order-recap__product {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .order-recap__product-price {
        align-self: flex-end;
    }

    .order-recap__total-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .order-recap__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .order-recap__btn {
        justify-content: center;
    }
}

/* ============================================
   THANK YOU PAGE (Order Received)
   ============================================ */

body.thank-you-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.thank-you-wrapper {
    min-height: 100vh;
    background: #fff;
}

.thank-you-header {
    background: #f5f5f5;
    padding: 20px 0px;
    border-bottom: 1px solid #e1e5e9;
}

.thank-you-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thank-you-logo {
    height: 50px;
    width: auto;
}

.thank-you-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.thank-you-success {
    text-align: center;
    margin-bottom: 30px;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thank-you-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.thank-you-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
}

.order-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.order-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-info-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.email-notice {
    text-align: center;
    padding: 15px;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    margin-bottom: 30px;
    color: #0066cc;
    font-size: 14px;
}

.thank-you-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.thank-you-content .order-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
}

.thank-you-content .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.thank-you-content .order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thank-you-content .order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.thank-you-content .item-image {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.thank-you-content .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thank-you-content .item-info {
    flex: 1;
    min-width: 0;
}

.thank-you-content .item-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.thank-you-content .item-quantity {
    color: #666;
    font-size: 12px;
}

.thank-you-content .item-price {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.thank-you-content .order-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.thank-you-content .total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.thank-you-content .total-line--final {
    border-top: 2px solid #dee2e6;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 600;
}

.order-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-address {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.address-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.address-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.address-content p {
    margin: 0;
}

.back-home-wrapper {
    margin-top: 30px;
    text-align: center;
}

.back-home-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.back-home-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 14px 24px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.back-home-btn:hover {
    background: #555;
}

.back-home-btn--invoice {
    background: #0B3954;
}

.back-home-btn--invoice:hover {
    background: #0a2e42;
}

.back-home-btn svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

@media (max-width: 968px) {
    .thank-you-content {
        grid-template-columns: 1fr;
    }

    .order-addresses {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .thank-you-container {
        padding: 20px;
    }

    .thank-you-title {
        font-size: 24px;
    }

    .order-info {
        flex-direction: column;
        gap: 12px;
    }
}