﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: transparent;
  margin: 0;
  padding: 0;
  /* Make body take full specific dimensions but allow transparency */
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#chat-container {
  display: flex;
  flex-direction: column;
  /* Responsive dimensions */
  width: 100%;
  height: 100%;
  max-width: 420px;
  max-height: 650px;
  background: #FFF1EC;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: absolute;
  bottom: 0;
  right: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: bottom right;
}

/* Launcher Button */
.chat-launcher {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1000;
  transform: scale(0);
  opacity: 0;
}

.chat-launcher.visible {
  transform: scale(1);
  opacity: 1;
}

.chat-launcher:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-launcher svg {
  width: 32px;
  height: 32px;
  color: white;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
  color: white;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.status {
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9fafb;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot .avatar {
  background: transparent;
}

.message.user {
  flex-direction: row-reverse;
}

.message.user .avatar {
  background: #6b7280;
}

.content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.6;
  font-size: 14px;
}

.message.bot .content {
  background: white;
  color: #1f2937;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message.user .content {
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.content p {
  margin: 4px 0;
}

.content p:first-child {
  margin-top: 0;
}

.content p:last-child {
  margin-bottom: 0;
}

.content ul {
  margin: 4px 0 8px 16px;
  list-style: none;
  padding-left: 0;
}

.content li {
  margin: 3px 0;
  position: relative;
  padding-left: 18px;
  line-height: 1.4;
}

.content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #dd851f;
  font-weight: bold;
  font-size: 13px;
}

/* Ordered list styling override */
.content ol {
  margin: 4px 0 8px 16px;
  padding-left: 20px;
  list-style: decimal;
}

.content ol li {
  padding-left: 5px;
  list-style-type: decimal;
  display: list-item;
}

.content ol li::before {
  content: none !important;
}

.content strong {
  display: inline;
  margin: 0;
}

.content strong:first-child {
  margin-top: 0;
}

/* Inline question buttons */
.inline-question-btn {
  background: transparent;
  border: none;
  color: #dd851f;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline;
  line-height: 1.3;
}

.inline-question-btn:hover {
  color: #dd851f;
  text-decoration: underline;
}

/* Typing indicator */
.typing {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
  align-items: flex-start;
}

.typing .avatar {
  background: transparent;
}

.typing-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dots {
  background: transparent;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  gap: 4px;
}

.dots span {
  width: 8px;
  height: 8px;
  background: #dd851f;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.typing-text {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  padding-left: 4px;
  animation: fadeIn 0.3s ease;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Input */
.input-area {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 100;
}

#input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

#input:focus {
  border-color: #dd851f;
}

#input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
}

#send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

#send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.3);
}

#send:active:not(:disabled) {
  transform: scale(0.95);
}

