:root {
  --bg: #fafafa;
  --card: #ffffff;
  --primary: #ffbe5c;
  --text: #1c1c1c;
  --muted: #6f6f6f;
}

/* RESET */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* APP */
.app {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 140px;
}

/* HERO */
.hero {
  margin: 16px;
  height: 240px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ffd89b, #ffbe5c);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(0,0,0,.12);
}

.hero h1 {
  margin: 0;
  font-size: 28px;
}

/* CATEGORIES */
.categories {
  display: flex;
  gap: 12px;
  padding: 8px 16px 0;
  overflow-x: auto;
}

.categories button {
  border: none;
  background: #eee;
  padding: 10px 18px;
  border-radius: 999px;
}

.categories .active {
  background: var(--primary);
}

/* SEARCH */
.search {
  padding: 16px;
}

.search input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  background: #f0f0f0;
}

/* CATALOG */
.catalog {
  padding: 8px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 32px;
}

/* CARD */
.card {
  background: var(--card);
  border-radius: 28px;
  box-shadow:
    0 14px 32px rgba(0,0,0,.08),
    0 6px 14px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card-inner {
  display: flex;
  border-radius: 28px;
  overflow: hidden;
}

/* IMAGE */
.card-image {
  flex: 0 0 220px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0) 100%
  );
  mask-image: linear-gradient(
    to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0) 100%
  );
}

/* INFO */
.card-info {
  flex: 1;
  min-width: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.card-info h3 {
  margin: 0;
  font-size: 17px;
}

.card-info p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ACTIONS */
.card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f4f4f4;
  padding: 6px 14px;
  border-radius: 999px;
}

.qty button {
  border: none;
  background: transparent;
  font-size: 18px;
}

.add {
  border: none;
  background: var(--primary);
  padding: 12px 22px;
  border-radius: 16px;
  font-weight: 600;
}

/* CART FAB */
.cart-fab {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

/* CART MODAL */
.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
}

.cart-modal.hidden {
  display: none;
}

.cart-sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 24px;
}
