:root {
  --bg: #fff8f5;
  --paper: #ffffff;
  --ink: #2b1725;
  --muted: #766777;
  --brand: #7b2f68;
  --brand-2: #00abc0;
  --accent: #f6c941;
  --hot: #e238a6;
  --line: rgba(43, 23, 37, 0.12);
  --shadow: 0 18px 42px rgba(43, 23, 37, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  background:
    radial-gradient(circle at top left, rgba(0, 171, 192, 0.14), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(226, 56, 166, 0.12), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button {
  font: inherit;
}

.hero {
  position: relative;
  width: 100%;
  height: clamp(210px, 42.6vw, 460px);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__content {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 10ch;
  font-size: clamp(2.9rem, 14vw, 6.8rem);
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--hot), 8px 8px 0 var(--brand-2);
}

.hero p:last-child {
  max-width: 24rem;
  margin: 18px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

main {
  width: min(960px, 100%);
  margin: -38px auto 0;
  padding: 0 14px 108px;
}

.category-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  margin: 0 -14px 18px;
  padding: 12px 14px;
  scroll-padding-inline: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 248, 245, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.category-bar::after {
  content: "";
  flex: 0 0 14px;
}

.category-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.category-button.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.menu {
  display: grid;
  gap: 18px;
}

.category-section {
  scroll-margin-top: 76px;
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 10px;
  color: var(--brand);
  font-size: 1.35rem;
  text-transform: uppercase;
}

.category-title::after {
  content: "";
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-2), transparent);
  border-radius: 99px;
}

.category-visual {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(43, 23, 37, 0.1);
}

.category-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  object-position: center;
}

.product-grid {
  display: grid;
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 116px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(43, 23, 37, 0.08);
}

.product-card__image {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 8px;
  background: #f2edf2;
  align-self: stretch;
}

.product-card__content {
  min-width: 0;
}

.product-card h3 {
  color: var(--brand);
  font-size: 1.1rem;
  text-transform: uppercase;
}

.product-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.product-card__side {
  display: grid;
  grid-column: 2;
  grid-template-columns: auto minmax(100px, 1fr);
  gap: 10px;
  justify-items: stretch;
  align-items: center;
}

.price {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.add-button,
.whatsapp-button,
.cart-fab {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.add-button {
  min-width: 98px;
  min-height: 46px;
  padding: 0 14px;
  background: var(--accent);
  color: var(--ink);
}

.product-card__side .price {
  justify-self: start;
}

.cart-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cart-fab.has-items {
  background: linear-gradient(135deg, var(--brand), var(--hot));
  box-shadow: 0 0 0 5px rgba(246, 201, 65, 0.26), 0 20px 44px rgba(123, 47, 104, 0.36);
  animation: cartPulse 1500ms ease-in-out infinite;
}

.cart-fab.just-added {
  animation: cartFlash 520ms ease-out;
}

.cart-fab strong {
  color: var(--accent);
}

.cart-fab__count {
  display: none;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.cart-fab.has-items .cart-fab__count {
  display: grid;
}

.admin-fab {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 10;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: var(--shadow);
}

@keyframes cartPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes cartFlash {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(246, 201, 65, 0.7), 0 20px 44px rgba(123, 47, 104, 0.36);
  }

  45% {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 0 0 12px rgba(246, 201, 65, 0.24), 0 22px 50px rgba(226, 56, 166, 0.38);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(246, 201, 65, 0), 0 20px 44px rgba(123, 47, 104, 0.36);
  }
}

.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  visibility: hidden;
}

.cart-panel.is-open {
  pointer-events: auto;
  visibility: visible;
}

.cart-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 10, 20, 0.52);
  opacity: 0;
  transition: opacity 180ms ease;
}

.cart-panel.is-open .cart-panel__backdrop {
  opacity: 1;
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  visibility: hidden;
}

.admin-panel.is-open {
  pointer-events: auto;
  visibility: visible;
}

.admin-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 10, 20, 0.52);
  opacity: 0;
  transition: opacity 180ms ease;
}

.admin-panel.is-open .admin-panel__backdrop {
  opacity: 1;
}

.admin {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-rows: auto minmax(0, auto) minmax(180px, 1fr);
  gap: 14px;
  max-height: min(94vh, 820px);
  max-height: min(94svh, 820px);
  overflow: hidden;
  padding: 16px;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform 220ms ease;
}

.admin-panel.is-open .admin {
  transform: translateY(0);
}

.admin__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin__header h2 {
  color: var(--brand);
}

.admin-form,
.admin-list {
  display: grid;
  gap: 12px;
}

