  .pattani-btn {
    position: fixed;
    bottom: 86px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.45);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-weight: 700;
  }
  .pattani-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.55);
  }
  .pattani-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55); z-index: 100001; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); padding: 20px;
  }
  .pattani-modal.active { display: flex; }
  .pattani-container {
    background: var(--panel-bg); border: 1px solid var(--border); border-radius: 16px;
    max-width: 480px; width: 100%; max-height: 85vh; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); position: relative;
    display: flex; flex-direction: column;
  }
  .pattani-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(99,102,241,0.08) 100%);
  }
  .pattani-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; font-weight: 800;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
  }
  .pattani-title { font-size: 15px; font-weight: 700; color: var(--text); }
  .pattani-subtitle { font-size: 11px; color: var(--text-muted); }
  .pattani-close {
    margin-left: auto; background: none; border: none; color: var(--text-muted);
    font-size: 20px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
  }
  .pattani-close:hover { background: rgba(0,0,0,0.08); color: var(--text); }
  .pattani-body {
    flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
    min-height: 260px; max-height: 55vh;
  }
  .pattani-msg {
    padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5;
    max-width: 88%; word-break: break-word;
  }
  .pattani-msg.user {
    align-self: flex-end; background: var(--primary); color: #070a13; font-weight: 600;
    border-bottom-right-radius: 4px;
  }
  .pattani-msg.ai {
    align-self: flex-start; background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    color: var(--text); border-bottom-left-radius: 4px;
  }
  .pattani-suggestions {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
  }
  .pattani-suggestion-chip {
    padding: 5px 10px; border-radius: 14px; font-size: 11px; font-weight: 600;
    border: 1px solid var(--border); background: var(--card-bg); color: var(--text-muted);
    cursor: pointer; transition: all 0.2s;
  }
  .pattani-suggestion-chip:hover { border-color: var(--primary); color: var(--primary); }
  .pattani-footer {
    padding: 12px 16px; border-top: 1px solid var(--border);
    display: flex; gap: 8px; align-items: center;
  }
  .pattani-input {
    flex: 1; padding: 10px 14px; border-radius: 20px; border: 1.5px solid var(--border);
    background: var(--bg); color: var(--text); font-size: 13.5px; font-family: inherit;
    outline: none; transition: all 0.2s;
  }
  .pattani-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }
  .pattani-send {
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .pattani-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(139,92,246,0.4); }
  @media (max-width: 768px) {
    .wa-float-btn {
      bottom: 20px !important;
      right: 16px !important;
      width: 46px !important;
      height: 46px !important;
    }
    .pattani-btn {
      bottom: 76px !important;
      right: 16px !important;
      width: 44px !important;
      height: 44px !important;
      font-size: 18px !important;
    }
  }

