:root {
  color-scheme: light;
  --bg: #f6f2ec;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #6d6b68;
  --accent: #8b2d2d;
  --accent-soft: #f2e4de;
  --border: #e9e1da;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fbf8f4 0%, var(--bg) 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.top-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem 1.2rem;
}

.top-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 420px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #faf8f5;
}

.search-bar input {
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  width: 100%;
}

.search-bar svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
}

.header-icons {
  display: flex;
  gap: 0.6rem;
}

.header-icons .icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent-soft);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

.secondary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.secondary-nav a:hover,
.main-nav a:hover {
  color: var(--accent);
}

.main-nav {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 180px;
  padding: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  display: flex;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1rem;
  box-shadow: var(--shadow);
  align-self: start;
}

.sidebar-toggle {
  display: none;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.sidebar h2 {
  font-size: 1rem;
  margin: 0 0 0.8rem;
}

.sidebar details {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
}

.sidebar summary {
  cursor: pointer;
  font-weight: 600;
}

.sidebar ul {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.products-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.03em;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.product-image {
  padding: 1rem;
  background: linear-gradient(135deg, #fcf8f4 0%, #f4ece4 100%);
}

.product-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.card-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.category-label {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
}

.card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.card-body p:last-child {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.cart-btn {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 0.95rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.cart-btn:hover {
  background: #752020;
  transform: translateY(-1px);
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 100%);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 40;
}

.cart-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel-header,
.cart-footer {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-cart {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.cart-items {
  padding: 1rem 1.2rem;
  flex: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.remove-item {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 980px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 0.75rem 0.75rem 3rem;
  }

  .top-bar {
    flex-wrap: wrap;
  }

  .search-bar {
    order: 3;
    max-width: none;
    width: 100%;
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar-panel {
    display: none;
  }

  .sidebar.open .sidebar-panel {
    display: block;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: start;
  }
}
