@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* General Resets & Body */
body {
  font-family: 'Poppins', sans-serif;
  background-color: rgb(237,223,215); /* Light grey background */
  padding:2rem;
}

    
    .container {
      margin: 0 auto;
    }

    /* Content Area */
    .content-area {
      background: #ffffff;
      border-radius: 0px;
      padding: 50px;
      border: 0px solid #e4e4e7;
      min-height: 400px;
      margin-bottom: 30px;
    }

    /* Welcome Section */
    .welcome-section {
      text-align: center;
      padding: 0px 0;
    }

    .welcome-section h2 {
      font-size: 32px;
      color: #000000;
      margin-bottom: 20px;
    }

    .welcome-section p {
      font-size: 18px;
      color: #52525b;
      margin-bottom: 40px;
      line-height: 1.6;
    }

    .question-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
      margin-top: 30px;
    }

    .question-btn {
      padding: 20px 30px;
      background: #000000;
      color: #ffffff;
      border: 1px solid #000000;
      border-radius: 16px;
      font-size: 16px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      text-align: left;
      line-height: 1.5;
    }

    .question-btn:hover {
      background: #ffffff;
      color: #000000;
    }

    /* Conversation history */
    .conversation-history {
      margin-bottom: 30px;
    }

    .conversation-item {
      border: 1px solid #e4e4e7;
      border-radius: 16px;
      margin-bottom: 16px;
      overflow: hidden;
      transition: all 0.3s ease;
      position: relative;
    }

    .conversation-item.collapsed {
      border-color: #d4d4d8;
    }

    .conversation-header {
      padding: 20px 30px;
      background: #fafafa;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: background 0.2s ease;
    }

    .conversation-header:hover {
      background: #f4f4f5;
    }

    .conversation-question {
      font-size: 18px;
      font-weight: 600;
      color: #000000;
      flex: 1;
    }

    .conversation-toggle {
      font-size: 16px;
      transition: transform 0.3s ease;
    }

    .conversation-item:not(.collapsed) .conversation-toggle {
      transform: rotate(180deg);
    }

    .delete-conv-btn {
      position: absolute;
      top: 50%;
      right: 40px;
      transform: translateY(-50%);
      cursor: pointer;
      font-size: 16px;
      opacity: 0.6;
      transition: opacity 0.2s;
      display: none;
    }

    .delete-conv-btn:hover {
      opacity: 1;
    }

    .clear-history-btn {
      display: block;
      margin: 20px auto 10px;
      padding: 8px 16px;
      font-size: 14px;
      font-weight: 500;
      color: #555;
      background-color: #f0f0f0;
      border: 1px solid #ddd;
      border-radius: 20px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .clear-history-btn:hover {
      background-color: #e0e0e0;
      border-color: #ccc;
    }

    .conversation-content {
      padding: 0 20px 20px;
      border-top: 1px solid #eee;
      transition: max-height 0.4s ease, padding 0.4s ease;
    }

    .conversation-item.collapsed .conversation-content {
      max-height: 0;
      padding: 0 30px;
    }

    .response-section {
      text-align: center;
      opacity: 0;
      animation: fadeUp 0.6s ease forwards;
    }

    .response-section.show {
      opacity: 1;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .user-question {
      font-size: 28px;
      font-weight: 600;
      color: #000000;
      margin-bottom: 40px;
      text-align: center;
    }

    .ai-response {
      font-size: 18px;
      line-height: 1.8;
      color: #3f3f46;
      margin-bottom: 50px;
      text-align: center;
      max-width: 900px;
      margin-left: auto;
      margin-right: auto;
      opacity: 0;
      animation: fadeUp 0.6s ease forwards;
      animation-delay: 0.2s;
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Formatted text styles */
    .ai-response ul,
    .ai-response ol,
    .conversation-content ul,
    .conversation-content ol {
      text-align: left;
      display: inline-block;
      margin: 20px 0;
      padding-left: 0;
      list-style-type: none;
    }

    .ai-response li.textonly,
    .conversation-content li.textonly {
    display: block;
}
    .ai-response li,
    .conversation-content li {
      margin: 12px 0;
      line-height: 1.8;
      display: flex;
      align-items: center;
      gap: 15px;
      opacity: 0;
      animation: fadeUpItem 0.5s ease forwards;
    }

    @keyframes fadeUpItem {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .ai-response li img,
    .conversation-content li img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        object-position: left;
        border-radius: 0px;
        border-right: 1px solid #e4e4e7;
        flex-shrink: 0;
        max-width: fit-content;
        }

    .ai-response li span,
    .conversation-content li span {
      flex-grow: 1;
    }

    .ai-response strong,
    .conversation-content strong {
      font-weight: 600;
      color: #000000;
    }

    .ai-response a,
    .conversation-content a {
      color: #000000;
      text-decoration: underline;
      font-weight: 600;
      transition: border-color 0.3s ease;
    }

    .ai-response a:hover,
    .conversation-content a:hover {
      border-bottom-color: #000000;
    }

    .ai-response h1,
    .ai-response h2,
    .ai-response h3 {
      margin: 24px 0 16px 0;
      color: #18181b;
    }

    .ai-response h1 { font-size: 28px; }
    .ai-response h2 { font-size: 24px; }
    .ai-response h3 { font-size: 20px; }

    /* Loading Indicator */
    #ai-scentfinder-container .loading-container {
      text-align: center;
    }
    #ai-scentfinder-container .loading-bar-container {
      width: 80%;
      height: 10px;
      background-color: #e4e4e7;
      border-radius: 5px;
      margin: 20px auto;
      overflow: hidden;
    }
    #ai-scentfinder-container .loading-bar {
      width: 0;
      height: 100%;
      background-color: #000000;
      border-radius: 5px;
      transition: width 0.5s ease-in-out;
    }
    #ai-scentfinder-container .loading-text {
      font-size: 18px;
      color: #52525b;
      margin-top: 10px;
    }

    /* Product Carousel */
    .products-section {
      margin: 50px 0;
      opacity: 0;
      animation: fadeUp 0.6s ease forwards;
      animation-delay: 0.8s;
    }

    .products-title {
      font-size: 26px;
      font-weight: 600;
      color: #000000;
      text-align: center;
      margin-bottom: 30px;
    }

    .carousel-container {
      position: relative;
      padding: 0 50px;
    }

    .carousel-controls {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 100%;
      display: flex;
      justify-content: space-between;
      pointer-events: none;
      z-index: 10;
    }

    .carousel-btn {
      width: 48px;
      height: 48px;
      border: 1px solid #d4d4d8;
      background: #ffffff;
      color: #000000;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      transition: all 0.3s;
      pointer-events: all;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .carousel-btn:hover:not(:disabled) {
      background: #000000;
      color: #ffffff;
      transform: scale(1.1);
    }

    .carousel-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .products-carousel {
      overflow: hidden;
      margin: 0 -10px;
    }

    .products-track {
      display: flex;
      gap: 24px;
      transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      padding: 10px;
    }

    .product-card {
      min-width: 250px;
      background: #ffffff;
      border: 0px solid #e4e4e7;
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.3s ease;
      cursor: pointer;
      opacity: 0;
      animation: fadeInScale 0.5s ease forwards;
    }

    .product-card:nth-child(1) { animation-delay: 0.1s; }
    .product-card:nth-child(2) { animation-delay: 0.2s; }
    .product-card:nth-child(3) { animation-delay: 0.3s; }
    .product-card:nth-child(4) { animation-delay: 0.4s; }
    .product-card:nth-child(5) { animation-delay: 0.5s; }
    .product-card:nth-child(6) { animation-delay: 0.6s; }

    @keyframes fadeInScale {
      from { opacity: 0; transform: scale(0.9); }
      to { opacity: 1; transform: scale(1); }
    }

    .product-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 12px 24px rgba(0,0,0,0.1);
      border-color: #a1a1aa;
    }

    .product-image {
      width: 100%;
      height: 280px;
      object-fit: cover;
      background: #fafafa;
    }

    .product-info {
      padding: 20px;
    }

    .product-title {
      font-size: 16px;
     /* font-weight: 700;*/
      color: #18181b;
      margin-bottom: 12px;
      line-height: 1.4;
      min-height: 44px;
    }

    .product-price {
      font-size: 22px;
      font-weight: 700;
      color: #000000;
      margin-bottom: 16px;
    }

    .buy-btn {
      width: 100%;
      padding: 12px;
      background: #000000;
      color: #ffffff;
      border: 1px solid #000000;
      border-radius: 2px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .buy-btn:hover {
      background: #ffffff;
      color: #000000;
    }

    /* Follow-up questions */
    .followup-section {
      margin-top: 50px;
      text-align: center;
      opacity: 0;
      animation: fadeUp 0.6s ease forwards;
      animation-delay: 1.2s;
    }

    .followup-title {
      font-size: 20px;
      font-weight: 600;
      color: #18181b;
      margin-bottom: 20px;
    }

    .followup-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      justify-content: center;
    }

    .followup-btn {
      padding: 12px 24px;
      background: #ffffff;
      border: 1px solid #d4d4d8;
      color: #3f3f46;
      border-radius: 50px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .followup-btn:hover {
      background: #000000;
      color: #ffffff;
      border-color: #000000;
      transform: translateY(-2px);
    }

    /* Input Section */
    .input-section {
      background: #ffffff;
      border-radius: 50px;
      padding: 12px 20px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.12);
      display: flex;
      gap: 12px;
      align-items: center;
      max-width: 800px;
      margin: 0 auto;
      border: 1px solid #e4e4e7;
    }

    #messageInput {
      flex: 1;
      border: none;
      outline: none;
      font-size: 16px;
      padding: 8px 16px;
      background: transparent;
      color: #18181b;
    }

    .voice-btn {
      width: 44px;
      height: 44px;
      border: none;
      background: #f4f4f5;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      transition: all 0.2s;
    }

    .voice-btn:hover {
      background: #e4e4e7;
    }

    .voice-btn.listening {
      background: #000000;
      color: white;
      animation: voicePulse 1s ease-in-out infinite;
    }

    @keyframes voicePulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
    }

    .send-btn {
      padding: 12px 32px;
      background: #000000;
      color: #ffffff;
      border: 1px solid #000000;
      border-radius: 50px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .send-btn:hover {
      background: #ffffff;
      color: #000000;
    }

    /* Responsive Styles */
    @media (max-width: 1024px) {
      .content-area {
        padding: 40px;
      }
      .question-buttons {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      }
      .carousel-container {
        padding: 0 40px;
      }
      .product-card {
        min-width: 220px;
      }
      .product-image {
        height: 240px;
      }
    }

    @media (max-width: 768px) {
      body {
        padding: 15px;
      }
      .content-area {
        padding: 30px;
      }
      .welcome-section h2 {
        font-size: 28px;
      }
      .welcome-section p {
        font-size: 16px;
      }
      .question-btn {
        padding: 18px 25px;
        font-size: 15px;
      }
      .conversation-header {
        padding: 18px 25px;
      }
      .conversation-question {
        font-size: 16px;
      }
      .user-question {
        font-size: 24px;
      }
      .ai-response {
        font-size: 16px;
      }
      .products-title {
        font-size: 22px;
      }
      .carousel-container {
        padding: 0;
      }
      .carousel-controls {
        display: none; /* Hide arrows on mobile, rely on swipe */
      }
      .products-carousel {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
      }
      .products-track {
        padding-bottom: 20px; /* For scrollbar */
      }
      .product-card {
        scroll-snap-align: start;
        min-width: 200px;
      }
      .product-image {
        height: 220px;
      }
      .product-title {
        font-size: 15px;
        min-height: 40px;
      }
      .product-price {
        font-size: 20px;
      }
      .followup-title {
        font-size: 18px;
      }
      .followup-btn {
        font-size: 14px;
        padding: 10px 20px;
      }
      .input-section {
        flex-direction: row;
        border-radius: 50px;
        padding: 10px;
        gap: 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
      }
      #messageInput {
        text-align: left;
        padding: 8px;
        background: transparent;
        border-radius: 0;
      }
      .send-btn {
        padding: 10px 24px;
        font-size: 15px;
      }
      .voice-btn {
        width: 40px;
        height: 40px;
      }
    }

    @media (max-width: 480px) {
      body {
        padding: 10px;
      }
      .content-area {
        padding: 20px;
      }
      .welcome-section {
        padding: 20px 0;
      }
      .welcome-section h2 {
        font-size: 24px;
      }
      .question-buttons {
        grid-template-columns: 1fr;
      }
      .conversation-header {
        padding: 15px 20px;
      }
      .conversation-content {
        padding: 20px;
      }
      .user-question {
        font-size: 20px;
      }
      .ai-response {
        font-size: 15px;
      }
      .ai-response li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        border-bottom: 1px solid #e4e4e7;
        padding-bottom: 15px;
      }
      .ai-response li img {
        width: 80px;
        height: 80px;
      }
      .product-card {
        min-width: 180px;
      }
      .product-image {
        height: 200px;
      }
      .product-info {
        padding: 15px;
      }
      .product-title {
        font-size: 14px;
      }
      .product-price {
        font-size: 18px;
      }
      .buy-btn {
        padding: 10px;
        font-size: 14px;
      }
      .followup-btn {
        width: 100%;
      }
      .input-section {
        padding: 8px;
      }
      #messageInput {
        font-size: 14px;
      }
      .send-btn {
        padding: 8px 16px;
        font-size: 14px;
      }
    }
