/* ================================================
   FdsX – WooCommerce Style Overrides
   Strip WooCommerce default styles and align with custom design
   ================================================ */

/* Remove all default WooCommerce styling */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  display: none;
}

/* Remove default WooCommerce notices styling conflicts */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  max-width: 1330px;
  margin: 16px auto;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.woocommerce-message {
  border-color: var(--accent);
}

.woocommerce-error {
  border-color: #ef4444;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
  color: var(--accent);
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  display: none;
}

/* Cart quantity input styling */
.cart-qty-value {
  -moz-appearance: textfield;
  appearance: textfield;
  background: transparent;
  border: none;
  color: var(--text-primary);
}

.cart-qty-value::-webkit-outer-spin-button,
.cart-qty-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* WooCommerce cart totals - strip defaults */
.woocommerce table.shop_table {
  border: none;
  border-collapse: collapse;
}

/* Price display */
.woocommerce .price del {
  color: var(--gray);
  opacity: 0.7;
}

.woocommerce .price ins {
  text-decoration: none;
  font-weight: 600;
}

.woocommerce .price .amount {
  color: var(--text-primary);
}

/* Override any Elementor WooCommerce styles */
.elementor-widget-woocommerce-cart,
.elementor-widget-woocommerce-checkout {
  font-family: var(--font-body);
}

/* Remove WooCommerce breadcrumb (we use custom) */
.woocommerce .woocommerce-breadcrumb {
  display: none;
}

/* Hide default WooCommerce page titles (we render our own) */
.woocommerce-account .page-title,
.woocommerce-account .entry-title,
.woocommerce-cart .page-title,
.woocommerce-cart .entry-title,
.woocommerce-checkout .page-title,
.woocommerce-checkout .entry-title {
  display: none;
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  position: relative;
  max-width: 1330px;
  margin: 16px auto;
  padding: 14px 48px 14px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  animation: fdsx-notice-in 0.3s ease;
}

.woocommerce-message {
  border-color: var(--accent);
}

.woocommerce-error {
  border-color: #ef4444;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
  color: var(--accent);
  margin-left: 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.woocommerce-message a:hover,
.woocommerce-info a:hover {
  background: var(--accent);
  color: #fff;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  display: none;
}

/* Close button for notices */
.fdsx-notice-close {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.fdsx-notice-close:hover {
  color: var(--text-primary);
}

/* Fade out animation */
.fdsx-notice-hiding {
  animation: fdsx-notice-out 0.3s ease forwards;
}

@keyframes fdsx-notice-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fdsx-notice-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* Product page - ensure ShapeDiver plugin button works with our layout */
#shapediver-product-button,
.shapediver-product-button {
  padding: 16px 48px;
  background: var(--gray);
  color: var(--bg-primary);
  font-family: var(--font-heading);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
  border: none;
  cursor: pointer;
  margin-left: 0;
  border-radius: 0;
}

#shapediver-product-button:hover,
.shapediver-product-button:hover {
  background: var(--text-primary);
}

/* My Account pages */
.woocommerce-account .woocommerce {
  max-width: 1330px;
  margin: 0 auto;
  padding: 40px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  border-radius: 6px;
  transition: background 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background: var(--bg-card);
}

/* Form fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
}

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

.woocommerce form .form-row label {
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

/* Buttons */
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
  padding: 14px 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: var(--font-heading);
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
  opacity: 0.85;
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* Empty cart */
.woocommerce-cart .cart-empty {
  text-align: center;
  padding: 80px 40px;
  font-size: 18px;
  color: var(--gray);
}

.woocommerce-cart .return-to-shop a {
  display: inline-block;
  padding: 14px 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: var(--font-heading);
  font-size: 16px;
  border-radius: 8px;
  transition: opacity 0.2s;
}


/* ========================================
   CHECKOUT PAGE
   ======================================== */

/* Hide default titles */
.woocommerce-checkout .page-title,
.woocommerce-checkout .entry-title {
  display: none;
}

.woocommerce-checkout .woocommerce {
  max-width: 1330px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* FdsX checkout wrapper */
.fdsx-checkout {
  max-width: 1330px;
  margin: 0 auto;
  padding: 32px 0 80px;
}

.fdsx-checkout-title {
  font-family: var(--font-heading);
  font-size: 40px;
  margin-bottom: 8px;
}

.fdsx-checkout-subtitle {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 32px;
}

/* ===== Payment Method Selector ===== */
.fdsx-payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.fdsx-payment-method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}

.fdsx-payment-method-card:hover {
  border-color: rgba(50, 132, 172, 0.4);
}

.fdsx-payment-method-card.is-selected {
  border-color: var(--accent);
  border-width: 2px;
}

.fdsx-pm-radio {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.fdsx-payment-method-card.is-selected .fdsx-pm-radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg-card);
}

.fdsx-pm-icon {
  margin-bottom: 10px;
  opacity: 0.6;
}

.fdsx-pm-title {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.fdsx-pm-desc {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 10px;
  line-height: 1.4;
}

.fdsx-pm-icons {
  display: flex;
  gap: 6px;
}

.fdsx-pm-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--accent);
}

