/* —— basic reset —— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* —— body + fonts —— */
body {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  color: #333;
  display: flex;
  justify-content: center;
}

.page-wrapper {
  width: 90%;
  max-width: 900px;
}

/* header */
.site-header {
  text-align: center;
  padding-top: 50px;
  padding-bottom: 10px;
}

.logo {
  width: 250px;
  margin-bottom: 15px;
}

.site-title {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
}

/* category filter */
.search-section {
  margin: 30px 0;
  display: flex;
}

.search-section select {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  border: 2px solid #000;
  cursor: pointer;
  background-color: white;
  font-weight: 500;
}

.search-section select:focus {
  outline: none;
  border-color: #666;
}

/* chat section */
.chatbox {
  margin: 40px 0;
  border: 2px solid #000;
  padding: 26px;
}

.chatbox h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.chat-window {
  padding: 20px;
  font-size: 18px;
  line-height: 1.5;
  height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafafa;
  border-radius: 0;
  margin-bottom: 20px;
  /* mimic a phone chat area */
  border: 1.5px solid #e3a535;
  min-height: 180px;
  box-shadow: 0 2px 12px #e3a53522;
}

/* placeholder message */
.placeholder-message {
  width: 100%;
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 18px;
}

/* input row */
.chat-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.chat-form input {
  flex: 1;
  padding: 12px;
  font-size: 18px;
  border: none;
  border-bottom: 2px solid #ccc;
  background: transparent;
}

.chat-form input:focus {
  outline: none;
  border-bottom-color: #e3a535;
}

.chat-form button {
  font-size: 18px;
  background: #000;
  color: #fff;
  border: none;
  padding: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-form button:hover {
  background: #ff003b;
}

.chat-form button:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Chat bubbles - text message style */
.chat-bubble {
  max-width: 75%;
  padding: 13px 18px;
  border-radius: 22px;
  font-size: 16px;
  line-height: 1.7;
  word-break: break-word;
  margin-bottom: 0;
  box-shadow: 0 2px 8px #0001;
  position: relative;
  display: flex;
  flex-direction: column;
}

.chat-bubble.user {
  align-self: flex-end;
  background: #ff003b;
  color: #fff;
  border-bottom-right-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom-left-radius: 22px;
  border-top-left-radius: 22px;
  margin-right: 6px;
}

.chat-bubble.user::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 8px;
  width: 14px;
  height: 18px;
  background: #ff003b;
  border-bottom-right-radius: 12px 18px;
  transform: rotate(25deg);
  z-index: 1;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: #fff;
  color: #333;
  border-bottom-left-radius: 6px;
  border-top-left-radius: 6px;
  border-bottom-right-radius: 22px;
  border-top-right-radius: 22px;
  border: 1.5px solid #e3a535;
  margin-left: 6px;
}

.chat-bubble.assistant::after {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 8px;
  width: 14px;
  height: 18px;
  background: #fff;
  border-bottom-left-radius: 12px 18px;
  border: 1.5px solid #e3a535;
  border-right: none;
  transform: rotate(-25deg);
  z-index: 1;
}

/* Sender labels above bubbles */
.chat-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  margin-left: 2px;
  color: #e3a535;
  letter-spacing: 0.5px;
}

.chat-bubble.user .chat-label {
  color: #fffbe9;
}

.chat-bubble.assistant .chat-label {
  color: #e3a535;
}

/* footer */
.site-footer {
  margin: 60px 0 40px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.site-footer nav {
  margin-top: 12px;
}

.site-footer a {
  margin: 0 8px;
  color: #000;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ff003b;
}

/* products grid */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
}

.product-card {
  flex: 0 1 calc(33.333% - 14px);
  border: 1px solid #ccc;
  padding: 15px;
  display: flex;
  gap: 15px;
  min-height: 160px;
  cursor: pointer;
  transition: border 0.2s, background 0.2s;
  position: relative;
}

/* Highlight selected product cards */
.product-card.selected {
  border: 2px solid #ff003b;
  background: #ffe5ec;
}

.product-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  flex-shrink: 0;
}

.product-card .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
}

.product-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 14px;
  color: #666;
}

/* Optional: smooth fade for description box */
.product-desc-float {
  transition: opacity 0.15s;
  opacity: 0;
  pointer-events: none;
}

.product-card:hover .product-desc-float,
.product-card:focus-within .product-desc-float {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

/* selected products */
.selected-products {
  margin: 40px 0;
  padding: 20px;
  border: 2px solid #000;
}

.selected-products h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

#selectedProductsList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.generate-btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  background: #000;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.generate-btn:hover {
  background: #ff003b;
}

.generate-btn i {
  margin-right: 8px;
}

.selected-products .remove-btn {
  margin-left: 10px;
  background: #ff003b;
  color: #fff;
  border: none;
  padding: 2px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.selected-products .remove-btn:hover {
  background: #e3a535;
}

.clear-btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  background: #000;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.clear-btn:hover {
  background: #ff003b;
}