/* Phase 5M: Extracted Pattani AI Dynamic Styles */

        /* ── PATTANI AI FLOATING TRIGGER ── */
        .pattani-btn-wrap {
          position: fixed;
          bottom: 84px;
          right: 20px;
          z-index: 99999;
          display: flex;
          align-items: center;
          gap: 8px;
        }
        .pattani-btn {
          width: 52px;
          height: 52px;
          border-radius: 50%;
          background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
          color: #ffffff;
          border: 2px solid rgba(255, 255, 255, 0.25);
          font-size: 22px;
          cursor: pointer;
          box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
          position: relative;
        }
        .pattani-btn:hover {
          transform: scale(1.08) translateY(-2px);
          box-shadow: 0 10px 28px rgba(139, 92, 246, 0.6);
        }
        .pattani-pulse-dot {
          position: absolute;
          top: 2px;
          right: 2px;
          width: 12px;
          height: 12px;
          border-radius: 50%;
          background: #22c55e;
          border: 2px solid #ffffff;
          animation: pattaniPulse 2s infinite;
        }
        @keyframes pattaniPulse {
          0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
          70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
          100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
        }
        .pattani-teaser {
          background: #1e293b;
          color: #f8fafc;
          padding: 8px 14px;
          border-radius: 20px;
          font-size: 12px;
          font-weight: 600;
          box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
          border: 1px solid rgba(255, 255, 255, 0.12);
          display: flex;
          align-items: center;
          gap: 6px;
          animation: pattaniFadeIn 0.4s ease-out;
          cursor: pointer;
          white-space: nowrap;
        }
        @keyframes pattaniFadeIn {
          from { opacity: 0; transform: translateX(10px); }
          to { opacity: 1; transform: translateX(0); }
        }

        /* ── PATTANI MODAL / DRAWER ── */
        .pattani-modal {
          display: none;
          position: fixed;
          top: 0;
          left: 0;
          width: 100vw;
          height: 100vh;
          background: rgba(15, 23, 42, 0.65);
          backdrop-filter: blur(8px);
          -webkit-backdrop-filter: blur(8px);
          z-index: 1000000;
          align-items: center;
          justify-content: center;
          padding: 16px;
          opacity: 0;
          transition: opacity 0.25s ease;
        }
        .pattani-modal.active {
          display: flex;
          opacity: 1;
        }
        .pattani-container {
          background: #0f172a;
          color: #f8fafc;
          border: 1px solid rgba(255, 255, 255, 0.14);
          border-radius: 20px;
          max-width: 460px;
          width: 100%;
          height: 82vh;
          max-height: 700px;
          box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
          display: flex;
          flex-direction: column;
          overflow: hidden;
          animation: pattaniPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes pattaniPopIn {
          from { transform: scale(0.95) translateY(12px); opacity: 0; }
          to { transform: scale(1) translateY(0); opacity: 1; }
        }

        /* Header */
        .pattani-header {
          padding: 14px 18px;
          background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.15) 100%);
          border-bottom: 1px solid rgba(255, 255, 255, 0.08);
          display: flex;
          align-items: center;
          justify-content: space-between;
        }
        .pattani-header-left {
          display: flex;
          align-items: center;
          gap: 10px;
        }
        .pattani-avatar {
          width: 40px;
          height: 40px;
          border-radius: 50%;
          background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 18px;
          font-weight: 800;
          color: #fff;
          box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
          position: relative;
        }
        .pattani-avatar::after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 10px;
          height: 10px;
          background: #22c55e;
          border: 2px solid #0f172a;
          border-radius: 50%;
        }
        .pattani-title-box h3 {
          font-size: 15px;
          font-weight: 800;
          margin: 0;
          color: #ffffff;
          display: flex;
          align-items: center;
          gap: 6px;
        }
        .pattani-title-box p {
          font-size: 11px;
          color: #94a3b8;
          margin: 2px 0 0 0;
        }
        .pattani-header-actions {
          display: flex;
          align-items: center;
          gap: 6px;
        }
        .pattani-action-icon {
          width: 32px;
          height: 32px;
          border-radius: 8px;
          background: rgba(255, 255, 255, 0.06);
          border: 1px solid rgba(255, 255, 255, 0.08);
          color: #cbd5e1;
          font-size: 14px;
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          transition: all 0.2s;
        }
        .pattani-action-icon:hover {
          background: rgba(255, 255, 255, 0.12);
          color: #ffffff;
        }

        /* Body & Messages */
        .pattani-body {
          flex: 1;
          overflow-y: auto;
          padding: 16px;
          display: flex;
          flex-direction: column;
          gap: 14px;
          background: #090e1a;
          scrollbar-width: thin;
          scrollbar-color: rgba(255,255,255,0.15) transparent;
        }
        .pattani-msg {
          max-width: 90%;
          padding: 12px 15px;
          border-radius: 14px;
          font-size: 13px;
          line-height: 1.55;
          word-break: break-word;
          animation: pattaniMsgIn 0.2s ease-out;
        }
        @keyframes pattaniMsgIn {
          from { opacity: 0; transform: translateY(6px); }
          to { opacity: 1; transform: translateY(0); }
        }
        .pattani-msg.user {
          align-self: flex-end;
          background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
          color: #ffffff;
          font-weight: 600;
          border-bottom-right-radius: 4px;
          box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
        }
        .pattani-msg.ai {
          align-self: flex-start;
          background: #1e293b;
          color: #f1f5f9;
          border: 1px solid rgba(255, 255, 255, 0.08);
          border-bottom-left-radius: 4px;
        }
        .pattani-time {
          font-size: 10px;
          color: #64748b;
          margin-top: 4px;
          display: block;
          text-align: right;
        }

        /* Rich Product Card Grid */
        .pattani-card-grid {
          display: grid;
          gap: 10px;
          margin-top: 10px;
        }
        .pattani-prod-card {
          background: #0f172a;
          border: 1px solid rgba(255, 255, 255, 0.1);
          border-radius: 10px;
          padding: 10px;
          display: flex;
          gap: 10px;
          align-items: center;
          transition: border-color 0.2s;
        }
        .pattani-prod-card:hover {
          border-color: #8b5cf6;
        }
        .pattani-card-thumb {
          width: 54px;
          height: 54px;
          border-radius: 8px;
          background: #1e293b;
          object-fit: cover;
          flex-shrink: 0;
        }
        .pattani-card-info {
          flex: 1;
          min-width: 0;
        }
        .pattani-card-title {
          font-size: 12.5px;
          font-weight: 700;
          color: #f8fafc;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .pattani-card-price {
          font-size: 13px;
          font-weight: 800;
          color: #f59e0b;
          margin: 2px 0 6px 0;
        }
        .pattani-card-btns {
          display: flex;
          gap: 6px;
        }
        .pattani-btn-view {
          padding: 4px 8px;
          border-radius: 6px;
          background: rgba(255, 255, 255, 0.08);
          color: #cbd5e1;
          font-size: 11px;
          font-weight: 600;
          text-decoration: none;
          display: inline-flex;
          align-items: center;
          gap: 4px;
        }
        .pattani-btn-view:hover {
          background: rgba(255, 255, 255, 0.15);
          color: #fff;
        }
        .pattani-btn-cart {
          padding: 4px 10px;
          border-radius: 6px;
          background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
          color: #070a13;
          font-size: 11px;
          font-weight: 700;
          border: none;
          cursor: pointer;
          display: inline-flex;
          align-items: center;
          gap: 4px;
          transition: transform 0.15s;
        }
        .pattani-btn-cart:hover {
          transform: scale(1.04);
        }

        /* Typing indicator */
        .pattani-typing {
          display: none;
          align-self: flex-start;
          background: #1e293b;
          border: 1px solid rgba(255, 255, 255, 0.08);
          border-radius: 14px;
          padding: 10px 14px;
          gap: 5px;
          align-items: center;
        }
        .pattani-typing.active {
          display: flex;
        }
        .pattani-dot {
          width: 6px;
          height: 6px;
          border-radius: 50%;
          background: #94a3b8;
          animation: pattaniDotBounce 1.4s infinite ease-in-out;
        }
        .pattani-dot:nth-child(1) { animation-delay: -0.32s; }
        .pattani-dot:nth-child(2) { animation-delay: -0.16s; }
        @keyframes pattaniDotBounce {
          0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
          40% { transform: scale(1); opacity: 1; }
        }

        /* Suggestions Chips */
        .pattani-suggestions {
          display: flex;
          flex-wrap: wrap;
          gap: 6px;
          margin-top: 10px;
        }
        .pattani-chip {
          padding: 5px 11px;
          border-radius: 14px;
          font-size: 11.5px;
          font-weight: 600;
          border: 1px solid rgba(255, 255, 255, 0.12);
          background: #1e293b;
          color: #cbd5e1;
          cursor: pointer;
          transition: all 0.2s;
        }
        .pattani-chip:hover {
          border-color: #8b5cf6;
          color: #a78bfa;
          background: rgba(139, 92, 246, 0.1);
        }

        /* Footer & Input */
        .pattani-footer {
          padding: 12px 14px;
          background: #0f172a;
          border-top: 1px solid rgba(255, 255, 255, 0.08);
          display: flex;
          flex-direction: column;
          gap: 8px;
        }
        .pattani-quick-bar {
          display: flex;
          gap: 6px;
          overflow-x: auto;
          padding-bottom: 2px;
          scrollbar-width: none;
        }
        .pattani-quick-bar::-webkit-scrollbar { display: none; }
        .pattani-quick-btn {
          white-space: nowrap;
          padding: 4px 9px;
          border-radius: 10px;
          background: rgba(255, 255, 255, 0.05);
          border: 1px solid rgba(255, 255, 255, 0.08);
          color: #94a3b8;
          font-size: 11px;
          cursor: pointer;
        }
        .pattani-quick-btn:hover {
          background: rgba(255, 255, 255, 0.1);
          color: #fff;
        }
        .pattani-input-row {
          display: flex;
          gap: 8px;
          align-items: center;
        }
        .pattani-input {
          flex: 1;
          padding: 10px 14px;
          border-radius: 20px;
          border: 1.5px solid rgba(255, 255, 255, 0.12);
          background: #1e293b;
          color: #ffffff;
          font-size: 13.5px;
          font-family: inherit;
          outline: none;
          transition: all 0.2s;
        }
        .pattani-input:focus {
          border-color: #8b5cf6;
          box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
        }
        .pattani-mic {
          width: 38px;
          height: 38px;
          border-radius: 50%;
          background: rgba(255, 255, 255, 0.06);
          border: 1px solid rgba(255, 255, 255, 0.1);
          color: #cbd5e1;
          font-size: 16px;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all 0.2s;
        }
        .pattani-mic.listening {
          background: #ef4444;
          color: #fff;
          animation: pattaniMicPulse 1.2s infinite;
        }
        @keyframes pattaniMicPulse {
          0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
          70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
          100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        .pattani-send {
          width: 38px;
          height: 38px;
          border-radius: 50%;
          background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
          color: #ffffff;
          border: none;
          font-size: 15px;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: transform 0.15s, box-shadow 0.15s;
        }
        .pattani-send:hover {
          transform: scale(1.06);
          box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
        }

        /* Mobile Adjustments */
        @media (max-width: 640px) {
          .pattani-btn-wrap {
            bottom: 74px;
            right: 14px;
          }
          .pattani-btn {
            width: 46px;
            height: 46px;
            font-size: 19px;
          }
          .pattani-teaser {
            display: none;
          }
          .pattani-container {
            max-width: 100%;
            height: 90vh;
            border-radius: 16px;
          }
        }