:root {
  --bg: #ffeef5;
  --bg-alt: #ffe1ef;
  --card: #fff7fb;
  --accent: #ff7ca8;
  --accent-soft: #ffb6cf;
  --accent-dark: #e04e86;
  --text-main: #3b262f;
  --text-soft: #8f6c79;
  --border-soft: rgba(255, 124, 168, 0.2);
  --shadow-soft: 0 10px 30px rgba(217, 126, 164, 0.18);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #ffeef8 0, #ffd6e5 40%, #ffedf4 100%);
  color: var(--text-main);
}

body {
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 10px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Top bar */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  backdrop-filter: blur(14px);
  background: rgba(255, 249, 253, 0.85);
  border-radius: 999px;
  border: 1px solid rgba(255, 198, 222, 0.7);
  box-shadow: 0 8px 24px rgba(209, 122, 161, 0.18);
  position: sticky;
  top: 4px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 4px 6px rgba(208, 111, 149, 0.4));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-soft);
}

/* Cart chip */

.cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 124, 168, 0.28);
  background: linear-gradient(135deg, #ffe7f0, #ffd0e2);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 12px rgba(211, 103, 148, 0.3);
}

.cart-chip:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(211, 103, 148, 0.3);
}

.cart-icon {
  font-size: 0.9rem;
}

.cart-label {
  margin-top: 1px;
}

.cart-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Hero */

.hero {
  padding: 10px 12px 12px;
  border-radius: 20px;
  background: radial-gradient(circle at top left, #ffe9f4 0, #ffd8e9 38%, #ffeef7 100%);
  border: 1px solid rgba(255, 191, 218, 0.8);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-copy h1 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.hero-pill {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: #fff7fc;
  border: 1px dashed rgba(255, 158, 192, 0.8);
  font-size: 0.7rem;
  color: var(--accent-dark);
}

/* Tabs */

.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  border-radius: 999px;
  padding: 5px 12px;
  border: 1px solid rgba(246, 150, 190, 0.6);
  background: rgba(255, 247, 252, 0.9);
  color: var(--text-soft);
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(215, 102, 148, 0.6);
}

/* Products */

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 6px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: 0 6px 18px rgba(198, 110, 150, 0.12);
  padding: 8px 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.product-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 179, 210, 0.9);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 1;
}

.product-illus {
  height: 90px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top, #fff9fd 0, #ffd9ea 42%, #ffedf7 100%);
  border: 1px solid rgba(255, 189, 220, 0.9);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-illus::before,
.product-illus::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.8;
}

.product-illus::before {
  width: 80px;
  height: 50px;
  background: rgba(255, 154, 193, 0.55);
  top: -10px;
  left: -10px;
}

.product-illus::after {
  width: 80px;
  height: 50px;
  background: rgba(255, 226, 242, 0.85);
  bottom: -10px;
  right: -5px;
}

.product-icon {
  position: relative;
  z-index: 1;
  font-size: 2.1rem;
  filter: drop-shadow(0 4px 10px rgba(212, 86, 137, 0.4));
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-name {
  font-size: 0.82rem;
  font-weight: 700;
}

.product-tags {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.product-price {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-dark);
}

.product-price span {
  font-size: 0.7rem;
  color: var(--text-soft);
  font-weight: 500;
}

.add-btn {
  border-radius: 999px;
  padding: 5px 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(211, 94, 143, 0.7);
}

.add-btn span {
  font-size: 0.85rem;
}

.add-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 7px rgba(211, 94, 143, 0.7);
}

/* Cart panel */

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 10, 19, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
  z-index: 18;
}

.cart-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #fff8fc;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 30px rgba(177, 90, 128, 0.35);
  border-top: 1px solid rgba(255, 186, 214, 0.9);
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 200ms ease-out;
  z-index: 20;
}

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

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

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

.cart-header h2 {
  margin: 0;
  font-size: 0.95rem;
}

.cart-close {
  border: none;
  background: rgba(255, 210, 231, 0.9);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
}

.cart-body {
  max-height: 210px;
  overflow-y: auto;
  padding-right: 4px;
}

.cart-empty {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 193, 220, 0.8);
}

.cart-item-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cart-item-name {
  font-size: 0.78rem;
  font-weight: 600;
}

.cart-item-meta {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: #ffe3f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
}

.cart-qty {
  min-width: 20px;
  text-align: center;
  font-size: 0.75rem;
}

.cart-item-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.cart-footer {
  border-top: 1px solid rgba(255, 187, 215, 0.8);
  padding-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.cart-total {
  font-weight: 700;
  color: var(--accent-dark);
}

.checkout-btn {
  border-radius: 999px;
  border: none;
  padding: 9px 14px;
  background: linear-gradient(135deg, #ff7ca8, #ff9fbe);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(216, 96, 142, 0.8);
  cursor: pointer;
}

.checkout-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(216, 96, 142, 0.8);
}

/* Small screens tweaks */

@media (max-width: 380px) {
  .hero-copy h1 {
    font-size: 1.1rem;
  }

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

  .app {
    padding-inline: 8px;
  }

  .cart-panel {
    padding-inline: 10px;
  }
}

