/**
 * AMA Checkout CSS v9.1 — Fixed layout, matches Image 2 design
 * Key fix: Reset WC float layout → use Flexbox for reliable 2-column
 * @package AMA
 */

/* ============================================================
   CUSTOM PROPERTIES
============================================================ */
:root {
  --co-primary:  #FFB800;
  --co-dark:     #111827;
  --co-muted:    #6B7280;
  --co-border:   #E5E7EB;
  --co-bg:       #F9FAFB;
  --co-white:    #ffffff;
  --co-radius:   12px;
  --co-shadow:   0 1px 6px rgba(0,0,0,.07);
  --co-max:      1160px;
}

body.woocommerce-checkout {
	touch-action: pan-y;
}

/* ============================================================
   RESET WOOCOMMERCE DEFAULT FLOAT/COLUMN LAYOUT
   WC uses float: left/right on col-1, col-2, #customer_details
   These MUST be reset before we apply our own layout
============================================================ */
.woocommerce-checkout #customer_details,
.woocommerce-checkout #customer_details.col-1,
.woocommerce-checkout .col-2,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
  float: none !important;
  width: 100% !important;
  clear: both !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Clear all floats inside the checkout form */
.ama-co-form::before,
.ama-co-form::after {
  display: none !important;
  content: none !important;
}

/* WC hides #order_review by default sometimes — we manage it */
.woocommerce-checkout #order_review { display: block !important; }

/* ============================================================
   LAYOUT — WRAPPER
============================================================ */
.ama-co-wrap {
  max-width: var(--co-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}
.ama-co-wc-hidden { display: none !important; }
body.woocommerce-checkout .ama-co-main { 
  padding-top: 1.75rem; 
  padding-bottom: 3rem; 
}

/* ============================================================
   TRUST BAR — inside .ama-co-main, below subtitle (Fix 1)
============================================================ */
.ama-co-trustbar {
  /* No breakout — lives inside .ama-co-main container */
  background: var(--co-bg);
  border: 1.5px solid var(--co-border);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
  width: 100%;
}
.ama-co-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  align-items: center;
}
.ama-co-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.ama-co-trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: rgba(255,184,0,.14);
  border-radius: 50%;
  color: var(--co-primary);
  flex-shrink: 0;
}
.ama-co-trust-icon svg { width: 15px; height: 15px; }

/* ============================================================
   PAGE HEADER
============================================================ */
.ama-co-header { margin-bottom: 1.5rem; }

.ama-co-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--co-muted);
  margin-bottom: 6px;
}
.ama-co-breadcrumb a {
  color: var(--co-muted); text-decoration: none; transition: color .2s;
}
.ama-co-breadcrumb a:hover { color: var(--co-primary); }

.ama-co-title {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 900; color: var(--co-dark); margin: 0 0 5px; line-height: 1.1;
}
.ama-co-subtitle { font-size: 13px; color: var(--co-muted); margin: 0; }

/* ============================================================
   TWO-COLUMN LAYOUT — FLEXBOX (more reliable than CSS Grid)
   The ama-co-form is the flex container.
   ama-co-form-col: flexible, shrinks/grows
   ama-co-summary-col: fixed 360px, sticky
============================================================ */
.ama-co-form {
  /* Reset any WC styles on the form element */
  display: block !important;
  float: none !important;
  width: 100% !important;
  clear: both !important;
  box-sizing: border-box;
}

.ama-co-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
  flex-wrap: nowrap;
}

@media (min-width: 960px) {
  .ama-co-grid {
    flex-direction: row !important;
    gap: 2rem !important;
    align-items: flex-start !important;
  }
}

/* ============================================================
   FORM COLUMN (left)
============================================================ */
.ama-co-form-col {
  flex: 1 1 0% !important;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  float: none !important;
}

@media (min-width: 960px) {
  .ama-co-form-col {
    flex: 1 1 auto !important;
    min-width: 0;
    width: auto;
    max-width: none;
  }
}

.ama-co-form-col > * + * { margin-top: 1.1rem; }