#send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */
.footer {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

/* Suggestion Block - Inside Chat Messages */
.suggestion-block {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  padding-left: 50px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.suggestion-block.hidden {
  display: none;
}

.suggestion-btn {
  padding: 8px 16px;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.suggestion-btn:hover {
  background: white;
  color: #dd851f;
  border-color: #dd851f;
}

.suggestion-btn:active {
  transform: scale(0.98);
}

.suggestion-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.suggestions.hidden {
  display: none;
}

/* Contextual Suggestions */
.contextual-suggestions {
  padding: 12px 20px;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contextual-suggestion-btn {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 8px 16px;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contextual-suggestion-btn:hover {
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  border-color: #dd851f;
}

/* Product-related suggestions */
.product-suggestion {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 1px solid #dd851f;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.product-suggestion h4 {
  color: #dd851f;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

/* Loading indicator for suggestions */
.suggestions.loading .suggestion-btn {
  opacity: 0.6;
  pointer-events: none;
}

/* Focus states for accessibility */
.suggestion-btn:focus-visible {
  outline: 2px solid #dd851f;
  outline-offset: 2px;
}

/* Follow-up Modal */
.followup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.question-btn {
  width: 100%;
  padding: 16px;
  margin-bottom: 12px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: all 0.2s ease;
  color: #374151;
  font-weight: 500;
}

.question-btn:hover {
  background: #f3f4f6;
  border-color: #dd851f;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(221, 133, 31, 0.2);
}

.question-btn:last-child {
  margin-bottom: 0;
}

/* Scrollbar */
.messages::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-track {
  background: #f9fafb;
}

.messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f9fafb;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .messages {
    padding: 16px;
  }

  .content {
    max-width: 85%;
    font-size: 14px;
  }

  .input-area {
    padding: 12px 16px;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .action-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Error state */
.error-message {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  border-left: 4px solid #ef4444 !important;
  border-radius: 12px !important;
}

/* Show More Products Button */
.show-more-btn {
  margin-top: 12px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(221, 133, 31, 0.3);
}

.show-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.4);
}

.show-more-btn:active {
  transform: translateY(0);
}

.show-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Product List Container */
.product-list-container {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 12px;
  border: 2px solid #dd851f;
}

.product-list-container h4 {
  color: #dd851f;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.product-item {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.4;
}

.product-item:hover {
  background: linear-gradient(135deg, #dd851f 0%, #dd851f 100%);
  color: white;
  border-color: #dd851f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.3);
}

.product-item:active {
  transform: translateY(0);
}

/* Product Follow-up Questions */
.product-followup {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
}

.product-followup p {
  color: #92400e;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 14px;
}

.product-question-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.product-q-btn {
  background: white;
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #92400e;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-q-btn:hover {
  background: #f59e0b;
  color: white;
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.product-q-btn:active {
  transform: translateY(0);
}

/* Scrollbar for product grid */
.product-grid::-webkit-scrollbar {
  width: 8px;
}

.product-grid::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb {
  background: #dd851f;
  border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb:hover {
  background: #dd851f;
}

/* Responsive adjustments for suggestions */
@media (max-width: 768px) {
  .suggestions {
    padding: 12px 16px;
    gap: 8px;
  }

  .suggestion-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .input-area {
    padding: 12px 16px;
  }
}

/* Clear Chat Confirmation Modal */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.confirm-modal-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.confirm-modal-content h3 {
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.confirm-modal-content p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cancel-btn {
  background: #f3f4f6;
  color: #374151;
}

.cancel-btn:hover {
  background: #e5e7eb;
}

.clear-btn {
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
}

.clear-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.4);
}

/* Mobile Responsive Styles */
@media (max-width: 480px) {
  #chat-container {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    bottom: 0;
    right: 0;
  }

  .chat-header {
    padding: 12px 16px;
  }

  .chat-launcher {
    bottom: 16px;
    right: 16px;
  }
}

/* ====== ADD TO CART BLOCK ====== */
.add-to-cart-block {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #22c55e;
  border-radius: 12px;
  animation: slideIn 0.3s ease;
}

.cart-product-info strong {
  font-size: 14px;
  color: #166534;
}

.cart-pricing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.cart-original-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 14px;
}

.cart-discounted-price {
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
}

.cart-discount-badge {
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.cart-discount-code {
  font-size: 12px;
  color: #166534;
  background: #bbf7d0;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.add-to-cart-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-align: center;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* ====== AI SUGGESTED QUESTION CHIPS ====== */
.suggestion-btn.ai-suggested {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #dd851f;
  color: #9a3412;
  white-space: normal;
  text-align: left;
  font-size: 12px;
  padding: 8px 14px;
}

.suggestion-btn.ai-suggested:hover {
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
}

/* ====== QUERY FORM MODAL ====== */
.query-form-content {
  background: white;
  border-radius: 20px;
  max-width: 380px;
  width: 92%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.query-form-header {
  padding: 18px 20px;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.query-form-header h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.query-form-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.form-group .required {
  color: #ef4444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #dd851f;
}

.query-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.query-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.4);
}

.query-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.query-form-status {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.query-form-status.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.query-form-status.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.query-redirect-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.redirect-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.whatsapp-link {
  background: #25d366;
  color: white;
}

.whatsapp-link:hover {
  background: #128c7e;
}

.email-link {
  background: #3b82f6;
  color: white;
}

.email-link:hover {
  background: #2563eb;
}

.phone-link {
  background: #8b5cf6;
  color: white;
}

.phone-link:hover {
  background: #7c3aed;
}

/* ====== REVIEW MODAL ====== */
.review-modal-content {
  background: white;
  border-radius: 20px;
  max-width: 360px;
  width: 92%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.review-header {
  padding: 18px 20px;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-header h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.review-body {
  padding: 24px 20px;
  text-align: center;
}

.review-body p {
  font-size: 14px;
  color: #374151;
  margin-bottom: 16px;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.star-rating .star {
  font-size: 36px;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.star-rating .star:hover,
.star-rating .star.hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.star-rating .star.active {
  color: #f59e0b;
}

.review-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.review-body textarea:focus {
  border-color: #dd851f;
}

/* ====== STREAMING CURSOR ====== */
.streaming-cursor {
  display: inline;
  font-weight: 300;
  color: #dd851f;
  animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ====== MICRO-FEEDBACK (👍👎) ====== */
.feedback-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}

.feedback-btn {
  background: transparent;
  border: 1px solid transparent;
  font-size: 16px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.5;
  line-height: 1;
}

.feedback-btn:hover:not(:disabled) {
  opacity: 1;
  transform: scale(1.2);
  background: #f3f4f6;
}

.feedback-btn:disabled {
  cursor: default;
  opacity: 0.3;
}

.feedback-btn.selected {
  opacity: 1 !important;
  transform: scale(1.15);
  background: #f0fdf4;
  border-color: #86efac;
}

.feedback-btn.selected[data-type="down"] {
  background: #fef2f2;
  border-color: #fca5a5;
}

.feedback-thanks {
  font-size: 12px;
  color: #16a34a;
  font-weight: 500;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feedback-thanks.visible {
  opacity: 1;
}

/* ====== RICH PRODUCT CARDS ====== */
.product-cards-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 0 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #dd851f #f3f4f6;
}

.product-cards-scroll::-webkit-scrollbar {
  height: 4px;
}

.product-cards-scroll::-webkit-scrollbar-thumb {
  background: #dd851f;
  border-radius: 2px;
}

.product-card {
  min-width: 220px;
  max-width: 260px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(221, 133, 31, 0.15);
  border-color: #dd851f;
}

.product-card-header {
  margin-bottom: 10px;
}

.product-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.product-card-rating .stars {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 1px;
}

.product-card-rating .rating-num {
  font-weight: 600;
  color: #374151;
}

.product-card-rating .review-count {
  color: #9ca3af;
  font-size: 12px;
}

.product-card-review {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  background: #faf5ff;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 3px solid #744994;
}

.product-card-review .quote-icon {
  color: #744994;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.product-card-review .review-text {
  font-size: 12px;
  color: #4b5563;
  font-style: italic;
  line-height: 1.4;
}

.product-card-pricing {
  margin-bottom: 12px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.original-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
}

.final-price {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #16a34a, #15803d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.discount-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.discount-code {
  font-size: 11px;
  color: #166534;
  background: #dcfce7;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.product-card-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(221, 133, 31, 0.3);
}

.product-card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(221, 133, 31, 0.5);
}

.product-card-cta:active {
  transform: translateY(0);
}

/* ==================== QUIZ MODAL STYLES ==================== */

/* Quiz Modal Container */
#quiz-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.quiz-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quiz Header */
.quiz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.quiz-header-text {
  flex: 1;
}

.quiz-step-label {
  font-size: 12px;
  color: #dd851f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.quiz-header h3 {
  font-size: 20px;
  color: #1f2937;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.quiz-header .close-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.quiz-header .close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.quiz-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
}

.quiz-back-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.quiz-back-btn:hover {
  background: #f3f4f6;
  color: #374151;
  border-color: #9ca3af;
}

/* Progress Bar */
.quiz-progress-bar {
  height: 6px;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.quiz-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Quiz Body */
.quiz-body {
  padding: 32px 24px;
  min-height: 300px;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.quiz-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quiz-question {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Quiz Options */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option-btn {
  width: 100%;
  padding: 16px 20px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.quiz-option-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #dd851f;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.quiz-option-btn:hover {
  border-color: #dd851f;
  background: #fffbf5;
  transform: translateX(4px);
}

.quiz-option-btn:hover::before {
  transform: scaleY(1);
}

.quiz-option-btn:active {
  transform: translateX(2px) scale(0.98);
}

/* Quiz Result */
.quiz-result {
  text-align: center;
}

.quiz-result-inner {
  max-width: 400px;
  margin: 0 auto;
}

.quiz-result-icon {
  width: 64px;
  height: 64px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.quiz-result-title {
  font-size: 16px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 12px;
}

.quiz-result-product {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  line-height: 1.3;
}

.quiz-result-reason {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Quiz Result Actions */
.quiz-result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-buy-btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.3);
}

.quiz-buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(221, 133, 31, 0.5);
}

.quiz-buy-btn:active {
  transform: translateY(0);
}

.quiz-ask-btn {
  width: 100%;
  padding: 14px 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-ask-btn:hover {
  border-color: #dd851f;
  background: #fffbf5;
  color: #dd851f;
}

.quiz-ask-btn:active {
  transform: scale(0.98);
}

/* Quiz Custom Input */
.quiz-custom-input {
  margin-top: 16px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  animation: fadeIn 0.3s ease;
}

.quiz-text-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #374151;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.quiz-text-input:focus {
  outline: none;
  border-color: #dd851f;
  background: white;
}

.quiz-text-input::placeholder {
  color: #9ca3af;
}

.quiz-submit-custom {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, #dd851f 0%, #b86e19 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-submit-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 133, 31, 0.4);
}

.quiz-submit-custom:active {
  transform: translateY(0);
}

.quiz-custom-trigger {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-color: #d1d5db;
  color: #6b7280;
  font-weight: 600;
}

.quiz-custom-trigger:hover {
  background: linear-gradient(135deg, #fffbf5 0%, #fff7ed 100%);
  border-color: #dd851f;
  color: #dd851f;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  #quiz-modal {
    padding: 0;
  }

  .quiz-modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .quiz-header {
    padding: 20px 16px 12px 16px;
  }

  .quiz-body {
    padding: 24px 16px;
  }

  .quiz-question {
    font-size: 16px;
  }

  .quiz-option-btn {
    padding: 14px 16px;
    font-size: 14px;
  }

  .quiz-result-product {
    font-size: 20px;
  }
}

/* Loading Skeleton Styles */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin: 20px auto;
  max-width: 600px;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.1) 25%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.1) 25%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-short {
  width: 40%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
