/* ZMG Móviles — Native WooCommerce Checkout & Thank-You Stylesheet */
body.zmg-nc-page {
  --zmg-primary: #FFCC00;
  --zmg-secondary: #003366;
  --zmg-accent: #CC3333;
  --zmg-text: #1A1E23;
  --zmg-muted: #64748B;
  --zmg-bg-soft: #F4F8FA;
  --zmg-border: #DEE0E3;
  --zmg-surface: #EBEBEB;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: var(--zmg-text);
  font-family: 'Inter', 'Camphor Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.zmg-nc-page *,
.zmg-nc-page *::before,
.zmg-nc-page *::after {
  box-sizing: border-box;
}

/* Admin preview notice bar */
.zmg-nc-preview-banner {
  background: #0F172A;
  color: #F8FAFC;
  font-size: 13px;
  padding: 8px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.zmg-nc-preview-banner strong {
  color: var(--zmg-primary);
}

.zmg-nc-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zmg-nc-preview-links a {
  color: #FFFFFF;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
}

.zmg-nc-preview-links a.is-active,
.zmg-nc-preview-links a:hover {
  background: var(--zmg-primary);
  color: #000000;
}

/* Minimal Header */
.zmg-nc-header {
  background: var(--zmg-primary);
  width: 100%;
}

.zmg-nc-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  min-height: 76px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zmg-nc-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.zmg-nc-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

.zmg-nc-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--zmg-secondary);
  text-decoration: none;
  padding: 6px;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}

.zmg-nc-header-action:hover {
  opacity: 0.78;
}

.zmg-nc-header-action svg {
  width: 25px;
  height: 25px;
  display: block;
}

/* Main Container */
.zmg-nc-main {
  flex: 1 0 auto;
  width: 100%;
}

.zmg-nc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

/* WooCommerce Notices & Hidden helpers */
.zmg-nc-page .includes_tax,
.zmg-nc-page #billing_state_field .optional,
.zmg-nc-page .zmg-country-hidden,
.zmg-nc-page #billing_country_field {
  display: none !important;
}

.zmg-nc-page .woocommerce-NoticeGroup-checkout {
  width: 100%;
  margin-bottom: 20px;
}

.zmg-nc-page .woocommerce-error,
.zmg-nc-page .woocommerce-info,
.zmg-nc-page .woocommerce-message {
  border-radius: 10px;
  margin: 0 0 20px;
}

/* Empty cart admin prompt */
.zmg-nc-empty-box {
  max-width: 560px;
  margin: 40px auto;
  background: var(--zmg-bg-soft);
  border: 1px solid var(--zmg-border);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}

.zmg-nc-empty-box h2 {
  margin: 0 0 10px;
  color: var(--zmg-secondary);
  font-size: 22px;
}

.zmg-nc-empty-box p {
  margin: 0 0 20px;
  color: var(--zmg-muted);
}

.zmg-nc-btn-primary {
  display: inline-block;
  background: var(--zmg-secondary);
  color: #FFFFFF !important;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
}

.zmg-nc-btn-primary:hover {
  background: #002244;
}

/* 2-Column Checkout Grid */
.zmg-nc-page form.woocommerce-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.zmg-nc-page form.woocommerce-checkout > .woocommerce-NoticeGroup-checkout,
.zmg-nc-page form.woocommerce-checkout > .woocommerce-notices-wrapper {
  grid-column: 1 / -1;
}

.zmg-nc-col-left {
  background: #FFFFFF;
  min-width: 0;
}

.zmg-nc-col-right {
  position: sticky;
  top: 24px;
  min-width: 0;
}

.zmg-nc-page .woocommerce-billing-fields h3,
.zmg-nc-page h3#order_review_heading {
  font-size: 24px;
  font-weight: 600;
  color: var(--zmg-text);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--zmg-border);
}

/* 6-Column Billing Form Grid */
.zmg-nc-page .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 16px;
}

.zmg-nc-page .woocommerce-billing-fields__field-wrapper .form-row {
  grid-column: span 6;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  float: none !important;
}

.zmg-nc-page .woocommerce-billing-fields__field-wrapper .form-row.zmg-col-100 {
  grid-column: span 6;
}

.zmg-nc-page .woocommerce-billing-fields__field-wrapper .form-row.zmg-col-50 {
  grid-column: span 3;
}

.zmg-nc-page .woocommerce-billing-fields__field-wrapper .form-row.zmg-col-33 {
  grid-column: span 2;
}

