:root {
  color-scheme: light;
  --bg: #f7f3ef;
  --panel: #fcfaf8;
  --panel-2: #f6f1eb;
  --border: #e6ddd4;
  --text: #2c2622;
  --muted: #8f8378;
  --accent: #c88a44;
  --accent-dark: #b37530;
  --green: #cfe1dc;
  --green-dark: #6ea093;
  --white: #ffffff;
  --shadow: 0 8px 28px rgba(76, 55, 37, 0.08);
  --container: 1380px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #faf7f4 0%, #f5f0eb 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 0 18px;
}

.site-header__logo {
  width: auto;
  height: 64px;
  object-fit: contain;
}

.assistant-shell {
  min-height: calc(100vh - 130px);
  padding: 26px;
  border: 1px solid rgba(230, 221, 212, 0.85);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.assistant-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.assistant-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.assistant-title-icon,
.assistant-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.assistant-title-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin-top: 2px;
  background: rgba(200, 138, 68, 0.12);
  color: var(--accent);
  font-size: 18px;
}

.assistant-title h1 {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
}

.assistant-title p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.service-status {
  min-width: 88px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #6d6259;
  text-align: center;
  font-size: 14px;
}

.chat-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 290px;
  margin-bottom: 24px;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-row {
  display: flex;
}

.chat-row--user {
  justify-content: flex-end;
}

.chat-row--assistant {
  justify-content: flex-start;
}

.assistant-bubble-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 74%;
}

.assistant-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(180deg, #d69a56 0%, #c4833f 100%);
  color: white;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(196, 131, 63, 0.25);
}

.bubble {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(78, 59, 42, 0.04);
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-line;
}

.bubble--user {
  max-width: 62%;
  padding-right: 64px;
  background: #d7e8e3;
  border-color: #c7d8d3;
}

.bubble__time {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: #8ba19b;
  font-size: 13px;
}

.bubble--assistant .bubble__time {
  color: #9a8d82;
}

.prefs-box {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(250, 247, 243, 0.8);
}

.prefs-title {
  margin-right: 6px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.prefs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: #4e453f;
  font-size: 15px;
  white-space: nowrap;
}

.chip__icon {
  color: #987b5e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.carousel-section {
  position: relative;
  margin-bottom: 12px;
}

.carousel-viewport {
  overflow: hidden;
  padding: 4px 0;
}

.carousel-track {
  display: flex;
  gap: 18px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.product-card {
  flex: 0 0 calc((100% - 54px) / 4);
  display: flex;
  flex-direction: column;
  min-height: 700px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(79, 57, 39, 0.05);
}

.product-card__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee4db;
}

.product-card__image img,
.product-card__image-placeholder {
  width: 100%;
  height: 100%;
}

.product-card__image img {
  object-fit: cover;
}

.product-card__image-placeholder {
  display: grid;
  place-items: center;
  color: #9b8f85;
  font-size: 14px;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 18px 16px;
}

.product-card__title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}

.product-card__brand {
  min-height: 22px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 15px;
}

.product-card__price {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.product-card__sizes {
  margin-bottom: 14px;
  color: #756a61;
  font-size: 14px;
  line-height: 1.45;
}

.product-card__desc {
  margin-bottom: 16px;
  color: #655b54;
  font-size: 15px;
  line-height: 1.55;
}

.product-card__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 15px 18px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #cf9451 0%, #bf7f3b 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-card__button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.carousel-nav {
  position: absolute;
  top: 36%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(57, 41, 28, 0.08);
  color: #65584f;
  font-size: 20px;
}

.carousel-nav:hover {
  background: #fff;
}

.carousel-nav--prev {
  left: -18px;
}

.carousel-nav--next {
  right: -18px;
}

.carousel-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
  min-height: 28px;
  margin: 8px 0 24px;
}

.carousel-indicator {
  color: #5b5048;
  font-size: 18px;
}

.carousel-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 13px 20px;
  border: 1px solid rgba(200, 138, 68, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #5b4d42;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(79, 57, 39, 0.06);
}

.carousel-more:hover {
  background: #fffaf4;
}

.carousel-more:disabled {
  cursor: default;
  opacity: 0.55;
}

.query-box {
  padding: 18px;
  border: 1px solid rgba(200, 138, 68, 0.35);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 246, 241, 0.96) 100%);
  box-shadow: 0 14px 36px rgba(112, 76, 39, 0.12);
}

.query-box__label {
  margin: 0 0 10px 4px;
  color: #5f5248;
  font-size: 15px;
  font-weight: 700;
}

.query-box__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(200, 138, 68, 0.28);
  border-radius: 20px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.query-box:focus-within {
  border-color: rgba(200, 138, 68, 0.65);
  box-shadow: 0 16px 42px rgba(112, 76, 39, 0.16);
}

.query-box__inner:focus-within {
  border-color: rgba(200, 138, 68, 0.62);
  box-shadow: 0 0 0 4px rgba(200, 138, 68, 0.12);
}

.query-box__icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel);
  color: #6f6359;
  font-size: 22px;
}

.query-box__icon:disabled {
  cursor: default;
  opacity: 0.45;
}

.query-box__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 17px;
}

.query-box__input::placeholder {
  color: #aa9e94;
}

.query-box__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 152px;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #86b7ac 0%, #6ea093 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.query-box__send:hover {
  background: linear-gradient(180deg, #7aac9f 0%, #628f84 100%);
}

.query-box__send span {
  font-size: 14px;
  line-height: 1;
}

.query-box__hint {
  margin: 10px 0 0 4px;
  color: #9b8e83;
  font-size: 13px;
  line-height: 1.4;
}

.disclaimer {
  margin-top: 16px;
  color: #a29589;
  text-align: center;
  font-size: 13px;
}

.empty {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

@media (max-width: 1280px) {
  .product-card {
    flex: 0 0 calc((100% - 36px) / 3);
  }
}

@media (max-width: 980px) {
  .page {
    padding: 16px;
  }

  .assistant-shell {
    padding: 18px;
  }

  .assistant-title h1 {
    font-size: 30px;
  }

  .bubble--user {
    max-width: 80%;
  }

  .assistant-bubble-wrap {
    max-width: 88%;
  }

  .product-card {
    flex: 0 0 calc((100% - 18px) / 2);
    min-height: 660px;
  }

  .carousel-nav--prev {
    left: -8px;
  }

  .carousel-nav--next {
    right: -8px;
  }
}

@media (max-width: 640px) {
  .site-header__logo {
    height: 52px;
  }

  .assistant-top {
    margin-bottom: 20px;
  }

  .assistant-title h1 {
    font-size: 26px;
  }

  .assistant-title p {
    font-size: 15px;
  }

  .service-status {
    display: none;
  }

  .chat-area {
    max-height: 360px;
  }

  .bubble {
    font-size: 15px;
  }

  .bubble--user,
  .assistant-bubble-wrap {
    max-width: 100%;
  }

  .prefs-box {
    gap: 10px;
  }

  .prefs-title {
    width: 100%;
  }

  .product-card {
    flex: 0 0 100%;
    min-height: auto;
  }

  .carousel-nav {
    top: 33%;
    width: 42px;
    height: 42px;
  }

  .query-box__inner {
    gap: 10px;
    padding: 12px;
  }

  .query-box__send {
    min-width: auto;
    padding: 13px 18px;
  }

  .query-box__input {
    font-size: 15px;
  }
}
