@charset "utf-8";
/* Modern Register Modal (Pop-up สมัครสมาชิก LINE) */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.7); z-index: 999999; backdrop-filter: blur(4px); }
        .modal-card { width: 90%; max-width: 420px; margin: 10vh auto 0; background: #fff; padding: 28px 20px; border-radius: 24px; text-align: center; font-family: sans-serif; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
        .modal-label { text-align: left; font-size: 14px; font-weight: bold; color: #374151; margin: 8px 0 4px 4px; display: block; }
        .modal-input { width: 100%; padding: 12px; font-size: 16px; border: 2px solid #e5e7eb; border-radius: 12px; box-sizing: border-box; outline: none; background: #f9fafb; margin-bottom: 12px; }
        .modal-btn { width: 100%; padding: 14px 0; background: #d97706; color: #fff; border: none; border-radius: 12px; font-size: 18px; font-weight: bold; cursor: pointer; margin-top: 8px; }

        /* สไตล์ Modal สำหรับตะกร้าสินค้า (myModal) ที่มีอยู่เดิม */
        .modal { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
        .modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 12px; }
        .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
        .close:hover { color: #000; }
        
        .qty-wrapper input { width: 50px !important; display: inline-block !important; text-align: center; }
		
		
  
  /* ---------------- Order Modal Remove Column Divider Line ---------------- */
  #myModal.modal {
      display: none;
      position: fixed;
      z-index: 999999 !important;
      left: 0;
      top: 0;
      width: 100vw !important;
      height: 100vh !important;
      background-color: rgba(0, 0, 0, 0.6) !important;
      backdrop-filter: blur(4px);
      overflow: hidden !important;
  }
  
  #myModal .modal-content {
      background-color: #ffffff !important;
      margin: 10px auto !important;
      padding: 14px !important;
      border: 1px solid #fbcfe8 !important;
      width: 96% !important;
      max-width: 500px !important;
      height: calc(100vh - 20px) !important;
      border-radius: 16px !important;
      box-shadow: 0 10px 25px rgba(244, 114, 182, 0.25) !important;
      box-sizing: border-box !important;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
      display: flex !important;
      flex-direction: column !important;
  }

  /* Header */
  #myModal .modal-header {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      background-color: #fdf2f8 !important;
      padding: 10px 14px !important;
      border-radius: 10px !important;
      margin-bottom: 8px !important;
      flex-shrink: 0 !important;
  }

  #myModal .modal-header h2 {
      font-size: 16px !important;
      font-weight: 700 !important;
      color: #9d174d !important;
      margin: 0 !important;
  }

  #myModal .close {
      color: #9d174d !important;
      font-size: 24px !important;
      font-weight: bold !important;
      cursor: pointer;
      line-height: 1;
  }

  /* ส่วนเนื้อหาของ Modal */
  #modal_body {
      flex: 1 !important;
      max-height: none !important;
      overflow-y: auto !important;
      border: 1px solid #fbcfe8 !important;
      border-radius: 10px !important;
      margin-bottom: 8px !important;
      background-color: #ffffff !important;
      box-sizing: border-box !important;
      -webkit-overflow-scrolling: touch;
  }

  #modal_body table {
      width: 100% !important;
      border-collapse: collapse !important;
      table-layout: fixed !important;
      margin: 0 !important;
      border: none !important;
      outline: none !important;
  }


  #modal_body table *,
  #modal_body tr,
  #modal_body th,
  #modal_body td,
  #modal_body div,
  #modal_body p,
  #modal_body span {
      border: none !important;
      outline: none !important;
      box-shadow: none !important;
  }

  /* ส่วนหัวตาราง */
  #modal_body th {
      position: sticky !important;
      top: 0 !important;
      background-color: #fce7f3 !important;
      color: #831843 !important;
      padding: 6px 10px !important;
      font-size: 13.5px !important;
      font-weight: 700 !important;
      border-bottom: 1px solid #fbcfe8 !important;
      z-index: 2;
  }
  
  #modal_body th:first-child { 
      width: 75% !important;
      text-align: left !important; 
      padding-left: 12px !important;
      border-right: 1px solid #fbcfe8 !important;
  }
  #modal_body th:last-child { 
      width: 25% !important;
      text-align: center !important; 
  }

  /* แถวตาราง */
  #modal_body tr {
      border-bottom: 1px solid #fdf2f8 !important;
  }
  #modal_body tr:last-child { 
      border-bottom: none !important; 
  }

  /* ---------------- ข้อมูลภายในตาราง คอลัมน์แรก ---------------- */
  #modal_body td:first-child {
      padding: 6px 10px !important;
      font-size: 12.5px !important;
      color: #374151 !important;
      vertical-align: middle !important;
      text-align: left !important;
      border-right: none !important; /* ป้องกันเส้นขอบแสดงซ้ำซ้อน */
  }

  #modal_body td:first-child * {
      text-align: left !important;
      display: inline-block !important;
      float: none !important;
      clear: none !important;
      margin: 0 !important;
      padding: 0 !important;
  }

  /* คอลัมน์สุดท้าย */
  #modal_body td:last-child {
      padding: 6px 8px !important;
      font-size: 13.5px !important;
      font-weight: bold !important;
      color: #374151 !important;
      text-align: center !important;
      vertical-align: middle !important;
  }

  /* ฟอร์มตัวเลือกและช่องกรอกข้อมูล */
  #modal_body select, 
  #modal_body input[type="text"], 
  #modal_body input[type="number"] {
      display: inline-block !important;
      width: 110px !important;
      max-width: 110px !important;
      height: 26px !important;
      line-height: 24px !important;
      padding: 1px 6px !important;
      border: 1px solid #f472b6 !important;
      border-radius: 6px !important;
      background-color: #fff1f2 !important;
      font-size: 12px !important;
      color: #831843 !important;
      box-sizing: border-box !important;
      outline: none !important;
      margin-left: 6px !important;
      margin-right: 4px !important;
      vertical-align: middle !important;
      background-image: none !important;
  }

  #modal_body select {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24"><path fill="%3C9d174d" d="M7 10l5 5 5-5z"/></svg>') !important;
      background-repeat: no-repeat !important;
      background-position: right 6px center !important;
      padding-right: 20px !important;
      appearance: none !important;
      -webkit-appearance: none !important;
  }

  /* ---------------- ส่วนกรอกข้อมูลผู้ใช้งาน + ปุ่มยืนยัน ---------------- */
  .user-input-group {
      background: #fdf2f8 !important;
      padding: 8px 10px !important;
      border-radius: 10px !important;
      border: 1px solid #fbcfe8 !important;
      flex-shrink: 0 !important;
  }

  .user-input-row {
      margin-bottom: 4px !important;
      text-align: left !important;
  }
  .user-input-row:last-child { margin-bottom: 0 !important; }

  .user-input-row label {
      font-size: 11px !important;
      font-weight: 600 !important;
      color: #9d174d !important;
      margin-bottom: 2px !important;
      display: block !important;
  }

  .user-input-row input {
      width: 100% !important;
      height: 32px !important;
      padding: 4px 8px !important;
      border: 1px solid #fbcfe8 !important;
      border-radius: 6px !important;
      background-color: #ffffff !important;
      font-size: 13px !important;
      color: #111827 !important;
      box-sizing: border-box !important;
      outline: none !important;
  }

  .user-input-row input:focus {
      border-color: #ec4899 !important;
      box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2) !important;
  }

  .btn-submit-modern {
      width: 100% !important;
      height: 40px !important;
      background: #ec4899 !important;
      color: #ffffff !important;
      border: none !important;
      border-radius: 10px !important;
      font-size: 15px !important;
      font-weight: bold !important;
      cursor: pointer !important;
      box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35) !important;
      margin-top: 6px !important;
      text-shadow: none !important;
      display: block !important;
      flex-shrink: 0 !important;
  }
  .btn-submit-modern:active { background: #db2777 !important; }

  #myModal .ui-input-text,
  #myModal .ui-select,
  #myModal center { 
      border: none !important; 
      background: transparent !important; 
      box-shadow: none !important; 
      margin: 0 !important; 
  }

/* ปรับแต่งตารางสำหรับ jQuery Mobile */
.ui-body-a table {
    width: 100%;
}

/* จัดตำแหน่งคอลัมน์ราคา */
.ui-body-a td:nth-child(2) {
    text-align: right;
    white-space: nowrap;
    font-weight: bold;
    color: #b45309;
    padding-right: 8px;
    vertical-align: middle;
}

/* จัดตำแหน่งคอลัมน์จำนวนสินค้า */
.ui-body-a td:nth-child(3) {
    text-align: right;
    vertical-align: middle;
}

.ui-body-a td:nth-child(3) table {
    margin-left: auto;
    width: auto;
}

/* จัดระยะช่องกรอกจำนวนสินค้าในตารางย่อย */
.ui-body-a td:nth-child(3) td {
    padding: 0 2px;
    text-align: center;
}

/* ปรับแต่งช่องกรอกตัวเลข */
.ui-body-a input[type="number"] {
    width: 45px !important;
    height: 32px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}