.zmg-nc-page .form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.zmg-nc-page .form-row label .required {
  color: var(--zmg-accent);
  text-decoration: none;
}

.zmg-nc-page .form-row input.input-text,
.zmg-nc-page .form-row select,
.zmg-nc-page .form-row textarea,
.zmg-nc-page .select2-container--default .select2-selection--single {
  width: 100% !important;
  height: 44px;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--zmg-text);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zmg-nc-page .form-row input.input-text:focus,
.zmg-nc-page .form-row select:focus,
.zmg-nc-page .select2-container--default.select2-container--open .select2-selection--single {
  outline: none;
  border-color: var(--zmg-secondary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.zmg-nc-page .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 22px;
  padding-left: 0;
  color: var(--zmg-text);
}

.zmg-nc-page .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px;
  right: 8px;
}

/* Order Review Table */
.zmg-nc-page table.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  margin: 0 0 16px;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table thead {
  display: none;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tbody {
  display: block;
  border-top: 1px solid var(--zmg-border);
  border-bottom: 1px solid var(--zmg-border);
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tbody tr.cart_item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tbody tr.cart_item:last-child {
  border-bottom: 0;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tbody td.product-name {
  flex: 1 1 auto;
  padding: 0 !important;
  border: 0 !important;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tbody td.product-total {
  flex: 0 0 auto;
  text-align: right;
  font-weight: 700;
  color: var(--zmg-text);
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap;
}

.zmg-nc-item-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zmg-nc-item-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 8px;
  border: 1px solid var(--zmg-border);
  overflow: hidden;
  background: #FFFFFF;
}

.zmg-nc-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.zmg-nc-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.zmg-nc-item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.zmg-nc-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--zmg-text);
  line-height: 1.3;
}

.zmg-nc-page .zmg-remove-item {
  color: var(--zmg-muted);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.zmg-nc-page .zmg-remove-item:hover {
  color: var(--zmg-accent);
  background: rgba(204, 51, 51, 0.08);
}

/* Quantity +/- pill buttons (matches CCJ 9213) */
.zmg-nc-page .product-quantity {
  display: inline-flex;
  align-items: center;
}

.zmg-nc-page .product-quantity .minus {
  border-radius: 15px 0 0 15px;
}

.zmg-nc-page .product-quantity .plus {
  border-radius: 0 15px 15px 0;
}

.zmg-nc-page .product-quantity .minus,
.zmg-nc-page .product-quantity .plus {
  width: 30px;
  height: 30px;
  background-color: var(--zmg-secondary) !important;
  color: #FFFFFF !important;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.zmg-nc-page .product-quantity .minus:hover,
.zmg-nc-page .product-quantity .plus:hover {
  background-color: var(--zmg-accent) !important;
}

.zmg-nc-page .product-quantity .qty-input {
  width: 40px;
  height: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--zmg-secondary);
  border-radius: 0;
  min-height: 25px;
  padding: 0;
  -moz-appearance: textfield;
}

.zmg-nc-page .product-quantity .qty-input::-webkit-inner-spin-button,
.zmg-nc-page .product-quantity .qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Order Review tfoot */
.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr th,
.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr td {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 14px;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr td {
  text-align: right;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr.order-total {
  font-size: 18px;
  font-weight: 700;
  border-top: 1px solid var(--zmg-border);
  border-bottom: 0;
  padding-top: 12px;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
  font-size: 18px;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr.zmg-pago-info,
.zmg-nc-page table.woocommerce-checkout-review-order-table tfoot tr.zmg-pago-info td {
  display: block;
  width: 100%;
  text-align: center;
  border-bottom: 0;
  padding: 6px 0 0 !important;
}

.zmg-nc-page ul#shipping_method {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
}

.zmg-nc-page ul#shipping_method li {
  margin: 0 0 6px;
}

/* Payment Section */
.zmg-nc-page #payment.woocommerce-checkout-payment {
  background: var(--zmg-bg-soft);
  border: 1px solid var(--zmg-border);
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
}

.zmg-nc-page #payment ul.wc_payment_methods {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-bottom: 1px solid var(--zmg-border);
}

.zmg-nc-page #payment ul.wc_payment_methods li.wc_payment_method {
  padding: 10px 0;
  border-bottom: 1px solid #E2E8F0;
}

.zmg-nc-page #payment ul.wc_payment_methods li.wc_payment_method:last-child {
  border-bottom: 0;
}

