/* CHECKOUT ---- MACHI - IMPROVED RESPONSIVE VERSION */

/* === Custom Checkout Fullscreen Cleanup === */
.custom-checkout-page #page,
.custom-checkout-page header,
.custom-checkout-page footer,
.custom-checkout-page .site-header,
.custom-checkout-page .site-footer,
.custom-checkout-page .widget-area,
.custom-checkout-page .sidebar {
  display: none !important;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#custom-checkout-wrapper-machi {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#custom-checkout-wrapper-machi * {
  font-family: "Inter", sans-serif !important;
}

/* === MAIN CONTAINER === */
.container-checkout {
  background-color: #f5f5f5 !important;
  color: #333 !important;
  line-height: 1.6 !important;
  max-width: 1366px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* === SECTIONS === */
.machi_left-section {
  padding: 40px;
  border-right: 1px solid #e5e5e5;
  background-color: #f5f5f5;
}

.machi_right-section {
  padding: 40px;
  background-color: #fafafa;
}

/* === NAVIGATION === */
.machi_back-link {
  display: flex;
  align-items: center;
  color: #666;
  text-decoration: none;
  margin-bottom: 40px;
  font-size: 14px;
  flex-wrap: wrap;
}

.machi_back-link:hover {
  color: #333;
}

.machi_back-arrow {
  margin-right: 8px;
  font-size: 16px;
}

/* === TYPOGRAPHY === */
.machi_section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px !important;
}

.title-crazy {
  color: #000000;
}

.machi_section-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 30px;
}

.subtitle-crazy {
  font-weight: 700;
}

.machi_section-required-fields {
  font-size: 12px;
  color: #666;
  margin-bottom: 20px;
}

/* === PRODUCT ITEMS === */
.machi_product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  background-color: #fff;
  border-radius: 15px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.machi_product-item:last-child {
  border-bottom: none;
}

.machi_product-image {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  flex-shrink: 0;
}

.machi_product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.machi_product-info {
  flex: 1;
  min-width: 0;
}

.machi_product-detail-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.machi_product-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.machi_product-info p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.machi_product-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.machi_product-pricing,
.machi_product-attributes {
  flex: 1;
}

.machi_product-color {
  font-size: 14px;
  color: #333;
}

.machi_usd-currency {
  color: rgb(26, 188, 156);
  font-weight: 600;
}

.machi_bs-currency {
  color: rgb(30, 111, 232);
}

.machi_usd-price,
.machi_bs-price {
  font-weight: 600;
}

/* === DELIVERY SECTION === */
.machi_delivery-section {
  margin-top: 40px;
}

