/* ═══════════════════════════════════════
   TUTU Gift Card — Purchase Flow v2
   Matches tutu-home.html mockup design
   ═══════════════════════════════════════ */

/* ─── Reset & Base ─── */

.tutu-gc-purchase {
    --gc-primary: #d07a63;
    --gc-primary-hover: #c25f52;
    --gc-primary-bg: rgba(208, 122, 99, 0.08);
    --gc-primary-border: rgba(208, 122, 99, 0.15);
    --gc-bg: #F8F2E9;
    --gc-card-bg: #FDFAF5;
    --gc-white-80: rgba(255, 255, 255, 0.8);
    --gc-border: rgba(0, 0, 0, 0.05);
    --gc-border-10: rgba(0, 0, 0, 0.1);
    --gc-border-20: rgba(0, 0, 0, 0.2);
    --gc-text: #171717;
    --gc-text-600: #525252;
    --gc-text-500: #737373;
    --gc-text-muted: #a3a3a3;
    --gc-radius: 16px;
    --gc-radius-sm: 12px;

    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 32px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gc-text);
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.tutu-gc-purchase *,
.tutu-gc-purchase *::before,
.tutu-gc-purchase *::after {
    box-sizing: border-box;
}

/* ─── Container (glass card) ─── */

.tutu-gc-container {
    background: var(--gc-white-80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--gc-border);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

/* ─── Header ─── */

.tutu-gc-header {
    padding: 20px 24px 12px;
    text-align: center;
    border-bottom: 1px solid var(--gc-border);
}

.tutu-gc-header__badge {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gc-text-500);
    font-weight: 500;
}

.tutu-gc-header__title {
    margin: 8px 0 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--gc-text);
    line-height: 1.3;
}

.tutu-gc-header__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--gc-text-600);
}

@media (min-width: 640px) {
    .tutu-gc-header__title {
        font-size: 30px;
    }
}

/* ─── Progress Bar ─── */

.tutu-gc-progress {
    padding: 16px 24px 12px;
}

.tutu-gc-progress__meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gc-text-500);
    margin-bottom: 12px;
}

.tutu-gc-progress__name {
    font-weight: 500;
}

.tutu-gc-progress__bar {
    height: 6px;
    background: var(--gc-border);
    border-radius: 999px;
    overflow: hidden;
}

.tutu-gc-progress__fill {
    height: 100%;
    background: var(--gc-primary);
    border-radius: 999px;
    transition: width 0.5s ease-out;
}

.tutu-gc-progress__dots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.tutu-gc-progress__dot {
    padding: 8px 0;
    text-align: center;
    border-radius: 8px;
    background: var(--gc-border);
    color: var(--gc-text-600);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tutu-gc-progress__dot--active {
    background: var(--gc-primary);
    color: #fff;
}

.tutu-gc-progress__dot--done {
    background: var(--gc-primary);
    color: #fff;
}

/* ─── Steps ─── */

.tutu-gc-steps {
    padding: 0 24px 20px;
}

.tutu-gc-step {
    display: none;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutu-gc-step--active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: tutuGcSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tutuGcSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tutu-gc-step__header {
    margin-bottom: 16px;
}

.tutu-gc-step__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gc-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

.tutu-gc-step__subtitle {
    font-size: 14px;
    color: var(--gc-text-600);
    margin: 0;
    line-height: 1.5;
}

/* ─── Size Selection (Step 1) ─── */

.tutu-gc-sizes {
    margin-bottom: 16px;
}

.tutu-gc-sizes__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text-600);
    margin-bottom: 12px;
}

.tutu-gc-sizes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.tutu-gc-size-btn {
    padding: 20px 16px;
    border-radius: var(--gc-radius);
    border: 1px solid var(--gc-border-10);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.tutu-gc-size-btn:hover {
    border-color: rgba(208, 122, 99, 0.5);
}

.tutu-gc-size-btn--active {
    border-color: var(--gc-primary) !important;
    background: var(--gc-primary-bg) !important;
    box-shadow: 0 0 0 4px var(--gc-primary-border);
}

/* ─── Quantity (Step 1) ─── */

.tutu-gc-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tutu-gc-quantity__info {
    flex: 1;
}

.tutu-gc-quantity__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text);
}