/* ============================================================
   SUMMARY COLUMN (right, sticky)
============================================================ */
.ama-co-summary-col {
  width: 100%;
  box-sizing: border-box;
  float: none !important;
  flex: 0 0 100%;
}

@media (min-width: 960px) {
  .ama-co-summary-col {
    flex: 0 0 360px !important;
    width: 360px !important;
    max-width: 360px;
    position: sticky !important;
    top: 96px;
    align-self: flex-start;
  }
}

.ama-co-summary-col { display: flex; flex-direction: column; gap: 13px; }

/* ============================================================
   FORM SECTIONS
============================================================ */
.ama-co-section {
  background: var(--co-white);
  border: 1.5px solid var(--co-border);
  border-radius: var(--co-radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--co-shadow);
  box-sizing: border-box;
}

.ama-co-sec-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1.2rem;
}
.ama-co-sec-head h2 {
  font-size: 15px !important; font-weight: 900 !important;
  color: var(--co-dark) !important; margin: 0 !important;
  font-family: inherit !important;
}

.ama-co-num {
  width: 26px; height: 26px;
  background: var(--co-primary);
  color: var(--co-dark);
  border-radius: 50%;
  font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
}

/* 2-col field grid */
.ama-co-row-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}
@media (max-width: 640px) {
  .ama-co-row-2 { grid-template-columns: 1fr !important; }
}

/* 3-col field grid */
.ama-co-row-3 {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 2px;
}
@media (max-width: 600px) {
  .ama-co-row-3 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 400px) {
  .ama-co-row-3 { grid-template-columns: 1fr !important; }
}

/* Labels */
.ama-co-label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--co-muted) !important;
  margin-bottom: 5px !important;
  font-family: inherit !important;
}
.ama-co-label abbr {
  color: #EF4444 !important; text-decoration: none !important;
  margin-left: 1px;
}

/* ============================================================
   WC FIELD OVERRIDES — Reset & restyle all inputs
============================================================ */
.ama-co-form .form-row  { margin: 0 !important; padding: 0 !important; }
.ama-co-form .form-row label { display: none !important; }
.ama-co-form .woocommerce-input-wrapper { width: 100% !important; }

.ama-co-form input[type="text"],
.ama-co-form input[type="email"],
.ama-co-form input[type="tel"],
.ama-co-form input[type="number"],
.ama-co-form input[type="password"],
.ama-co-form select,
.ama-co-form textarea {
  width: 100% !important;
  background: var(--co-bg) !important;
  border: 1.5px solid var(--co-border) !important;
  border-radius: 9px !important;
  padding: 10px 13px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--co-dark) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .2s, background .2s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}
.ama-co-form input:focus,
.ama-co-form select:focus,
.ama-co-form textarea:focus {
  border-color: var(--co-primary) !important;
  background: var(--co-white) !important;
}
.ama-co-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  padding-right: 34px !important;
}
.ama-co-form textarea { min-height: 90px; resize: vertical; }

/* ==============================================================
   FIX 6 — Horizontal scroll ("side swipe") on mobile checkout
   Root cause: `.ama-co-form select { width:100% !important }`
   above was more specific than Select2/SelectWoo's own
   `.select2-hidden-accessible { width:1px !important }` rule
   (which visually hides the original <select> once Select2 has
   replaced it). Our rule was winning the specificity fight, so
   the original Country/District <select> stayed in the DOM at
   full container width while position:absolute — invisible
   (clipped), but still stretching the page's scrollable width
   past the viewport. That's what let the checkout page be
   side-swiped, and it also dragged the fixed bottom nav out of
   place. This restores Select2's own hidden sizing with higher
   specificity so it wins regardless of source order.
============================================================== */
.ama-co-form select.select2-hidden-accessible {
  width: 1px !important;
  min-width: 1px !important;
  overflow: hidden !important;
}