.machi_form-toggle {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

.machi_form-toggle.visible {
  max-height: 800px;
  opacity: 1;
}

.machi_delivery-option {
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.machi_delivery-option.selected {
  border-color: #FF0000;
}

.machi_delivery-option:hover {
  border-color: #999;
}

.machi_delivery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.machi_delivery-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.machi_radio-button {
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.machi_delivery-option.selected .machi_radio-button {
  border-color: #FF0000;
}

.machi_delivery-option.selected .machi_radio-button::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #FF0000;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.machi_delivery-price {
  font-weight: 600;
}

.machi_recommend-badge {
  background: #f0f0f0;
  color: #444;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  margin-left: 8px;
  white-space: nowrap;
}

.machi_delivery-logo {
  min-width: 50px;
  height: 25px;
  background: #FF0000;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.machi_delivery-logo.dhl {
  background: #FF0000;
}

.machi_delivery-date {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* === FORMS === */
.machi_form-group {
  margin-bottom: 20px;
}

.machi_form-group-store {
  margin-bottom: 20px;
}

.machi_form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

.machi_form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.machi_form-input:focus {
  outline: none;
  border-color: #333;
}

.machi_form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.machi_radio-group {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.machi_radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.machi_radio-option input[type="radio"] {
  accent-color: #FF0000;
  width: 16px;
  height: 16px;
}

/* === STORE OPTIONS === */
.machi_radio-group-store {
  margin-top: 10px;
}

.machi_radio-group-store.vertical {
  display: flex;
  flex-direction: column;
}

.machi_store-list {
  margin-left: 0;
}

.machi_radio-option-store {
  background-color: #f9f9f9;
  padding: 16px;
  border-radius: 8px;
  border: 2px solid #ddd;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 10px 0;
  transition: all 0.3s ease;
}

.machi_radio-option-store.selected {
  border-color: #FF0000;
}

.machi_radio-option-store input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.machi_store-info-wrapper {
  flex: 1;
  min-width: 0;
}

.machi_store-name {
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

.machi_store-details {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.machi_store-schedule {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

/* === DELIVERY CONDITIONS === */
.machi_delivery-conditions {
  background-color: #f1f9f1;
  border: 1px solid #cde9cd;
  padding: 16px;
  margin: 16px 0;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
}

.machi_delivery-conditions ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.machi_delivery-conditions li {
  margin-bottom: 8px;
  line-height: 1.4;
}

/* === SELECT DROPDOWN === */
#departamento {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

#departamento:focus {
  outline: none;
  border-color: #333;
}

/* === PAYMENT METHODS === */
.machi_payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.machi_payment-method {
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.machi_payment-method.selected {
  border-color: #FF0000;
}

.machi_payment-method:hover {
  border-color: #FF0000;
}

.machi_payment-method.locked {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.machi_payment-method.confirmed {
  border: 2px solid #28a745;
  /* green border to confirm */
  background-color: #e6f9ea;
}

.machi_payment-icon {
  margin-bottom: 8px;
}

.machi_payment-icon img {
  height: 32px;
  width: auto;
}

.machi_payment-text {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* === SUMMARY SECTION === */
.machi_summary-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e5e5e5;
}

.machi_summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.machi_summary-row.total {
  /* Override default styles */
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin-bottom: 12px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  padding-top: 0;
  border-top: none;
}

/* ============================================================================
 * EMERALD BOX CONTAINER
 * ============================================================================
 * Wraps the payment information with gradient background
 */

.machi_summary-row.total {
  background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
  border: 2px solid #a7f3d0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
  transition: all 0.3s ease;
}

.machi_summary-row.total:hover {
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.15);
  transform: translateY(-1px);
}

/* ============================================================================
 * HEADER SECTION - "Pago en efectivo" LABEL
 * ============================================================================
 */

.machi_summary-row.total>span:first-child {
  /* "Total" label */
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #059669;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}


.machi_summary-row.total>span:first-child::after {
  content: ' -  El pago USD es en efectivo 💵';
}

/* ============================================================================
 * AMOUNT SECTION - CONTAINER FOR PRICES
 * ============================================================================
 */

.machi_summary-row.total>span:last-child {
  /* Price display section */
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ============================================================================
 * USD PRICE - LARGE AND BOLD
 * ============================================================================
 */

.machi_summary-row.total>span:last-child::before {
  content: attr(data-usd);
  font-size: 24px;
  font-weight: 700;
  color: #059669;
  line-height: 1.2;
  margin-bottom: 0;
}

/* ============================================================================
 * DIVIDER - DASHED LINE
 * ============================================================================
 */

.machi_summary-row.total::after {
  content: '';
  border-top: 1px dashed #a7f3d0;
  margin: 12px 0;
  display: block;
}

/* ============================================================================
 * BOLIVIANOS PRICE AND PAYMENT METHODS
 * ============================================================================
 */

.machi_summary-row.total>span:last-child {
  position: relative;
}

.machi_summary-row.total>span:last-child::after {
  content: 'Su equivalente en bolivianos, efectivo y pago qr.';
  font-size: 13px;
  font-weight: 400;
  color: #666666;
  display: block;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px dashed #a7f3d0;
  line-height: 1.4;
}

/* === BUTTONS === */
.machi_pay-button {
  width: 100%;
  background: #FF0000;
  color: white;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  transition: background-color 0.2s, box-shadow 0.2s;
  min-height: 50px;
}

.machi_pay-button:hover {
  background: #e60000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.machi_pay-button:disabled,
.machi_pay-button.disabled-button {
  background: #3b3b3b !important;
  cursor: not-allowed;
  opacity: 0.5;
}

.machi_pay-button .check-glyph {
  color: #fff;
  /* any color you want */
  font-weight: 700;
  /* make it thicker if needed */
  margin-left: .25rem;
}

/* === SECURITY NOTE === */
.machi_security-note {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 16px;
}

.machi_security-note-text {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: black;
}

/* === MODAL STYLES === */
.machi_modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.machi_modal.hidden {
  display: none;
}

.machi_modal.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.machi_modal.fade-out {
  animation: fadeOut 0.4s ease-out forwards;
}

.machi_modal_content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.7s ease-out;
}

.machi_modal_content::-webkit-scrollbar {
  width: 8px;
}

.machi_modal_content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.machi_modal_content::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.machi_modal_close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 24px;
}

#modalPaymentTitle {
  font-size: 25px;
  margin-bottom: 20px;
  color: #333 !important;
  font-weight: 600;
}

#modalTotalAmount {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

#modalPaymentImage {
  border: 1px solid #bbbbbb;
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

#machi-modal_payment-container {
  background-color: #333;
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
}

/* ===  CUSTOM INPUT FOR UPLOADING THE COMPROBANTE === */
.custom-file-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
  margin-top: 12px;
}

.upload-label {
  background-color: #007bff;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.upload-label:hover {
  background-color: #0056b3;
}

#file-name {
  color: #444;
  font-style: italic;
}


/* === MODAL COMPONENTS === */
.instructions {
  background: #f8f9ff;
  border: 1px solid #e3e8ff;
  border-radius: 12px;
  padding: 16px;
  margin: 24px 0;
  text-align: left;
}

.instructions-title {
  text-align: center;
  margin-bottom: 12px;
  font-weight: 700;
}

.instructions-list {
  margin: 0;
  padding-left: 20px;
}

.instructions-list li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.timer-section {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.timer-text {
  font-size: 14px;
  color: #856404;
  margin-bottom: 4px;
}

.timer-value {
  font-size: 18px;
  font-weight: 700;
  color: #856404;
  font-family: "Courier New", monospace;
}

.owner_payment-method {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0;
}

.security-section {
  background: #f8f9ff;
  border: 1px solid #e3e8ff;
  border-radius: 12px;
  padding: 12px;
  margin: 15px 0 24px;
  font-size: 14px;
}

.modal-footer {
  padding: 0;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-bottom: 15px;
}

.cancel-button {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e9ecef;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-button:hover {
  background: #e9ecef;
  color: #333;
}

.confirm-button {
  background: #ff0000;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.confirm-button:hover {
  background: #e60000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.confirm-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.support-section {
  text-align: center;
}

.support-text {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.support-link {
  color: #ff0000;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}

.support-link:hover {
  text-decoration: underline;
}

/* === CURRENCY STYLES === */
.modal-usdt-amount {
  color: rgb(255, 255, 255);
  font-weight: 700;
  font-size: 30px;
}

.modal-usdt-currency {
  color: rgb(255, 255, 255);
  font-weight: 600;
  font-size: 22px;
}

.modal-bs-amount {
  color: rgb(255, 255, 255);
  font-weight: 700;
  font-size: 25px;
}

.modal-bs-currency {
  color: rgb(255, 255, 255);
  font-weight: 600;
  font-size: 20px;
}

/* === LOGO AND PROGRESS === */
.machi_checkout-logo {
  text-align: center;
  padding: 20px 0;
}

.machi_checkout-logo img {
  height: 60px;
  max-width: 180px;
  width: auto;
}

.machi_progress-bar {
  text-align: center;
  font-size: 24px;
  color: #ff0d0c;
  margin-bottom: 20px;
  font-weight: bold;
}

.machi_progress-bar .progress-step {
  margin: 0;
}

.machi_progress-bar .progress-step.completed {
  color: #ff0d0c;
}

.machi_progress-bar .progress-label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-top: 8px;
  font-weight: 500;
}

.invalid-input {
  border: 1px solid rgb(253, 74, 74) !important;
}

.machi_error {
  color: red;
  font-size: 0.85em;
  margin-top: 4px;
  display: none;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================== */
/* === RESPONSIVE DESIGN BREAKPOINTS === */
/* ===================================== */

/* === TABLET LANDSCAPE (1024px and below) === */
@media (max-width: 1024px) {
  .container-checkout {
    max-width: 95%;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .machi_left-section,
  .machi_right-section {
    padding: 30px;
  }

  .machi_payment-methods {
    grid-template-columns: repeat(3, 1fr);
  }

  .machi_product-details-row {
    display: block;
  }
}

/* === PORTRAIT BETWEEN (905 and 768) === */
@media screen and (max-width: 905px) and (min-width: 768px) {
  .machi_product-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
  }

  .machi_product-image {
    align-self: center;
  }
}


/* === TABLET PORTRAIT (768px and below) === */
@media (max-width: 768px) {
  .container-checkout {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .machi_left-section {
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding: 24px 20px;
  }

  .machi_right-section {
    background: white;
    padding: 24px 20px;
  }

  .machi_checkout-logo {
    padding: 16px 0;
  }

  .machi_checkout-logo img {
    height: 50px;
    max-width: 150px;
  }

  .machi_progress-bar {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .machi_back-link {
    margin-bottom: 24px;
    font-size: 13px;
  }

  .machi_section-title {
    font-size: 16px;
  }

  .machi_section-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }

  /* Product Items - Left aligned on mobile with side-by-side details */
  .machi_product-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
  }

  .machi_product-image {
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
    align-self: center;
    /* Keep image centered */
  }

  .machi_product-info {
    width: 100%;
  }

  .machi_product-details-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    justify-content: space-between;
  }

  .machi_product-attributes,
  .machi_product-pricing {
    flex: 1;
    min-width: 0;
    /* Prevent overflow */
  }

  /* Delivery Options */
  .machi_delivery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .machi_delivery-info {
    width: 100%;
    justify-content: flex-start;
  }

  .machi_recommend-badge {
    margin-left: 0;
    margin-top: 4px;
  }

  /* Store Options - Better spacing */
  .machi_radio-option-store {
    padding: 12px;
  }

  .machi_store-info-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .machi_store-name {
    min-width: auto;
  }

  /* Payment Methods - Single column */
  .machi_payment-methods {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .machi_payment-method {
    padding: 12px;
    min-height: 60px;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .machi_payment-icon {
    margin-bottom: 0;
    margin-right: 12px;
  }

  .machi_payment-icon img {
    height: 28px;
  }

  .machi_payment-text {
    font-size: 14px;
  }

  /* Modal adjustments */
  .machi_modal {
    padding: 16px;
  }

  .machi_modal_content {
    padding: 24px;
    max-width: 100%;
  }

  #modalPaymentTitle {
    font-size: 20px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cancel-button,
  .confirm-button {
    padding: 14px 16px;
  }

  .machi_summary-row.total {
    /* Keep emerald styling on mobile */
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%) !important;
    border: 2px solid #a7f3d0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1) !important;

    /* Mobile adjustments */
    font-size: 15px;
    margin-bottom: 12px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .machi_summary-row.total>span:first-child {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #059669;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .machi_summary-row.total>span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  .machi_summary-row.total>span:last-child::before {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
    margin-bottom: 0;
  }

  .machi_summary-row.total>span:last-child::after {
    content: 'Su equivalente en bolivianos, efectivo y pago qr.';
    font-size: 12px;
    font-weight: 400;
    color: #666666;
    display: block;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px dashed #a7f3d0;
    line-height: 1.4;
  }

  .machi_summary-row.total::after {
    content: '';
    border-top: 1px dashed #a7f3d0;
    margin: 10px 0;
    display: block;
  }
}

/* === MOBILE LANDSCAPE (640px and below) === */
@media (max-width: 640px) {

  .machi_left-section,
  .machi_right-section {
    padding: 20px 16px;
  }

  .machi_delivery-section {
    margin-top: 30px;
  }

  .machi_delivery-option {
    padding: 12px;
  }

  .machi_delivery-conditions {
    padding: 12px;
    font-size: 13px;
  }

  .machi_delivery-conditions ul {
    padding-left: 16px;
  }

  .machi_form-toggle.visible {
    max-height: 600px;
  }

  .machi_radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .machi_radio-option-store {
    padding: 16px 12px;
  }

  .machi_store-details {
    font-size: 12px;
  }

  .machi_store-schedule {
    font-size: 11px;
  }

  .machi_summary-row.total {
    /* Keep emerald styling on mobile */
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%) !important;
    border: 2px solid #a7f3d0 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1) !important;

    /* Mobile adjustments */
    font-size: 14px;
    margin-bottom: 12px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .machi_summary-row.total>span:first-child {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #059669;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .machi_summary-row.total>span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  .machi_summary-row.total>span:last-child::before {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
    margin-bottom: 0;
  }

  .machi_summary-row.total>span:last-child::after {
    content: 'Su equivalente en bolivianos, efectivo y pago qr.';
    font-size: 11px;
    font-weight: 400;
    color: #666666;
    display: block;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px dashed #a7f3d0;
    line-height: 1.4;
  }

  .machi_summary-row.total::after {
    content: '';
    border-top: 1px dashed #a7f3d0;
    margin: 10px 0;
    display: block;
  }
}

/* === MOBILE PORTRAIT (480px and below) === */
@media (max-width: 480px) {

  .machi_left-section,
  .machi_right-section {
    padding: 16px 12px;
  }

  .machi_checkout-logo {
    padding: 12px 0;
  }

  .machi_checkout-logo img {
    height: 40px;
    max-width: 120px;
  }

  .machi_progress-bar {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .machi_progress-bar .progress-label {
    font-size: 12px;
  }

  .machi_back-link {
    margin-bottom: 20px;
    font-size: 12px;
  }

  .machi_back-link img {
    width: 24px !important;
    margin-right: 6px !important;
  }

  .machi_section-title {
    font-size: 15px;
  }

  .machi_section-subtitle {
    font-size: 12px;
    margin-bottom: 16px;
  }

  /* Product Items - Maintain left alignment on small mobile */
  .machi_product-item {
    padding: 16px 12px;
    text-align: left;
    align-items: flex-start;
  }

  .machi_product-image {
    width: 80px;
    height: 80px;
    align-self: center;
    /* Keep image centered */
  }

  .machi_product-details-row {
    flex-direction: column;
    gap: 12px;
  }

  .machi_product-attributes,
  .machi_product-pricing {
    flex: none;
  }

  /* Delivery Options */
  .machi_delivery-option {
    padding: 12px 10px;
  }

  .machi_delivery-price {
    font-size: 13px;
  }

  .machi_recommend-badge {
    font-size: 10px;
    padding: 1px 6px;
  }

  .machi_delivery-date {
    font-size: 11px;
  }

  .machi_delivery-conditions {
    padding: 10px;
    font-size: 12px;
  }

  .machi_delivery-conditions li {
    margin-bottom: 6px;
  }

  /* Forms */
  .machi_form-input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .machi_form-label {
    font-size: 13px;
  }

  #departamento {
    padding: 10px 12px;
    font-size: 13px;
    padding-right: 36px;
  }

  /* Store Options */
  .machi_radio-option-store {
    padding: 12px 10px;
    gap: 10px;
  }

  .machi_store-name {
    font-size: 13px;
  }

  .machi_store-details {
    font-size: 11px;
  }

  .machi_store-schedule {
    font-size: 10px;
  }

  /* Payment Methods */
  .machi_payment-method {
    padding: 10px;
    min-height: 50px;
  }

  .machi_payment-icon img {
    height: 24px;
  }

  .machi_payment-text {
    font-size: 12px;
  }

  /* Summary and Button */
  .machi_summary-section {
    margin-top: 20px;
    padding-top: 20px;
  }

  .machi_summary-row {
    font-size: 13px;
  }

  .machi_summary-row.total {
    /* Keep emerald styling on mobile */
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%) !important;
    border: 2px solid #a7f3d0 !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1) !important;

    /* Mobile adjustments */
    font-size: 13px;
    margin-bottom: 12px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .machi_summary-row.total>span:first-child {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #059669;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .machi_summary-row.total>span:first-child::after {
    content: ' - Pago USD en efectivo 💵';
    font-size: 10px;
  }

  .machi_summary-row.total>span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  .machi_summary-row.total>span:last-child::before {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
    margin-bottom: 0;
  }

  .machi_summary-row.total>span:last-child::after {
    content: 'Equivalente Bs. • Efectivo y QR';
    font-size: 11px;
    font-weight: 400;
    color: #666666;
    display: block;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px dashed #a7f3d0;
    line-height: 1.4;
  }

  .machi_summary-row.total::after {
    content: '';
    border-top: 1px dashed #a7f3d0;
    margin: 8px 0;
    display: block;
  }

  .machi_pay-button {
    padding: 14px;
    font-size: 15px;
    margin-top: 20px;
  }

  .machi_security-note {
    margin-top: 12px;
  }

  .machi_security-note-text {
    font-size: 13px !important;
  }

  /* Modal Mobile */
  .machi_modal {
    padding: 12px;
  }

  .machi_modal_content {
    padding: 20px 16px;
  }

  #modalPaymentTitle {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .instructions {
    padding: 12px;
    margin: 16px 0;
  }

  .instructions-list {
    padding-left: 16px;
  }

  .instructions-list li {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .timer-section {
    padding: 10px;
    margin-bottom: 16px;
  }

  .timer-text {
    font-size: 12px;
  }

  .timer-value {
    font-size: 16px;
  }

  .owner_payment-method {
    font-size: 14px;
    margin: 12px 0;
  }

  .security-section {
    padding: 10px;
    font-size: 12px;
  }

  .cancel-button,
  .confirm-button {
    padding: 12px 14px;
    font-size: 13px;
  }

  .support-text {
    font-size: 11px;
  }

  .support-link {
    font-size: 11px;
  }

  /* Currency amounts in modal */
  .modal-usdt-amount {
    font-size: 24px;
  }

  .modal-usdt-currency {
    font-size: 18px;
  }

  .modal-bs-amount {
    font-size: 20px;
  }

  .modal-bs-currency {
    font-size: 16px;
  }
}

.cs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #666;
  min-height: 80px;
}

.cs-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #333;
  border-radius: 50%;
  animation: cs-spin 1s linear infinite;
}

@keyframes cs-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


/* === LANDSCAPE ORIENTATION FIXES === */
@media (max-height: 500px) and (orientation: landscape) {
  .machi_modal_content {
    max-height: 85vh;
    padding: 16px;
  }

  #modalPaymentTitle {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .instructions {
    padding: 8px;
    margin: 12px 0;
  }

  .timer-section {
    padding: 8px;
    margin-bottom: 12px;
  }

  .action-buttons {
    margin-bottom: 8px;
  }
}

/* === HIGH DPI DISPLAYS === */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .machi_payment-icon img,
  .machi_checkout-logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* === PRINT STYLES === */
@media print {

  .machi_modal,
  .machi_pay-button,
  .machi_back-link {
    display: none !important;
  }

  .container-checkout {
    grid-template-columns: 1fr;
    background: white !important;
  }

  .machi_left-section,
  .machi_right-section {
    background: white !important;
    border: none !important;
    padding: 20px !important;
  }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
@media (prefers-reduced-motion: reduce) {

  .machi_form-toggle,
  .machi_delivery-option,
  .machi_payment-method,
  .machi_pay-button,
  .confirm-button,
  .cancel-button {
    transition: none;
  }

  .machi_modal.fade-in,
  .machi_modal.fade-out,
  .machi_modal_content {
    animation: none;
  }
}

@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode support if needed */
}

/* === FOCUS STYLES FOR ACCESSIBILITY === */
.machi_form-input:focus,
.machi_delivery-option:focus,
.machi_payment-method:focus,
.machi_radio-option-store:focus,
#departamento:focus {
  /* outline: 2px solid #ff0d0c; */
  outline-offset: 2px;
}

.machi_pay-button:focus,
.confirm-button:focus,
.cancel-button:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* === TOUCH TARGET IMPROVEMENTS === */
@media (pointer: coarse) {

  .machi_delivery-option,
  .machi_payment-method,
  .machi_radio-option-store,
  .machi_radio-option {
    min-height: 44px;
  }

  .machi_form-input,
  #departamento {
    min-height: 44px;
  }

  .machi_pay-button,
  .confirm-button,
  .cancel-button {
    min-height: 48px;
  }
}

/* ============================================================================
 * PAYMENT CARDS
 * ============================================================================
 */

.machi_payment-cards-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.machi_payment-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a0a0a 100%);
    color: white;
    border-radius: 14px;
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 140px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.machi_payment-card.selected {
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3),
                0 4px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.machi_payment-card.unselected {
    opacity: 0.38;
    filter: grayscale(40%) brightness(0.7);
    transform: scale(0.97);
    transition: all 0.3s ease;
}

.machi_payment-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(100%);
}

.machi_payment-card.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.machi_payment-card.disabled::after {
    content: 'No disponible';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
}

.machi_payment-card:hover:not(.selected):not(.disabled) {
    opacity: 0.9;
}

.machi_payment-card:active:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.machi_payment-card:hover:not(.disabled) {
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ── USD card: green = dollars ── */
.machi_payment-card-usd {
    background: linear-gradient(135deg, #1a1a1a 0%, #14532d 100%);
    border: 2px solid rgba(34, 197, 94, 0.35);
}

.machi_payment-card-usd:hover:not(.disabled):not(.selected) {
    background: linear-gradient(135deg, #1a1a1a 0%, #15803d 100%);
    border: 2px solid rgba(34, 197, 94, 0.65);
}

.machi_payment-card-usd.selected {
    background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3),
                0 4px 20px rgba(34, 197, 94, 0.2);
    transform: translateY(-3px);
}

/* ── USDT card: blue = crypto/digital ── */
.machi_payment-card-usdt {
    background: linear-gradient(135deg, #1a1a1a 0%, #1e3a5f 100%);
    border: 2px solid rgba(59, 130, 246, 0.35);
}

.machi_payment-card-usdt:hover:not(.disabled):not(.selected) {
    background: linear-gradient(135deg, #1a1a1a 0%, #1d4ed8 100%);
    border: 2px solid rgba(59, 130, 246, 0.65);
}

.machi_payment-card-usdt.selected {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    border: 2px solid #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3),
                0 4px 20px rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
}

.machi_payment-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.machi_payment-card-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.machi_payment-card-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.machi_payment-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.machi_payment-card-subtitle {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
    margin: 0;
}

.machi_payment-card-amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.machi_payment-amount-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.5px;
}

.machi_payment-amount-currency {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.95;
}

.machi_payment-card-equivalent {
    font-size: 16px;
    opacity: 0.85;
    line-height: 1.3;
}

.machi_payment-card-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.machi_currency-selector-section {
    padding: 10px;
    border-radius: 8px;
    background: #fff8d4;
    border: 1px solid #bdbd77;
}

.machi_currency-subtitle {
    font-size: 14px;
    font-weight: 600 !important;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 768px) {
    .machi_payment-cards-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 16px 0;
    }
    .machi_payment-card {
        padding: 12px 14px;
        min-height: 130px;
        border-radius: 12px;
    }
    .machi_payment-card-header {
        gap: 8px;
        margin-bottom: 8px;
    }
    .machi_payment-card-icon {
        font-size: 20px;
    }
    .machi_payment-card-title {
        font-size: 14px;
    }
    .machi_payment-card-subtitle {
        font-size: 11px;
    }
    .machi_payment-card-amount {
        margin-bottom: 6px;
        gap: 4px;
    }
    .machi_payment-amount-value {
        font-size: 32px;
    }
    .machi_payment-amount-currency {
        font-size: 13px;
    }
    .machi_payment-card-equivalent {
        font-size: 15px;
    }
    .machi_payment-card-badge {
        font-size: 9px;
        padding: 2px 6px;
        top: 6px;
        right: 8px;
    }
    .machi_currency-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .machi_payment-cards-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 14px 0;
    }
    .machi_payment-card {
        padding: 10px 11px;
        min-height: 115px;
        border-radius: 11px;
    }
    .machi_payment-card.selected {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2),
                    0 2px 12px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }
    .machi_payment-card:hover:not(.disabled) {
        transform: translateY(-2px);
    }
    .machi_payment-card-header {
        gap: 7px;
        margin-bottom: 6px;
    }
    .machi_payment-card-icon {
        font-size: 18px;
    }
    .machi_payment-card-titles {
        gap: 1px;
    }
    .machi_payment-card-title {
        font-size: 12px;
    }
    .machi_payment-card-subtitle {
        font-size: 9px;
    }
    .machi_payment-card-amount {
        margin-bottom: 4px;
        gap: 3px;
    }
    .machi_payment-amount-value {
        font-size: 28px;
        letter-spacing: -1px;
    }
    .machi_payment-amount-currency {
        font-size: 11px;
    }
    .machi_payment-card-equivalent {
        font-size: 14px;
        line-height: 1.2;
    }
    .machi_payment-card-badge {
        font-size: 8px;
        padding: 2px 5px;
        top: 5px;
        right: 6px;
    }
    .machi_currency-subtitle {
        font-size: 12px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .machi_payment-cards-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
        margin: 12px 0;
    }
    .machi_payment-card {
        padding: 9px 10px;
        min-height: 105px;
        border-radius: 10px;
    }
    .machi_payment-card-header {
        gap: 6px;
        margin-bottom: 5px;
    }
    .machi_payment-card-icon {
        font-size: 16px;
    }
    .machi_payment-card-title {
        font-size: 11px;
        font-weight: 600;
    }
    .machi_payment-card-subtitle {
        font-size: 8px;
    }
    .machi_payment-card-amount {
        margin-bottom: 3px;
        gap: 2px;
    }
    .machi_payment-amount-value {
        font-size: 24px;
        letter-spacing: -1px;
    }
    .machi_payment-amount-currency {
        font-size: 10px;
    }
    .machi_payment-card-equivalent {
        font-size: 13px;
        line-height: 1.1;
    }
    .machi_payment-card-badge {
        font-size: 7px;
        padding: 1px 4px;
        top: 4px;
        right: 5px;
    }
}

@media (max-width: 380px) {
    .machi_payment-cards-wrapper {
        gap: 6px;
        margin: 10px 0;
    }
    .machi_payment-card {
        padding: 8px 9px;
        min-height: 100px;
        border-radius: 9px;
    }
    .machi_payment-card-header {
        gap: 5px;
        margin-bottom: 4px;
    }
    .machi_payment-card-icon {
        font-size: 15px;
    }
    .machi_payment-card-title {
        font-size: 10px;
    }
    .machi_payment-card-subtitle {
        font-size: 7px;
    }
    .machi_payment-amount-value {
        font-size: 20px;
    }
    .machi_payment-amount-currency {
        font-size: 9px;
    }
    .machi_payment-card-equivalent {
        font-size: 12px;
    }
}

@keyframes fadeInCard {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}

.machi_payment-card:not(.disabled) {
    animation: fadeInCard 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .machi_payment-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    .machi_payment-card:hover:not(.disabled) {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .machi_payment-card {
        transition: none;
        animation: none;
    }
    .machi_payment-card:hover {
        transform: none;
    }
}

@media (prefers-contrast: more) {
    .machi_payment-card {
        border: 2px solid currentColor;
    }
}