.tutu-gc-quantity__hint {
    font-size: 12px;
    color: var(--gc-text-500);
    margin-top: 2px;
}

.tutu-gc-quantity__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tutu-gc-quantity__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gc-border-10);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    color: var(--gc-text);
    user-select: none;
    -webkit-user-select: none;
}

.tutu-gc-quantity__btn:hover {
    background: var(--gc-border);
}

.tutu-gc-quantity__value {
    width: 48px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--gc-text);
    user-select: none;
    -webkit-user-select: none;
}

/* ─── Order Summary (Step 1) ─── */

.tutu-gc-order-summary {
    border-radius: var(--gc-radius);
    background: var(--gc-card-bg);
    border: 1px solid var(--gc-border);
    padding: 20px;
    margin-bottom: 24px;
}

.tutu-gc-order-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.tutu-gc-order-summary__row:last-child {
    margin-bottom: 0;
}

.tutu-gc-order-summary__label {
    color: var(--gc-text-600);
}

.tutu-gc-order-summary__value {
    font-weight: 500;
    color: var(--gc-text);
}

.tutu-gc-order-summary__row--total {
    padding-top: 12px;
    border-top: 1px solid var(--gc-border);
    font-size: 16px;
    font-weight: 600;
}

.tutu-gc-order-summary__row--total .tutu-gc-order-summary__value {
    font-size: 20px;
    font-weight: 600;
}

/* ─── Form Fields (Step 2) ─── */

.tutu-gc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.tutu-gc-field {
    position: relative;
}

.tutu-gc-field__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text);
    margin-bottom: 8px;
}

.tutu-gc-field__required {
    color: #ef4444;
}

.tutu-gc-field__input,
.tutu-gc-field__select,
.tutu-gc-field__textarea {
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--gc-border-10);
    border-radius: var(--gc-radius);
    font-size: 16px;
    color: var(--gc-text);
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.tutu-gc-field__input:focus,
.tutu-gc-field__select:focus,
.tutu-gc-field__textarea:focus {
    border-color: var(--gc-primary);
    box-shadow: 0 0 0 4px rgba(208, 122, 99, 0.18);
}

.tutu-gc-field__input::placeholder,
.tutu-gc-field__textarea::placeholder {
    color: var(--gc-text-muted);
}

.tutu-gc-field__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23737373' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    background-color: #fff;
}

.tutu-gc-field__textarea {
    resize: none;
    min-height: 100px;
}

.tutu-gc-field__counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--gc-text-500);
    margin-top: 6px;
}

.tutu-gc-field__error {
    display: none;
    font-size: 12px;
    color: #dc2626;
    margin-top: 6px;
}

.tutu-gc-field--error .tutu-gc-field__input,
.tutu-gc-field--error .tutu-gc-field__textarea {
    border-color: #dc2626;
}

.tutu-gc-field--error .tutu-gc-field__error {
    display: block;
}

/* ─── Delivery Method (Step 2) ─── */

.tutu-gc-delivery {
    border-radius: var(--gc-radius);
    border: 1px solid var(--gc-border-10);
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
}

.tutu-gc-delivery__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text);
    margin-bottom: 16px;
}

.tutu-gc-delivery__option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gc-text);
    margin-bottom: 12px;
}

.tutu-gc-delivery__option:last-of-type {
    margin-bottom: 0;
}