.admin-form {
  align-content: start;
  max-height: min(50svh, 470px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.admin-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.admin-preview img {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-form__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.admin-save,
.admin-clear,
.admin-edit,
.admin-delete {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.admin-save {
  background: var(--brand);
  color: #fff;
}

.admin-clear {
  padding: 0 16px;
  background: #f2edf2;
  color: var(--brand);
}

.admin-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: #f2edf2;
}

.admin-item h3 {
  color: var(--brand);
  font-size: 0.95rem;
}

.admin-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-item__actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-edit {
  background: var(--accent);
  color: var(--ink);
}

.admin-delete {
  background: #f3d7df;
  color: #8c1d3c;
}

.cart {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-rows: auto minmax(140px, 1fr) auto;
  max-height: min(86vh, 720px);
  max-height: min(86svh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform 220ms ease;
}

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

.cart__header,
.cart__footer {
  padding: 18px;
}

.cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.cart__header h2 {
  color: var(--brand);
  font-size: 1.45rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.cart__items {
  min-height: 180px;
  overflow-y: auto;
  padding: 10px 18px;
}

.cart-empty {
  margin: 34px 0;
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item h3 {
  font-size: 0.96rem;
}

.cart-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.qty {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.qty button {
  height: 34px;
  border: 0;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
}

.qty span {
  text-align: center;
  font-weight: 900;
}

.cart-item__actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.remove-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
}

.cart__footer {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.order-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.delivery-options legend {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.field input,
.field select {
  min-height: 46px;
  padding: 0 12px;
}

.field textarea {
  min-height: 74px;
  padding: 10px 12px;
  resize: vertical;
}

.delivery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.delivery-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.delivery-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
}

.delivery-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.delivery-options label:has(input:checked) {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.shipping-fields {
  display: grid;
  gap: 12px;
}

.shipping-fields[hidden],
.field[hidden] {
  display: none;
}

.cart__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
}

.cart__total strong {
  color: var(--brand);
  font-size: 1.4rem;
}

.whatsapp-button {
  min-height: 54px;
  width: 100%;
  background: #20b857;
  color: #fff;
}

.whatsapp-button:disabled {
  background: #c9c3ca;
  cursor: not-allowed;
}

@media (min-width: 760px) {
  .hero__content {
    padding-inline: 28px;
  }

  main {
    padding-inline: 28px;
  }

  .category-bar {
    margin-inline: -28px;
    padding-inline: 28px;
    scroll-padding-inline: 28px;
  }

  .category-bar::after {
    flex-basis: 28px;
  }

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

  .cart {
    top: 0;
    left: auto;
    width: min(420px, 100%);
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
  }

  .admin {
    inset: 0 0 0 auto;
    grid-template-columns: minmax(330px, 420px) minmax(360px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: min(960px, 100%);
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
  }

  .admin__header {
    grid-column: 1 / -1;
  }

  .admin-form,
  .admin-list {
    min-height: 0;
    max-height: none;
  }

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

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

@media (min-width: 560px) {
  .product-card {
    grid-template-columns: 90px minmax(0, 1fr) auto;
    align-items: center;
  }

  .product-card__image {
    width: 90px;
    height: 90px;
    align-self: center;
  }

  .product-card__side {
    grid-column: auto;
    grid-template-columns: 1fr;
    justify-items: end;
  }
}

@media (max-width: 559px) {
  .hero {
    height: clamp(168px, 42.6vw, 210px);
  }

  main {
    margin-top: -18px;
    padding-inline: 12px;
    padding-bottom: 124px;
  }

  .category-bar {
    margin-inline: -12px;
    padding: 10px 12px;
    scroll-padding-inline: 12px;
  }

  .category-bar::after {
    flex-basis: 12px;
  }

  .category-button {
    font-size: 0.94rem;
  }

  .category-title {
    gap: 10px;
    font-size: 1.18rem;
  }

  .category-visual img {
    aspect-ratio: 16 / 7;
  }

  .product-card {
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
    padding: 14px;
    align-items: start;
  }

  .product-card__image {
    width: 68px;
    height: 100%;
    min-height: 78px;
    grid-row: 1 / 3;
    align-self: stretch;
  }

  .product-card h3 {
    font-size: 1rem;
  }

  .product-card p {
    font-size: 0.9rem;
  }

  .product-card__side {
    grid-column: 2;
    grid-template-columns: 1fr;
    gap: 6px;
    align-self: end;
  }

  .add-button {
    width: 100%;
  }

  .cart-fab {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    justify-content: center;
    min-height: 58px;
    padding-inline: 14px;
  }

  .admin-fab {
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px);
    left: max(12px, env(safe-area-inset-left));
  }

  .cart {
    max-height: min(94vh, 760px);
    max-height: min(94svh, 760px);
  }

  .cart__header,
  .cart__footer {
    padding: 16px;
  }

  .cart__items {
    min-height: 120px;
    padding: 8px 16px;
  }

  .cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