.ama-co-form .woocommerce-invalid input,
.ama-co-form .woocommerce-invalid select {
  border-color: #EF4444 !important;
  background: #fef2f2 !important;
}
.ama-co-form .woocommerce-validated input { border-color: #22C55E !important; }

/* ============================================================
   DELIVERY TYPE — 3 equal buttons in a row
============================================================ */
.ama-co-dtype-wrap { margin-top: 1rem; }

.ama-co-dtypes {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  flex-wrap: nowrap;
}

.ama-co-dtype {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px !important;
  border: 2px solid var(--co-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  background: var(--co-white);
  transition: border-color .2s, background .2s;
  font-family: inherit;
  box-sizing: border-box;
}
.ama-co-dtype:hover,
.ama-co-dtype.active {
  border-color: var(--co-primary) !important;
  background: rgba(255,184,0,.06) !important;
}
.ama-co-dtype-ico {
  width: 18px; height: 18px;
  color: var(--co-muted);
  transition: color .2s;
  flex-shrink: 0;
}
.ama-co-dtype:hover .ama-co-dtype-ico,
.ama-co-dtype.active .ama-co-dtype-ico { color: var(--co-primary); }

.ama-co-dtype-t {
  font-size: 10.5px !important; font-weight: 700 !important;
  color: var(--co-dark); line-height: 1.3;
  font-family: inherit;
  word-break: break-word;
}
.ama-co-dtype-s {
  font-size: 9px !important; color: var(--co-muted);
  font-family: inherit;
  word-break: break-word;
}

/* Ship to different address */
.ama-co-ship-diff {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--co-border);
}
.ama-co-ship-diff-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--co-dark);
}

/* ============================================================
   SHIPPING METHOD
============================================================ */
.ama-co-ship-list { display: flex; flex-direction: column; gap: 9px; }

.ama-co-ship-opt {
  display: flex !important; align-items: center !important; gap: 13px !important;
  padding: 13px 15px !important;
  border: 2px solid var(--co-border) !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  background: var(--co-white) !important;
  transition: border-color .2s, background .2s;
  box-sizing: border-box;
}
.ama-co-ship-opt:hover,
.ama-co-ship-opt.selected {
  border-color: var(--co-primary) !important;
  background: rgba(255,184,0,.05) !important;
}

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

.ama-co-radio-dot {
  width: 18px; height: 18px;
  border: 2px solid var(--co-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: border-color .2s;
}
.ama-co-ship-opt.selected .ama-co-radio-dot { border-color: var(--co-primary); }
.ama-co-radio-inner {
  width: 9px; height: 9px; border-radius: 50%;
  background: transparent; transition: background .2s;
}
.ama-co-ship-opt.selected .ama-co-radio-inner { background: var(--co-primary); }

.ama-co-ship-info { flex: 1 !important; display: flex; flex-direction: column; }
.ama-co-ship-name { font-size: 13px !important; font-weight: 700; color: var(--co-dark); }
.ama-co-ship-meta { font-size: 10px; color: var(--co-muted); }
.ama-co-ship-cost {
  font-size: 14px !important; font-weight: 900 !important;
  color: var(--co-dark); white-space: nowrap;
}
.ama-co-ship-opt.selected .ama-co-ship-cost { color: var(--co-primary) !important; }
.ama-co-free { color: #22C55E; font-size: 11px; font-weight: 900; text-transform: uppercase; }

.ama-co-ship-extras {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 13px;
}
.ama-co-check-label {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; font-size: 12px; font-weight: 500; color: #374151;
  font-family: inherit;
}
.ama-co-check { accent-color: var(--co-primary); width: 14px; height: 14px; }

/* ============================================================
   PAYMENT SECTION
============================================================ */
.ama-co-form #payment .payment_methods {
  list-style: none !important; margin: 0 !important; padding: 0 !important;
  display: flex !important; flex-direction: column !important; gap: 9px !important;
  float: none !important; width: 100% !important;
}
.ama-co-form #payment .payment_methods > li {
  border: 2px solid var(--co-border) !important;
  border-radius: 11px !important;
  padding: 13px 15px !important;
  cursor: pointer;
  background: var(--co-white) !important;
  transition: border-color .2s, background .2s;
  float: none !important; width: auto !important; clear: both !important;
  box-sizing: border-box;
}
.ama-co-form #payment .payment_methods > li.payment_method_active,
.ama-co-form #payment .payment_methods > li:has(input[type="radio"]:checked) {
  border-color: var(--co-primary) !important;
  background: rgba(255,184,0,.05) !important;
}
.ama-co-form #payment .payment_methods li label {
  display: flex !important;
  align-items: center; gap: 9px;
  font-size: 13px !important; font-weight: 700 !important;
  color: var(--co-dark) !important;
  cursor: pointer; letter-spacing: 0 !important;
  text-transform: none !important;
  margin: 0 !important; padding: 0 !important;
  float: none !important; width: auto !important;
}
.ama-co-form #payment .payment_methods li input[type="radio"] {
  width: 15px !important; height: 15px !important;
  accent-color: var(--co-primary); cursor: pointer; flex-shrink: 0;
  float: none !important; margin: 0 !important;
}
.ama-co-form #payment .payment_methods li img {
  max-height: 20px !important; width: auto; vertical-align: middle;
}
.ama-co-form #payment .payment_box {
  margin-top: 9px; padding: 10px 14px;
  background: var(--co-bg);
  border-radius: 8px;
  font-size: 12px; color: var(--co-muted); line-height: 1.5;
}
.ama-co-form #payment .payment_box p { margin: 0 !important; }

