/* ===== Design tokens ===== */
:root {
  --bg: #f7f5ff;
  --card: #ffffff;
  --accent: #e8452a;
  --accent-dark: #c43a22;
  --header-start: #1e0b3a;
  --header-end: #3d1f8a;
  --text: #1a1a2a;
  --text-muted: #5a5a6a;
  --border: #e2ddf5;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(30,11,58,0.08);
  --shadow-hover: 0 8px 28px rgba(30,11,58,0.15);
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, var(--header-start) 0%, var(--header-end) 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}
.site-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.site-header > p {
  opacity: 0.82;
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 1.5rem;
}

/* ===== Navigation ===== */
.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.main-nav a {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}
.main-nav a:hover { background: rgba(255,255,255,0.28); }

/* ===== Page layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 2rem;
  align-items: start;
}

/* ===== Section headings ===== */
.categories h2,
.featured h2,
.trends h2,
.products h2,
.top-list h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ===== Category grid (homepage) ===== */
.category-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.category-list li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.category-list li a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.cat-icon { font-size: 1.3rem; }

/* ===== Product cards ===== */
.products,
.top-list { display: flex; flex-direction: column; gap: 1.25rem; }

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.product-image {
  flex: 0 0 200px;
  width: 200px;
  height: 400px;
  object-fit: contain;
  object-position: top;
  background: #f0eef8;
}

.product-content {
  flex: 1;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-content h2,
.product-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.product-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}
.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

/* ===== CTA Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.15s;
  align-self: flex-start;
  white-space: nowrap;
}
.btn::after { content: " →"; }
.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* ===== Sidebar note ===== */
.note {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border-left: 4px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.note h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.note p + p { margin-top: 0.4rem; }

/* ===== Featured article ===== */
.featured-article {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  border-top: 4px solid var(--accent);
}
.featured-article h3 a {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}
.featured-article h3 a:hover { text-decoration: underline; }
.featured-article p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

/* ===== Trends ===== */
.trends {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--header-start);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.88rem;
  margin-top: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 600px) {
  .site-header { padding: 2rem 1rem 1.5rem; }
  .category-list { grid-template-columns: 1fr; }
  .product-card { flex-direction: column; }
  .product-image { width: 100%; height: 420px; flex: none; }
  .product-content { padding: 1rem; }
  .container { gap: 1.25rem; }
}
