:root {
  --bg: #fffaf4;
  --bg-soft: #f8efe4;
  --card: #ffffff;
  --text: #382f2b;
  --muted: #75675f;
  --brand: #9a1630;
  --brand-dark: #7b1025;
  --accent: #de2e4a;
  --border: #eadccd;
  --shadow: 0 18px 45px rgba(80, 45, 30, 0.12);
  --radius: 22px;
  --danger: #b42318;
  --success: #1a7f4b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 244, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--brand);
  font-size: 1.25rem;
}

.logo-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.menu {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  color: var(--muted);
}

.menu a:hover {
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 700;
  background: var(--brand);
  color: white;
  box-shadow: 0 12px 25px rgba(143, 63, 91, 0.22);
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  font-size: 1rem;
  font-family: inherit;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(143, 63, 91, 0.28);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: white;
  color: var(--brand);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.block {
  width: 100%;
}

.eyebrow {
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 14px 0 18px;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.page-hero {
  padding: 56px 0 36px;
  background:
    radial-gradient(circle at top left, #f3d8c5 0, transparent 34%),
    linear-gradient(135deg, #fffaf4, #f8efe4);
}

.page-hero p {
  max-width: 680px;
}

.catalog-section {
  padding: 24px 0 72px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(80, 45, 30, 0.07);
  display: flex;
  flex-direction: column;
}

.product-card__image-wrap {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__category {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 6px;
}

.product-card__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand);
  margin: 8px 0 16px;
}

.product-card .btn {
  margin-top: auto;
}

.status-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
}

.status-box.error {
  border-color: #f5c2c7;
  background: #fff5f5;
  color: var(--danger);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(49, 37, 33, 0.55);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--bg);
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow);
}

@media (min-width: 700px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    border-radius: var(--radius);
    max-height: 88vh;
  }
}

.modal__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(255, 250, 244, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.modal__close {
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  flex-shrink: 0;
}

.modal__body {
  padding: 24px;
}

.product-summary {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.product-summary img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--bg-soft);
}

.form-section {
  margin-bottom: 24px;
}

.form-section h3 {
  margin-bottom: 14px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--text);
}

.field-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  color: var(--text);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.radio-group,
.checkbox-group {
  display: grid;
  gap: 10px;
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  font-weight: 400;
  color: var(--muted);
}

.radio-group input,
.checkbox-group input {
  width: auto;
  margin: 0;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: white;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}

.mode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-toggle label:has(input:checked) {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff5f7;
}

.delivery-fields[hidden],
.pickup-fields[hidden] {
  display: none;
}

.order-summary {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
}

.order-summary dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.order-summary dt {
  font-weight: 700;
  color: var(--text);
}

.order-summary dd {
  margin: 0 0 8px;
  color: var(--muted);
}

.order-summary .total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand);
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.alert-error {
  background: #fff5f5;
  border: 1px solid #f5c2c7;
  color: var(--danger);
}

.alert-info {
  background: #f0f7ff;
  border: 1px solid #c7ddff;
  color: #1e4f8a;
}

.alert-success {
  background: #f0faf4;
  border: 1px solid #b8e6cc;
  color: var(--success);
}

.fee-status,
.cep-status {
  font-size: 0.92rem;
  margin-top: 8px;
}

.fee-status.loading,
.cep-status.loading {
  color: var(--muted);
}

.fee-status.error,
.cep-status.error {
  color: var(--danger);
}

.fee-status.ok,
.cep-status.ok {
  color: var(--success);
  font-weight: 700;
}

.success-panel {
  max-width: 560px;
  margin: 48px auto 72px;
  padding: 36px 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-panel[hidden] {
  display: none;
}

.success-panel .success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f8ef;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0 auto 18px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.btn-whatsapp-confirm {
  background: #25d366;
  color: white;
  box-shadow: 0 12px 25px rgba(37, 211, 102, 0.28);
  min-height: 48px;
  padding: 14px 22px;
  font-size: 1.02rem;
}

.btn-whatsapp-confirm:hover {
  box-shadow: 0 16px 30px rgba(37, 211, 102, 0.36);
}

footer {
  background: #312521;
  color: white;
  padding: 42px 0;
}

footer p {
  color: rgba(255, 255, 255, 0.72);
}

footer a:hover {
  color: #ffd7a2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  background: #25d366;
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

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

@media (max-width: 900px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 36px 0 28px;
  }

  .catalog-section {
    padding: 36px 0 56px;
  }
}