.zmg-nc-page #payment ul.wc_payment_methods li > label {
  font-weight: 600;
  font-size: 14px;
  color: var(--zmg-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.zmg-nc-page #payment ul.wc_payment_methods li img {
  height: 1.5em;
  width: auto;
  vertical-align: middle;
}

.zmg-nc-page #payment div.payment_box {
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 10px 0 4px;
  font-size: 13px;
}

.zmg-nc-page #payment div.payment_box::before {
  display: none;
}

.zmg-nc-page #payment .woocommerce-terms-and-conditions-wrapper {
  font-size: 12px;
  color: var(--zmg-muted);
  margin-bottom: 14px;
}

.zmg-nc-page #payment #place_order {
  width: 100%;
  background: var(--zmg-secondary);
  color: #FFFFFF;
  border: 0;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.zmg-nc-page #payment #place_order:hover {
  background: #002244;
}

/* Thank-You 2-Column Layout */
.zmg-ty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 150px);
  width: 100%;
}

.zmg-ty-left {
  background: var(--zmg-secondary);
  color: #FFFFFF;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.zmg-ty-left h1 {
  margin: 0;
  color: #FFFFFF;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.zmg-ty-copy {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
}

.zmg-ty-alert {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--zmg-primary);
}

.zmg-ty-whatsapp-btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--zmg-primary);
  color: #000000 !important;
  font-weight: 800;
  font-size: 15px;
  padding: 15px 24px;
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.zmg-ty-whatsapp-btn:hover {
  background: #FFD633;
  transform: translateY(-1px);
}

.zmg-ty-right {
  background: var(--zmg-surface);
  padding: 32px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.zmg-ty-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.zmg-ty-card ul.woocommerce-thankyou-order-details {
  list-style: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--zmg-bg-soft);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.zmg-ty-card ul.woocommerce-thankyou-order-details li {
  font-size: 13px;
  color: var(--zmg-muted);
  border: 0;
  padding: 0;
  margin: 0;
}

.zmg-ty-card ul.woocommerce-thankyou-order-details li strong {
  display: block;
  color: var(--zmg-text);
  font-size: 14px;
  margin-top: 2px;
}

.zmg-ty-card .woocommerce-order-details__title,
.zmg-ty-card .wc-item-meta {
  display: none;
}

.zmg-ty-card table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.zmg-ty-card table.shop_table th,
.zmg-ty-card table.shop_table td {
  padding: 9px 6px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 14px;
  text-align: left;
}

.zmg-ty-card table.shop_table th:last-child,
.zmg-ty-card table.shop_table td:last-child {
  text-align: right;
}

.zmg-ty-card .woocommerce-customer-details address {
  font-style: normal;
  font-size: 14px;
  color: #334155;
  background: var(--zmg-bg-soft);
  padding: 14px 16px;
  border-radius: 10px;
}

/* Footer */
.zmg-nc-footer {
  background: var(--zmg-bg-soft);
  border-top: 1px solid var(--zmg-border);
  width: 100%;
}

.zmg-nc-footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #64748B;
}

.zmg-nc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.zmg-nc-footer-links a {
  color: #475569;
  text-decoration: none;
}

.zmg-nc-footer-links a:hover {
  color: var(--zmg-text);
}

/* Responsive */
@media (max-width: 960px) {
  .zmg-nc-page form.woocommerce-checkout,
  .zmg-ty-grid {
    grid-template-columns: 1fr;
  }

  .zmg-nc-col-right {
    position: static;
  }

  .zmg-ty-left {
    min-height: auto;
    padding: 36px 24px;
  }

  .zmg-ty-left h1 {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .zmg-nc-container {
    padding: 20px 14px 36px;
  }

  .zmg-nc-header-inner {
    padding: 8px 16px;
  }

  .zmg-nc-page .woocommerce-billing-fields__field-wrapper .form-row.zmg-col-50,
  .zmg-nc-page .woocommerce-billing-fields__field-wrapper .form-row.zmg-col-33 {
    grid-column: span 6;
  }

  .zmg-ty-card ul.woocommerce-thankyou-order-details {
    grid-template-columns: 1fr;
  }
}
/* Override WooCommerce default col2-set floats inside native checkout */
.zmg-nc-page .col2-set,
.zmg-nc-page .col2-set .col-1,
.zmg-nc-page .col2-set .col-2 {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.zmg-nc-page table.woocommerce-checkout-review-order-table tbody td.product-name .product-quantity {
  margin-left: 68px;
  margin-top: 4px;
}