.fdsx-pm-balance svg {
  width: 16px;
  height: 16px;
}

/* Points card icon */
.fdsx-pm-points > svg {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  opacity: 0.6;
}

/* ===== Points Details Card ===== */
.fdsx-points-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
}

.fdsx-points-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
}

.fdsx-points-card-label {
  font-size: 13px;
  color: var(--gray);
  display: block;
  margin-bottom: 8px;
}

.fdsx-points-card-number {
  font-family: var(--font-heading);
  font-size: 42px;
  color: var(--text-primary);
}

.fdsx-points-card-unit {
  font-size: 16px;
  color: var(--gray);
  margin-left: 4px;
}

.fdsx-points-card-icon svg {
  width: 48px;
  height: 48px;
  opacity: 0.25;
}

.fdsx-points-card-rows {
  border-top: 1px solid var(--border);
}

.fdsx-points-card-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
  font-size: 14px;
  color: var(--gray);
  border-bottom: 1px solid var(--border);
}

.fdsx-points-card-row:last-child {
  border-bottom: none;
}

.fdsx-points-card-row--highlight span:last-child {
  color: var(--accent);
  font-weight: 600;
}

.fdsx-points-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 13px;
  color: #22c55e;
  border-top: 1px solid var(--border);
}

.fdsx-points-card-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* We use our own visual payment-method selector above, so reset the WC list
   styling and hide its radios/labels — but DO NOT hide the list itself,
   because each <li> contains the .payment_box that holds the Stripe card
   number iframe. Hiding the whole list hides the card field too. */
.fdsx-checkout-payment-wrap .wc_payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}
.fdsx-checkout-payment-wrap .wc_payment_methods > li.wc_payment_method {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}
.fdsx-checkout-payment-wrap .wc_payment_methods > li.wc_payment_method > input[type="radio"],
.fdsx-checkout-payment-wrap .wc_payment_methods > li.wc_payment_method > label {
  display: none !important;
}
.fdsx-checkout-payment-wrap .wc_payment_methods > li.wc_payment_method > label::after {
  content: none;
}

/* Keep the order review table hidden (we render our own summary). */
.fdsx-checkout-payment-wrap .woocommerce-checkout-review-order-table {
  display: none;
}

.fdsx-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* Section titles */
.fdsx-checkout-section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 16px;
}

.fdsx-checkout-section-title--spaced {
  margin-top: 28px;
}

/* Slot the Place Order button is moved into, sits under Billing Information. */
.fdsx-place-order-slot {
  margin-top: 20px;
}

/* Billing card */
.fdsx-checkout-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 28px;
}

/* Hide the default WooCommerce billing heading inside our card */
.fdsx-checkout-card h3 {
  display: none;
}

/* Form fields */
.fdsx-checkout .form-row {
  margin-bottom: 16px;
}

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

.fdsx-checkout .form-row label .optional {
  color: var(--gray);
  font-weight: 400;
}

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

