* {
  box-sizing: border-box;
}

:root {
  --black: #1d1d1b;
  --gray: #77736d;
  --line: #e7e4df;
  --background: #faf9f7;
  --card: #f1efea;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--black);
  font-family: "DM Sans", Arial, sans-serif;
}

.header {
  height: 78px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(250,249,247,.94);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.logo {
  color: var(--black);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
}

.cart-button {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.cart-button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: white;
  font-size: 12px;
}

.hero {
  min-height: 52vh;
  padding: 10vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 15px;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--gray);
}

.hero h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: .94;
  font-weight: 500;
  letter-spacing: -.05em;
}

.hero h1 em {
  font-style: italic;
}

.hero > p:last-child {
  max-width: 460px;
  margin-top: 30px;
  color: var(--gray);
  line-height: 1.7;
}

.catalog {
  padding: 0 5vw 100px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 30px;
}

.catalog h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 500;
}

#categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category {
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 14px;
  border-radius: 50px;
  color: var(--gray);
  cursor: pointer;
}

.category.active {
  background: var(--black);
  color: white;
  border-color: var(--black);
}

#status {
  color: var(--gray);
}

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 18px;
}

.product-image {
  aspect-ratio: 4 / 5;
  background: var(--card);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  color: #aaa;
  font-size: 11px;
  letter-spacing: .15em;
}

.product-info {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding-top: 14px;
}

.product-name {
  margin: 0;
  font-weight: 600;
}

.product-category {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--gray);
}

.product-price {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.add-button {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--black);
  color: var(--black);
  cursor: pointer;
  font-weight: 600;
}

.add-button:hover {
  background: var(--black);
  color: white;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 19;
}

#overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#cart {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100vh;
  background: var(--background);
  transform: translateX(100%);
  transition: .3s;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

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

.cart-header {
  padding: 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}

.cart-header h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}

#closeCart {
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}

#cartItems {
  flex: 1;
  overflow: auto;
  padding: 10px 28px;
}

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

.cart-item-name {
  margin: 0;
  font-weight: 600;
}

.cart-item-price {
  margin: 5px 0;
  color: var(--gray);
  font-size: 13px;
}

.quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.quantity button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
}

.remove {
  border: 0;
  background: transparent;
  text-decoration: underline;
  color: var(--gray);
  cursor: pointer;
}

.cart-footer {
  padding: 22px 28px;
  border-top: 1px solid var(--line);
}

.total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

#whatsappButton {
  width: 100%;
  padding: 15px;
  border: 0;
  background: var(--black);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.cart-footer > p {
  text-align: center;
  color: var(--gray);
  font-size: 12px;
}

@media (max-width: 800px) {
  .hero {
    padding: 8vh 6vw;
  }

  .catalog {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .catalog-header {
    display: block;
  }

  #categories {
    margin-top: 18px;
    justify-content: flex-start;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 12px;
  }
}

@media (max-width: 500px) {
  .hero h1 {
    font-size: 3.4rem;
  }

  .product-info {
    display: block;
  }

  .product-price {
    margin-top: 8px;
  }
}