/* CRITICAL: Hide WC's place_order button — use sidebar button instead */
.ama-co-form #payment .place-order,
.ama-co-form #payment .wc_payment_methods + .place-order,
.ama-co-form .woocommerce-checkout-payment .place-order {
  display: none !important;
  visibility: hidden !important;
}

.ama-co-form .woocommerce-privacy-policy-text {
  font-size: 11px; color: var(--co-muted); margin-top: 8px;
}
.ama-co-no-pay { font-size: 13px; color: var(--co-muted); margin: 0; }
.ama-co-notes-h {
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .09em; color: var(--co-dark); margin: 0 0 12px;
}

/* ============================================================
   ORDER SUMMARY CARD
============================================================ */
.ama-co-summary-card {
  background: var(--co-white);
  border: 1.5px solid var(--co-border);
  border-radius: var(--co-radius);
  overflow: hidden;
  box-shadow: var(--co-shadow);
}

/* Header */
.ama-co-summary-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1.5px solid var(--co-border);
}
.ama-co-summary-top h3 {
  font-size: 13px !important; font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: .01em !important; color: var(--co-dark) !important; margin: 0 !important;
}
.ama-co-edit-cart {
  font-size: 11.5px; font-weight: 700;
  color: var(--co-primary); text-decoration: none; transition: color .2s;
}
.ama-co-edit-cart:hover { color: var(--co-dark); }

/* Items */
.ama-co-items {
  padding: 15px 18px; display: flex; flex-direction: column; gap: 0;
}
.ama-co-item {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--co-border);
}
.ama-co-item:first-child { padding-top: 0; }
.ama-co-item:last-child { border-bottom: none; padding-bottom: 0; }