.fdsx-checkout .form-row input.input-text,
.fdsx-checkout .form-row textarea,
.fdsx-checkout .form-row select,
.fdsx-checkout .select2-container .select2-selection {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

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

/* Select2 */
.fdsx-checkout .select2-container--default .select2-selection--single {
  height: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.fdsx-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-primary);
  padding: 12px 16px;
  line-height: 1.4;
}

.fdsx-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
}

/* Two-column within billing (name fields etc) */
.fdsx-checkout .form-row-first,
.fdsx-checkout .form-row-last {
  display: inline-block;
  width: calc(50% - 8px);
  vertical-align: top;
}

.fdsx-checkout .form-row-first {
  margin-right: 12px;
}

/* Hide order review heading (we built our own summary) */
.fdsx-checkout #order_review_heading {
  display: none;
}

/* Hide the default WC review table (we have our own summary on the right) */
.fdsx-checkout .woocommerce-checkout-review-order-table {
  display: none;
}

/* Payment methods */
.fdsx-checkout .wc_payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.fdsx-checkout .wc_payment_method {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.fdsx-checkout .wc_payment_method:has(input:checked) {
  border-color: var(--accent);
}

.fdsx-checkout .wc_payment_method > label {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

/* Payment method description under label */
.fdsx-checkout .wc_payment_method > label + .payment_box::before {
  content: 'Pay securely via Stripe. All major cards accepted.';
  display: block;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
  padding-left: 0;
}

/* Card brand icons after the payment label */
.fdsx-checkout .wc_payment_method > label::after {
  content: '';
  display: inline-flex;
  margin-left: auto;
  width: 140px;
  height: 24px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='20' viewBox='0 0 32 20'%3E%3Crect width='32' height='20' rx='3' fill='%23fff'/%3E%3Cpath d='M12.3 13.5l1.9-11h2.4l-1.9 11h-2.4zm9.8-11l-2.3 7.5-.3-1.3-1-5c0-.1-.4-.5-1-.6h-3.2l-.1.3s1.1.2 2.3.9l2 7.2h2.5l3.8-9h-2.7zm5 11h2.2l-1.9-11h-2c-.5 0-.9.3-1.1.7l-3.5 10.3h2.5l.5-1.4h3l.3 1.4zm-2.6-3.3l1.2-3.5.7 3.5h-1.9zM9.5 2.5L7.1 9.6l-.3-1.2C6.2 6.9 4.8 5.3 3.2 4.4l2.1 9h2.5l3.7-11H9.5z' fill='%231a1f71'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='20' viewBox='0 0 32 20'%3E%3Crect width='32' height='20' rx='3' fill='%23252525'/%3E%3Ccircle cx='12' cy='10' r='7' fill='%23eb001b'/%3E%3Ccircle cx='20' cy='10' r='7' fill='%23f79e1b'/%3E%3Cpath d='M16 4.6A7 7 0 0 0 13 10a7 7 0 0 0 3 5.4A7 7 0 0 0 19 10a7 7 0 0 0-3-5.4z' fill='%23ff5f00'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='20' viewBox='0 0 32 20'%3E%3Crect width='32' height='20' rx='3' fill='%23016fd0'/%3E%3Ctext x='16' y='13' text-anchor='middle' fill='white' font-size='7' font-weight='bold' font-family='Arial'%3EAMEX%3C/text%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 center, 36px center, 72px center;
  background-size: 32px 20px;
  flex-shrink: 0;
}

.fdsx-checkout .payment_box {
  background: transparent;
  color: var(--gray);
  font-size: 13px;
  padding: 8px 0 0 0;
}

.fdsx-checkout .payment_box p {
  margin-bottom: 12px;
}

/* Hide the default test mode text styling, keep it readable */
.fdsx-checkout .payment_box .woocommerce-SavedPaymentMethods {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.fdsx-checkout .payment_box .woocommerce-SavedPaymentMethods li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
}

.fdsx-checkout .payment_box .woocommerce-SavedPaymentMethods li:last-child {
  border-bottom: none;
}

.fdsx-checkout .payment_box .woocommerce-SavedPaymentMethods li label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Radio buttons */
.fdsx-checkout .payment_box input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* Stripe Elements iframe container */
.fdsx-checkout .payment_box fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.fdsx-checkout .payment_box .wc-stripe-elements-field,
.fdsx-checkout .payment_box .stripe-card-group,
.fdsx-checkout .payment_box #wc-stripe-card-element,
.fdsx-checkout .payment_box .wc-stripe-upe-element {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 8px;
}

/* New card form fields inside Stripe */
.fdsx-checkout .payment_box .wc-stripe-new-card-form {
  margin-top: 16px;
}

.fdsx-checkout .payment_box .wc-stripe-new-card-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.fdsx-checkout .payment_box .wc-stripe-new-card-form input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

/* Save card checkbox */
.fdsx-checkout .payment_box .wc-stripe-save-card,
.fdsx-checkout .payment_box .woocommerce-SavedPaymentMethods-saveNew {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  font-size: 13px;
  color: var(--gray);
}

.fdsx-checkout .payment_box .wc-stripe-save-card input,
.fdsx-checkout .payment_box .woocommerce-SavedPaymentMethods-saveNew input {
  accent-color: var(--accent);
}

/* Place order button */
.fdsx-checkout #place_order {
  display: block;
  width: 100%;
  padding: 18px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.fdsx-checkout #place_order:hover {
  opacity: 0.85;
}

/* Terms & privacy */
.fdsx-checkout .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 16px;
}

