/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #f5f0e8;
  --black: #111111;
  --dark: #1a1a1a;
  --gray: #6b6b6b;
  --light-gray: #e8e3da;
  --accent: #c8a97e;
  --white: #ffffff;
  --font: 'Georgia', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, sans-serif;
  --radius: 4px;
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--black);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.08em;
  font-style: italic;
}

nav { display: flex; gap: 2rem; }
nav a {
  color: var(--light-gray);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  max-width: 1200px;
  margin: 4rem auto 2rem;
  padding: 0 2rem;
  text-align: center;
}

.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--black);
  margin-bottom: 1rem;
  font-weight: normal;
  font-style: italic;
}

.hero-sub {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Products */
.products-section {
  max-width: 1200px;
  margin: 3rem auto 4rem;
  padding: 0 2rem;
}

.products-section h2 {
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: normal;
  margin-bottom: 2rem;
  color: var(--dark);
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 0.75rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-img {
  background: var(--light-gray);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.product-info { padding: 1.25rem; }

.product-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.product-name {
  font-family: var(--font);
  font-size: 1.05rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
  font-style: italic;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.product-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--gray);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  margin-top: auto;
}

/* Chat Toggle Button */
.chat-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s, background 0.2s;
  z-index: 200;
}

.chat-toggle:hover {
  background: var(--accent);
  transform: scale(1.08);
}

/* Chat Window */
.chat-window {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  width: 360px;
  max-height: 520px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  z-index: 199;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.chat-window.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 420px) {
  .chat-window {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 5rem;
  }
}

.chat-header {
  background: var(--black);
  color: var(--white);
  padding: 1rem 1.25rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.chat-status {
  font-size: 0.72rem;
  color: #90ee90;
}

.chat-close {
  background: none;
  border: none;
  color: var(--light-gray);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.2s;
}

.chat-close:hover { color: var(--white); }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--light-gray) transparent;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--light-gray); border-radius: 4px; }

.msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
  animation: fadeUp 0.2s ease;
}

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

.msg.assistant {
  background: var(--cream);
  color: var(--dark);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.msg.user {
  background: var(--black);
  color: var(--white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.msg.typing {
  background: var(--cream);
  align-self: flex-start;
  color: var(--gray);
  font-style: italic;
}

/* Input */
.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--light-gray);
}

#chat-input {
  flex: 1;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  outline: none;
  background: var(--cream);
  color: var(--dark);
  transition: border-color 0.2s;
  font-family: var(--font-sans);
}

#chat-input:focus { border-color: var(--accent); }

#chat-send {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  width: 38px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
  flex-shrink: 0;
}

#chat-send:hover { background: var(--accent); }
#chat-send:disabled { background: var(--light-gray); cursor: not-allowed; }