.tutu-gc-delivery__radio {
    accent-color: var(--gc-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tutu-gc-delivery__email-fields {
    margin-left: 28px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tutu-gc-delivery__hint {
    margin-left: 28px;
    font-size: 12px;
    color: var(--gc-text-500);
    margin-top: 4px;
}

/* ─── Summary Card (Step 3) ─── */

.tutu-gc-summary-card {
    border-radius: var(--gc-radius);
    background: var(--gc-card-bg);
    border: 1px solid var(--gc-border);
    padding: 24px;
    margin-bottom: 24px;
}

.tutu-gc-summary-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
}

.tutu-gc-summary-card__label {
    color: var(--gc-text-600);
}

.tutu-gc-summary-card__value {
    font-weight: 500;
    color: var(--gc-text);
}

.tutu-gc-summary-card__row--total {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--gc-border-10);
    font-size: 16px;
    font-weight: 600;
}

/* ─── Buttons ─── */

.tutu-gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: var(--gc-radius);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
}

.tutu-gc-btn--primary {
    background: var(--gc-primary);
    color: #fff;
}

.tutu-gc-btn--primary:hover {
    background: var(--gc-primary-hover);
}

.tutu-gc-btn--secondary {
    background: transparent;
    color: var(--gc-text);
    border: 1px solid var(--gc-border-20);
}

.tutu-gc-btn--secondary:hover {
    background: var(--gc-border);
}

.tutu-gc-btn--full {
    width: 100%;
}

.tutu-gc-btn--flex {
    flex: 1;
}

.tutu-gc-btn-group {
    display: flex;
    gap: 16px;
}

/* Loading state */
.tutu-gc-btn--loading {
    pointer-events: none;
    opacity: 0.7;
}

.tutu-gc-btn--loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tutuGcSpin 1s linear infinite;
}

@keyframes tutuGcSpin {
    to { transform: rotate(360deg); }
}

/* Hidden utility */
.tutu-gc-hidden {
    display: none !important;
}

/* ═══════════════════════════════════════
   Embedded WC Checkout (Step 3)
   ═══════════════════════════════════════ */

.tutu-gc-checkout-container {
    margin-bottom: 20px;
}

.tutu-gc-checkout-container .woocommerce {
    margin: 0;
    padding: 0;
}

/* Hide coupon link — not relevant for gift cards */
.tutu-gc-checkout-container .woocommerce-form-coupon-toggle,
.tutu-gc-checkout-container .checkout_coupon {
    display: none !important;
}

/* Hide login toggle and login form */
.tutu-gc-checkout-container .woocommerce-form-login-toggle,
.tutu-gc-checkout-container .woocommerce-form-login {
    display: none !important;
}

/* Hide create account checkbox/section */
.tutu-gc-checkout-container .woocommerce-account-fields,
.tutu-gc-checkout-container .create-account {
    display: none !important;
}

/* WooPayments express checkout (Google Pay, Apple Pay) */
.tutu-gc-checkout-container #wcpay-express-checkout-wrapper,
.tutu-gc-checkout-container .wcpay-express-checkout-wrapper {
    display: block !important;
    margin: 20px 0;
}

.tutu-gc-checkout-container #wcpay-express-checkout-wrapper:empty,
.tutu-gc-checkout-container .wcpay-express-checkout-wrapper:empty {
    display: none !important;
}

.tutu-gc-checkout-container #wcpay-express-checkout-element {
    display: block !important;
}

/* Separator between express checkout and card payment */
.tutu-gc-checkout-container #wcpay-express-checkout-button-separator {
    text-align: center;
    margin: 4px 0 16px;
    font-size: 13px;
    color: var(--gc-text-500);
}

/* Hide redundant WC sections — we already show order summary above */
.tutu-gc-checkout-container .woocommerce-checkout-review-order-table,
.tutu-gc-checkout-container #order_review_heading {
    display: none !important;
}

/* Hide shipping for digital products */
.tutu-gc-checkout-container .woocommerce-shipping-fields {
    display: none !important;
}

/* Hide additional fields / order notes */
.tutu-gc-checkout-container .woocommerce-additional-fields {
    display: none !important;
}