.ama-co-item-img {
  position: relative; flex-shrink: 0;
  width: 54px; height: 54px;
  background: var(--co-bg);
  border: 1px solid var(--co-border);
  border-radius: 8px; overflow: hidden;
}
.ama-co-item-img img {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; display: block !important;
}
.ama-co-item-badge {
  position: absolute; top: -7px; right: -7px;
  width: 19px; height: 19px;
  background: #374151; color: #fff;
  font-size: 9px; font-weight: 900;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.ama-co-item-info { flex: 1; min-width: 0; }
.ama-co-item-name {
  font-size: 11.5px !important; font-weight: 700 !important; color: var(--co-dark) !important;
  margin: 0 0 3px !important; line-height: 1.35;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ama-co-item-meta { font-size: 10px; color: var(--co-muted); margin: 0; }
/* Customized items only (see form-checkout.php): forces a line-break in
   the .ama-co-item flex row so the PCP summary card gets the item's FULL
   width — same content-box width as .ama-co-totals below, since both sit
   inside containers with identical 18px horizontal padding — instead of
   being squeezed into the narrow .ama-co-item-info cell next to the
   thumbnail and price. */
.ama-co-item-meta-full {
  flex: 1 1 100%;
  width: 100%;
  min-width: 100%;
  margin: 8px 0 0;
}
.ama-co-item-price {
  font-size: 13px; font-weight: 900; color: var(--co-dark);
  white-space: nowrap; flex-shrink: 0;
}

/* Totals */
.ama-co-totals {
  padding: 12px 18px; border-top: 1.5px solid var(--co-border);
  display: flex; flex-direction: column; gap: 9px;
}
.ama-co-total-row {
  display: flex; justify-content: space-between; align-items: center;
}
.ama-co-total-row span:first-child { font-size: 12px; color: var(--co-muted); }
.ama-co-total-row span:last-child { font-size: 13px; font-weight: 700; color: var(--co-dark); }
.ama-co-discount-row span:last-child { color: #22C55E !important; }
.ama-co-free-tag { color: #22C55E; font-size: 12px; font-weight: 700; }

/* Grand total */
.ama-co-grand {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 18px; border-top: 2px solid var(--co-border);
}
.ama-co-grand > span:first-child {
  font-size: 14px; font-weight: 900; text-transform: none;
  letter-spacing: .01em; color: var(--co-dark);
}
.ama-co-grand-val {
  font-size: 1.6rem; font-weight: 900;
  color: var(--co-dark); letter-spacing: -.02em;
}

/* Coupon */
.ama-co-coupon { padding: 13px 18px; border-top: 1.5px solid var(--co-border); }
.ama-co-coupon-title {
  font-size: 13px; font-weight: 700; text-transform: none;
  letter-spacing: 0; color: var(--co-dark); margin: 0 0 9px;
}
.ama-co-coupon-row { display: flex; gap: 8px; }
.ama-co-coupon-input {
  flex: 1; border: 1.5px solid var(--co-border); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; font-weight: 500; color: var(--co-dark);
  background: var(--co-bg); outline: none; transition: border-color .2s;
  font-family: inherit; box-sizing: border-box;
}
.ama-co-coupon-input:focus { border-color: var(--co-primary); background: #fff; }
.ama-co-coupon-btn {
  background: var(--co-dark); color: #fff;
  border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 12px; font-weight: 800;
  text-transform: none; letter-spacing: .01em;
  cursor: pointer; transition: background .2s; white-space: nowrap;
  font-family: inherit;
  /* Fix 4: ensure text is always centered */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  flex-shrink: 0;
}
.ama-co-coupon-btn:hover { background: var(--co-primary); color: var(--co-dark); }
.ama-co-coupon-msg { margin: 6px 0 0; font-size: 11px; font-weight: 600; }
.ama-co-coupon-msg.ok { color: #22C55E; }
.ama-co-coupon-msg.err { color: #EF4444; }

/* Trust list inside card */
.ama-co-trust-list {
  padding: 13px 18px; border-top: 1.5px solid var(--co-border);
  display: flex; flex-direction: column; gap: 10px;
}
.ama-co-trust-row { display: flex; align-items: flex-start; gap: 11px; }
.ama-co-trust-ico {
  width: 30px; height: 30px;
  background: var(--co-bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ama-co-trust-ico svg { width: 14px; height: 14px; color: #6B7280; }
.ama-co-trust-name { font-size: 11px; font-weight: 700; color: var(--co-dark); margin: 0 0 1px; }
.ama-co-trust-sub { font-size: 10px; color: var(--co-muted); margin: 0; }

/* ============================================================
   PLACE ORDER BUTTON
============================================================ */
.ama-co-po-btn {
  display: flex !important; align-items: center !important;
  justify-content: center !important; gap: 9px !important;
  width: 100% !important; padding: 16px 20px !important;
  background: var(--co-primary) !important; color: var(--co-dark) !important;
  border: none !important; border-radius: 12px !important;
  font-size: 15px !important; font-weight: 800 !important;
  text-transform: none !important; letter-spacing: .01em !important;
  cursor: pointer !important;
  transition: background .3s, color .3s, box-shadow .3s !important;
  box-shadow: 0 4px 18px rgba(255,184,0,.38) !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}
.ama-co-po-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.ama-co-po-btn:hover, .ama-co-po-btn:focus {
  background: var(--co-dark) !important; color: #fff !important;
  box-shadow: 0 4px 18px rgba(17,24,39,.22) !important;
  outline: none !important;
}
.ama-co-po-btn:disabled, .ama-co-po-btn.loading {
  opacity: .72 !important; cursor: not-allowed !important;
}
.ama-co-spinner {
  display: none !important; width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.2); border-top-color: currentColor;
  border-radius: 50%;
  animation: ama-spin .7s linear infinite;
}
.ama-co-po-btn.loading .ama-co-spinner { display: block !important; }
.ama-co-po-btn.loading svg,
.ama-co-po-btn.loading #ama-po-text { display: none !important; }
@keyframes ama-spin { to { transform: rotate(360deg); } }

.ama-co-terms {
  text-align: center; font-size: 10px; color: var(--co-muted);
  line-height: 1.55; margin: 0;
}
.ama-co-terms a { color: var(--co-primary); font-weight: 700; text-decoration: none; }
.ama-co-terms a:hover { text-decoration: underline; }

/* ============================================================
   VALUE PROPS GRID
============================================================ */
.ama-co-val-props {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
}
.ama-co-vp {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px; background: var(--co-bg);
  border: 1px solid var(--co-border); border-radius: 10px;
  transition: border-color .2s;
}
.ama-co-vp:hover { border-color: var(--co-primary); }
.ama-co-vp-ico {
  width: 30px; height: 30px;
  background: var(--co-white); border: 1px solid var(--co-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ama-co-vp-ico svg { width: 13px; height: 13px; color: #374151; }
.ama-co-vp-t {
  font-size: 11px; font-weight: 700; text-transform: none;
  letter-spacing: 0; color: var(--co-dark); margin: 0 0 2px;
}
.ama-co-vp-s { font-size: 9.5px; color: var(--co-muted); margin: 0; }

/* ============================================================
   WC NOTICES
============================================================ */
.ama-co-form .woocommerce-NoticeGroup { margin-bottom: 1.2rem; }
.ama-co-form .woocommerce-error,
.ama-co-form .woocommerce-message,
.ama-co-form .woocommerce-info {
  background: #fff;
  border-left: 3px solid var(--co-primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  list-style: none; margin: 0 0 12px;
  float: none !important; width: auto !important; clear: both !important;
}
.ama-co-form .woocommerce-error { border-left-color: #EF4444; }

/* ============================================================
   MOBILE TWEAKS
============================================================ */
@media (max-width: 768px) {
  .ama-co-section { padding: 1.1rem; }
  .ama-co-grand-val { font-size: 1.2rem; }
  .ama-co-dtypes { gap: 6px !important; }
  .ama-co-dtype { padding: 8px 4px !important; }
  .ama-co-dtype-t { font-size: 9.5px !important; }
  .ama-co-dtype-s { font-size: 8.5px !important; }
}

/* ==============================================================
   FIX 1 — Hide WC default "Have a coupon? Click here" notice
   Custom coupon is in Order Summary sidebar instead
============================================================== */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-info.woocommerce-coupon-toggle,
.woocommerce-checkout .checkout_coupon,
.woocommerce-checkout .woocommerce-checkout-coupon,
.ama-co-wc-hidden .checkout_coupon,
.ama-co-wc-hidden .woocommerce-form-coupon-toggle {
  display: none !important;
  visibility: hidden !important;
}

/* ==============================================================
   FIX 2 — Last Name field: override WC form-row-first / form-row-last
   WooCommerce adds float:left/right + width:47% to these classes,
   which breaks our CSS Grid 2-column layout for the name row
============================================================== */
.ama-co-form .form-row-first,
.ama-co-form .form-row-last,
.ama-co-form .form-row-wide {
  float: none !important;
  width: 100% !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
/* Ensure our 2-col grid container is immune to WC floats */
.ama-co-row-2 .ama-co-field { width: 100% !important; float: none !important; }
.ama-co-row-2::after { display: none !important; content: none !important; }

/* Base field rule: every field (including the 3-column Country/District/City
   row) must be allowed to shrink below its content's natural width, or a
   wide child (e.g. a Select2 dropdown with a miscalculated inline width)
   can force the whole grid wider than the viewport. */
.ama-co-field {
  min-width: 0;
  box-sizing: border-box;
}

/* ==============================================================
   FIX 3 — District/State Select2 dropdown styling
   WooCommerce replaces <select> with Select2 custom widget;
   our standard select CSS won't apply to it directly
============================================================== */
.ama-co-form .select2-container {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}
.ama-co-form .select2-container .select2-selection--single {
  height: auto !important;
  min-height: 42px !important;
  border: 1.5px solid var(--co-border) !important;
  border-radius: 9px !important;
  background: var(--co-bg) !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  transition: border-color .2s, background .2s !important;
}
.ama-co-form .select2-container--open .select2-selection--single,
.ama-co-form .select2-container .select2-selection--single:focus {
  border-color: var(--co-primary) !important;
  background: var(--co-white) !important;
  outline: none !important;
}
.ama-co-form .select2-selection--single .select2-selection__rendered {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--co-dark) !important;
  line-height: 1.4 !important;
  padding: 9px 36px 9px 13px !important;
  width: 100% !important;
}
.ama-co-form .select2-selection--single .select2-selection__placeholder {
  color: #9CA3AF !important;
  font-size: 13.5px !important;
}
.ama-co-form .select2-selection--single .select2-selection__arrow {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  height: 100% !important;
  width: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ama-co-form .select2-selection--single .select2-selection__arrow b {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  border-color: #6B7280 transparent transparent transparent !important;
  border-style: solid !important;
  border-width: 5px 4px 0 4px !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
}
/* Select2 dropdown list */
.select2-dropdown {
  border: 1.5px solid var(--co-border) !important;
  border-radius: 9px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
  overflow: hidden;
}
.select2-results__option {
  font-size: 13px !important;
  color: var(--co-dark) !important;
  padding: 9px 13px !important;
  font-family: inherit !important;
}
.select2-results__option--highlighted {
  background: rgba(255,184,0,.12) !important;
  color: var(--co-dark) !important;
}
.select2-results__option[aria-selected="true"] {
  background: rgba(255,184,0,.18) !important;
  color: var(--co-dark) !important;
  font-weight: 700 !important;
}
.select2-search--dropdown .select2-search__field {
  border: 1.5px solid var(--co-border) !important;
  border-radius: 7px !important;
  padding: 7px 11px !important;
  font-size: 13px !important;
  outline: none !important;
}
.select2-search--dropdown .select2-search__field:focus {
  border-color: var(--co-primary) !important;
}

/* ==============================================================
   FIX 4 — Order Summary: Price × Qty format
   price on top, × qty below, both right-aligned
============================================================== */
.ama-co-item-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  min-width: 64px;
  text-align: right;
}
.ama-co-item-price-wrap .ama-co-item-price {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: var(--co-dark) !important;
  white-space: nowrap;
  display: block !important;
  line-height: 1.2;
}
.ama-co-item-qty-tag {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--co-muted) !important;
  white-space: nowrap;
  background: var(--co-bg);
  border: 1px solid var(--co-border);
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-block;
}

/* ==============================================================
   FIX 5 — Trust icon colors per type (amber delivery/COD, green return/original)
============================================================== */
/* Icon 1 (Delivery) & 4 (COD) — amber */
.ama-co-trust-item:nth-child(1) .ama-co-trust-icon,
.ama-co-trust-item:nth-child(4) .ama-co-trust-icon {
  background: rgba(255,184,0,.16) !important;
  color: #F59E0B !important;
}
/* Icon 2 (Return) & 3 (Original) — green */
.ama-co-trust-item:nth-child(2) .ama-co-trust-icon,
.ama-co-trust-item:nth-child(3) .ama-co-trust-icon {
  background: rgba(34,197,94,.12) !important;
  color: #22C55E !important;
}
@media (max-width: 600px) {
  .ama-co-trustbar .ama-co-trust-badges { gap: 8px 16px; }
  .ama-co-trust-item span:last-child { font-size: 11px; }
}