.fdsx-checkout .woocommerce-privacy-policy-text {
  font-size: 12px;
  color: var(--gray);
}

/* Security note */
.fdsx-checkout-security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
  margin-top: 16px;
  margin-bottom: 12px;
}

.fdsx-checkout-back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  transition: opacity 0.2s;
}

.fdsx-checkout-back-link:hover {
  opacity: 0.7;
}

/* ===== RIGHT: Order Summary ===== */
.fdsx-checkout-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  margin-bottom: 12px;
}

.fdsx-checkout-summary-heading {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 20px;
}

.fdsx-checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fdsx-checkout-summary-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--bg-card-alt);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fdsx-checkout-summary-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fdsx-checkout-summary-item-info {
  flex: 1;
  min-width: 0;
}

.fdsx-checkout-summary-item-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text-primary);
}

.fdsx-checkout-summary-item-meta {
  display: block;
  font-size: 12px;
  color: var(--gray);
  margin-top: 2px;
}

.fdsx-checkout-summary-item-price {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.fdsx-checkout-summary-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.fdsx-checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 10px;
}

.fdsx-checkout-summary-discount span:last-child {
  color: var(--accent);
}

.fdsx-checkout-coupon-label {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 8px;
}

.fdsx-checkout-coupon-row {
  display: flex;
  gap: 8px;
}

.fdsx-checkout-coupon-input {
  flex: 1;
}

.fdsx-checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--font-heading);
  font-size: 16px;
}

.fdsx-checkout-total-amount {
  font-size: 28px;
  display: block;
  text-align: right;
}

.fdsx-checkout-total-gst {
  font-size: 12px;
  color: var(--gray);
  font-family: var(--font-body);
  text-align: right;
  display: block;
}

/* Secure checkout card */
.fdsx-checkout-secure-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}