/* ── Override WC 2-column layout: stack vertically ── */
.tutu-gc-checkout-container .col2-set {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tutu-gc-checkout-container .col2-set .col-1,
.tutu-gc-checkout-container .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tutu-gc-checkout-container #order_review,
.tutu-gc-checkout-container .woocommerce-checkout-review-order {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Reorder: Billing first → Express checkout → Card payment ── */
.tutu-gc-checkout-container .woocommerce-checkout {
    display: flex !important;
    flex-direction: column !important;
}

.tutu-gc-checkout-container .woocommerce-checkout > * {
    width: 100%;
}

.tutu-gc-checkout-container #customer_details {
    order: 1 !important;
}

.tutu-gc-checkout-container .wcpay-express-checkout-wrapper,
.tutu-gc-checkout-container #wcpay-express-checkout-wrapper {
    order: 2 !important;
}

.tutu-gc-checkout-container #wcpay-express-checkout-button-separator {
    order: 3 !important;
}

.tutu-gc-checkout-container .woocommerce-checkout-review-order,
.tutu-gc-checkout-container #order_review {
    order: 4 !important;
}

.tutu-gc-checkout-container .woocommerce-checkout-payment {
    order: 4 !important;
}

/* Notices stay at top */
.tutu-gc-checkout-container .woocommerce-NoticeGroup,
.tutu-gc-checkout-container .woocommerce-error,
.tutu-gc-checkout-container .woocommerce-message,
.tutu-gc-checkout-container .woocommerce-form-coupon-toggle,
.tutu-gc-checkout-container .woocommerce-form-login-toggle {
    order: 0 !important;
}

/* ── Force billing section & all field rows visible (WooPayments hides them) ── */
.tutu-gc-checkout-container .woocommerce-billing-fields,
.tutu-gc-checkout-container #customer_details,
.tutu-gc-checkout-container #customer_details .col-1 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    clip: auto !important;
    clip-path: none !important;
}

/* Force ALL billing field rows visible — override page/Elementor/theme CSS that hides them by ID */
.tutu-gc-checkout-container #billing_first_name_field,
.tutu-gc-checkout-container #billing_last_name_field,
.tutu-gc-checkout-container #billing_country_field,
.tutu-gc-checkout-container #billing_address_1_field,
.tutu-gc-checkout-container #billing_city_field,
.tutu-gc-checkout-container #billing_postcode_field,
.tutu-gc-checkout-container #billing_state_field,
.tutu-gc-checkout-container #billing_phone_field,
.tutu-gc-checkout-container #billing_email_field,
.tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper > p,
.tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper > .form-row,
.tutu-gc-checkout-container .tutu-hidden-field {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    max-height: none !important;
    transform: none !important;
}

/* ── Billing section card ── */
.tutu-gc-checkout-container .woocommerce-billing-fields {
    background: var(--gc-card-bg);
    border-radius: var(--gc-radius);
    padding: 24px;
    border: 1px solid var(--gc-border);
    margin-bottom: 20px;
}

/* Style billing section heading */
.tutu-gc-checkout-container h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gc-text);
    margin: 0 0 20px;
    padding: 0;
}

/* Billing fields grid — 2 columns */
.tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Full-width fields */
.tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper .form-row-wide {
    grid-column: 1 / -1;
}

/* First name + last name in 2 columns */
.tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper .form-row-first {
    grid-column: 1;
}

.tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper .form-row-last {
    grid-column: 2;
}

.tutu-gc-checkout-container .form-row {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
}

.tutu-gc-checkout-container .form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text);
    margin-bottom: 6px;
}

.tutu-gc-checkout-container .form-row label .optional {
    font-weight: 400;
    color: var(--gc-text-500);
    font-size: 12px;
}

.tutu-gc-checkout-container .form-row label .required {
    color: #ef4444;
}