.fdsx-checkout-secure-title {
  font-family: var(--font-heading);
  font-size: 15px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fdsx-checkout-secure-text {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 12px;
}

.fdsx-checkout-secure-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* WC default coupon toggle on checkout */
.woocommerce-checkout .woocommerce-form-coupon-toggle {
  display: none;
}

.woocommerce-checkout .checkout_coupon {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .fdsx-checkout-layout {
    grid-template-columns: 1fr;
  }

  .fdsx-checkout {
    padding: 0 0 60px;
  }

  .fdsx-checkout .form-row-first,
  .fdsx-checkout .form-row-last {
    width: 100%;
    margin-right: 0;
  }

  .fdsx-payment-methods {
    grid-template-columns: 1fr;
  }
}


/* ========================================
   THANK YOU / ORDER SUMMARY PAGE
   ======================================== */
.fdsx-thankyou {
  max-width: 1330px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.fdsx-thankyou-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

.fdsx-thankyou-banner-title {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.fdsx-thankyou-banner-text {
  font-size: 14px;
  color: var(--gray);
}

.fdsx-thankyou-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* Order details bar */
.fdsx-thankyou-details-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.fdsx-thankyou-details-heading {
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 12px;
}

.fdsx-thankyou-details-row {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--gray);
  flex-wrap: wrap;
}

.fdsx-thankyou-details-row strong {
  color: var(--text-primary);
}

.fdsx-status-completed {
  color: #22c55e;
}

/* Items */
.fdsx-thankyou-section-title {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 12px;
}

.fdsx-thankyou-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.fdsx-thankyou-item-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--bg-card-alt);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fdsx-thankyou-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fdsx-thankyou-item-info {
  flex: 1;
}

.fdsx-thankyou-item-name {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.fdsx-thankyou-item-qty {
  font-size: 13px;
  color: var(--gray);
}

.fdsx-thankyou-item-price {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* Download button */
.fdsx-thankyou-download-wrap {
  margin: 16px 0;
}

.fdsx-thankyou-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

/* Action buttons */
.fdsx-thankyou-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.fdsx-thankyou-actions .fdsx-btn {
  flex: 1;
  text-align: center;
}

/* Payment summary card */
.fdsx-thankyou-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 12px;
}

.fdsx-thankyou-summary-title {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 20px;
}

.fdsx-thankyou-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 12px;
}

.fdsx-thankyou-summary-discount span:last-child {
  color: var(--accent);
}

.fdsx-thankyou-summary-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.fdsx-thankyou-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 20px;
}

.fdsx-thankyou-total-amount {
  font-size: 28px;
  display: block;
}

.fdsx-thankyou-total-gst {
  font-size: 12px;
  color: var(--gray);
  font-family: var(--font-body);
}

.fdsx-thankyou-payment-method {
  background: var(--bg-card-alt);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.fdsx-thankyou-method-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.fdsx-thankyou-method-value {
  font-size: 14px;
  color: var(--text-primary);
}

.fdsx-thankyou-txn-ref {
  font-size: 12px;
  color: var(--gray);
}

.fdsx-thankyou-help-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 8px;
}

.fdsx-thankyou-help-card strong {
  font-family: var(--font-heading);
  font-size: 14px;
}

.fdsx-thankyou-help-text {
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
}

.fdsx-thankyou-failed {
  text-align: center;
  padding: 60px 0;
}

/* ===== My Account: Payment Methods ===== */
.fdsx-account-content .woocommerce-MyAccount-paymentMethods {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods thead th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods tbody tr:last-child td {
  border-bottom: none;
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods .button {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-right: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods .button:hover {
  border-color: var(--accent);
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods .button.delete {
  color: #f87171;
}

.fdsx-account-content .woocommerce-MyAccount-paymentMethods .button.default {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* "Add payment method" CTA button on the listing page */
.fdsx-account-content .woocommerce-Button.button,
.fdsx-account-content a.button[href*="add-payment-method"] {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.fdsx-account-content .woocommerce-Button.button:hover,
.fdsx-account-content a.button[href*="add-payment-method"]:hover {
  opacity: 0.85;
}

/* Add Payment Method form (the page you reach via the CTA above) */
.fdsx-account-content .woocommerce-PaymentMethod--new {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.fdsx-account-content #add_payment_method .payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.fdsx-account-content #add_payment_method .wc_payment_method {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.fdsx-account-content #add_payment_method .payment_box {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 0 0;
}

/* Responsive */
@media (max-width: 768px) {
  .woocommerce-checkout .col2-set {
    grid-template-columns: 1fr;
  }

  .fdsx-thankyou-layout {
    grid-template-columns: 1fr;
  }

  .fdsx-thankyou-actions {
    flex-direction: column;
  }

  .fdsx-thankyou {
    padding: 0 20px 60px;
  }

  .woocommerce-checkout .woocommerce {
    padding: 0 20px 60px;
  }
}