.tutu-gc-checkout-container .form-row input.input-text,
.tutu-gc-checkout-container .form-row textarea,
.tutu-gc-checkout-container .form-row select,
.tutu-gc-checkout-container .form-row .select2-container .select2-selection {
    width: 100% !important;
    padding: 14px 16px !important;
    background: #fff !important;
    border: 1px solid var(--gc-border-10) !important;
    border-radius: var(--gc-radius-sm) !important;
    font-size: 14px !important;
    color: var(--gc-text) !important;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}

.tutu-gc-checkout-container .form-row input.input-text:focus,
.tutu-gc-checkout-container .form-row textarea:focus,
.tutu-gc-checkout-container .form-row select:focus {
    border-color: var(--gc-primary) !important;
    box-shadow: 0 0 0 4px rgba(208, 122, 99, 0.18) !important;
}

/* Select2 dropdown fix */
.tutu-gc-checkout-container .select2-container {
    width: 100% !important;
}

.tutu-gc-checkout-container .select2-container .select2-selection__rendered {
    padding: 0 !important;
    line-height: inherit !important;
    color: var(--gc-text) !important;
}

.tutu-gc-checkout-container .select2-container .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%);
    right: 10px !important;
}

/* ── Payment methods section ── */
.tutu-gc-checkout-container .woocommerce-checkout-payment {
    background: var(--gc-card-bg);
    border-radius: var(--gc-radius);
    padding: 24px;
    margin-top: 4px;
    border: 1px solid var(--gc-border);
    float: none !important;
    width: 100% !important;
    clear: both;
}

.tutu-gc-checkout-container .wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px !important;
    border: none !important;
}

.tutu-gc-checkout-container .wc_payment_method {
    margin-bottom: 10px;
    padding: 14px 16px;
    background: #fff;
    border-radius: var(--gc-radius-sm);
    border: 1px solid var(--gc-border-10);
    list-style: none !important;
}

.tutu-gc-checkout-container .wc_payment_method label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tutu-gc-checkout-container .wc_payment_method label img {
    max-height: 24px;
    width: auto;
}

.tutu-gc-checkout-container .payment_box {
    padding: 14px 0 4px;
    font-size: 13px;
    color: var(--gc-text-600);
}

/* Stripe / WooPayments card field container */
.tutu-gc-checkout-container #payment .payment_methods li .payment_box {
    padding: 14px 0 4px !important;
}

.tutu-gc-checkout-container .payment_box fieldset,
.tutu-gc-checkout-container .payment_box .wc-payment-form {
    border: none !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    min-height: 44px;
}

/* Stripe Elements containers */
.tutu-gc-checkout-container #wcpay-card-element,
.tutu-gc-checkout-container .wcpay-checkout-element,
.tutu-gc-checkout-container #wcpay-payment-element,
.tutu-gc-checkout-container .wc-stripe-elements-field,
.tutu-gc-checkout-container .StripeElement {
    min-height: 44px;
    background: #fff;
    border: 1px solid var(--gc-border-10);
    border-radius: var(--gc-radius-sm);
    padding: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tutu-gc-checkout-container .StripeElement--focus {
    border-color: var(--gc-primary);
    box-shadow: 0 0 0 4px rgba(208, 122, 99, 0.18);
}

.tutu-gc-checkout-container .payment_box iframe {
    min-height: 40px;
}

/* WooPayments express checkout — additional overrides */
.tutu-gc-checkout-container .wcpay-express-checkout-wrapper button,
.tutu-gc-checkout-container #wcpay-express-checkout-wrapper button {
    border-radius: var(--gc-radius-sm) !important;
}

/* ── Place Order button ── */
.tutu-gc-checkout-container .place-order {
    padding: 0 !important;
    margin: 0 !important;
}

.tutu-gc-checkout-container #place_order {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    padding: 16px 28px !important;
    background: var(--gc-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--gc-radius) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-transform: none !important;
    line-height: 1.4 !important;
    float: none !important;
    margin: 0 !important;
}

.tutu-gc-checkout-container #place_order:hover {
    background: var(--gc-primary-hover) !important;
}

/* ── WC notices ── */
.tutu-gc-checkout-container .woocommerce-error,
.tutu-gc-checkout-container .woocommerce-message,
.tutu-gc-checkout-container .woocommerce-info {
    border-radius: var(--gc-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    list-style: none !important;
}

.tutu-gc-checkout-container .woocommerce-NoticeGroup {
    margin-bottom: 16px;
}

/* Terms & privacy */
.tutu-gc-checkout-container .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--gc-text-600);
}

.tutu-gc-checkout-container .woocommerce-privacy-policy-text {
    font-size: 12px;
    color: var(--gc-text-500);
    margin-bottom: 12px;
}

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

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */

@media (max-width: 600px) {
    .tutu-gc-purchase {
        padding: 12px 4px;
    }

    .tutu-gc-container {
        border-radius: 20px;
        overflow: visible; /* prevent clipping Stripe dropdowns */
    }

    .tutu-gc-header {
        padding: 20px 12px 10px;
    }

    .tutu-gc-header__title {
        font-size: 20px;
    }

    .tutu-gc-progress {
        padding: 16px 12px 10px;
    }

    .tutu-gc-steps {
        padding: 0 8px 16px;
    }

    .tutu-gc-sizes__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .tutu-gc-size-btn {
        padding: 16px 8px;
        font-size: 13px;
    }

    .tutu-gc-btn-group {
        flex-direction: column-reverse;
    }

    .tutu-gc-btn--flex {
        width: 100%;
    }

    /* Stack billing fields to single column on mobile */
    .tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr !important;
    }

    .tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper .form-row-first,
    .tutu-gc-checkout-container .woocommerce-billing-fields__field-wrapper .form-row-last {
        grid-column: 1;
    }

    /* Reduce padding to give Stripe Payment Element enough width */
    .tutu-gc-checkout-container .woocommerce-billing-fields,
    .tutu-gc-checkout-container .woocommerce-checkout-payment {
        padding: 10px;
        border-radius: var(--gc-radius-sm);
    }

    .tutu-gc-checkout-container .wc_payment_method {
        padding: 8px 6px;
    }

    .tutu-gc-checkout-container .payment_box,
    .tutu-gc-checkout-container #payment .payment_methods li .payment_box {
        padding: 0 !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .tutu-gc-checkout-container .payment_box fieldset,
    .tutu-gc-checkout-container .payment_box .wc-payment-form {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Stripe / WooPayments elements — less padding on mobile */
    .tutu-gc-checkout-container #wcpay-card-element,
    .tutu-gc-checkout-container .wcpay-checkout-element,
    .tutu-gc-checkout-container #wcpay-payment-element,
    .tutu-gc-checkout-container .wc-stripe-elements-field,
    .tutu-gc-checkout-container .StripeElement {
        padding: 6px !important;
        min-width: 0 !important;
    }

    .tutu-gc-checkout-container .payment_box iframe {
        width: 100% !important;
        min-width: 0 !important;
    }

    .tutu-gc-checkout-container .wc_payment_method label img {
        max-height: 20px;
    }

    /* Summary card tighter on mobile */
    .tutu-gc-summary-card {
        padding: 16px 12px;
    }

    /* Express checkout overlay message */
    .tutu-gc-express-overlay__msg {
        font-size: 12px;
        padding: 8px 14px;
        max-width: 90%;
    }
}

/* ═══════════════════════════════════════
   Express Checkout Validation Overlay
   ═══════════════════════════════════════ */

.tutu-gc-express-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--gc-radius);
    transition: opacity 0.3s ease;
}

.tutu-gc-express-overlay__msg {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
    line-height: 1.4;
}

.tutu-gc-billing-toast {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 14px 20px;
    border-radius: var(--gc-radius-sm);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    animation: tutuGcSlideIn 0.3s ease;
}
