:root {
  --red-dark: #8B0000;
  --red-mid: #B22222;
  --orange: #FF8C42;
  --gold: #D4AF37;
  --gold-light: #F5D76E;
  --dark: #1f1f1f;
  --success: #25D366;
  --danger: #ff5a5a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  color: var(--dark);
  background:
    radial-gradient(circle at top right, rgba(255, 140, 66, 0.10), transparent 25%),
    linear-gradient(180deg, #fffdfb 0%, #fff8f4 100%);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

.hidden {
  display: none !important;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--dark);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--red-dark), var(--orange));
  box-shadow: 0 10px 24px rgba(139, 0, 0, 0.18);
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--red-dark);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

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

.brand-text strong {
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.brand-text span {
  font-size: 0.85rem;
  opacity: 0.9;
}

.menu-toggle {
  justify-self: end;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 0 auto;
  transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-nav {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 0;
}

.header-nav.open {
  display: flex;
}

.header-nav a {
  color: #fff;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
}

.cart-button {
  display: none;
}

.hero {
  padding: 42px 0 28px;
}

.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero-content h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
}

.hero-content p {
  margin: 0;
  font-size: 1.05rem;
  color: #4b4b4b;
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  color: #5b4100;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(212, 175, 55, .25);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 20px;
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.hero-highlights li {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.hero-visual {
  position: relative;
  min-height: 280px;
}

.hero-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(0,0,0,.10);
  padding: 24px;
}

.hero-card-main {
  background: linear-gradient(135deg, #fff 0%, #fff4ed 100%);
  border: 1px solid rgba(255, 140, 66, .20);
}

.hero-card-main h3 {
  font-size: 1.8rem;
  margin: 12px 0 8px;
}

.hero-card-main strong {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.25rem;
  color: var(--red-mid);
}

.hero-chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 140, 66, .12);
  color: var(--orange);
  font-weight: 800;
}

.hero-card-floating {
  width: min(240px, 88%);
  position: absolute;
  right: 0;
  bottom: -18px;
  border: 1px solid rgba(0,0,0,.06);
  animation: floaty 4.2s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.section {
  padding: 36px 0;
}

.section-soft {
  background: rgba(255,255,255,.55);
  border-top: 1px solid rgba(0,0,0,.04);
  border-bottom: 1px solid rgba(0,0,0,.04);
}

.section-head {
  margin-bottom: 22px;
}

.section-kicker {
  display: inline-block;
  color: var(--red-mid);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.section-head p {
  margin: 0;
  color: #555;
}

.catalog-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-tab {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.category-tab.active {
  background: linear-gradient(90deg, var(--red-dark), var(--orange));
  color: #fff;
  border-color: transparent;
}

.category-tab:hover {
  transform: translateY(-1px);
}

.highlight-grid,
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.product-card {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 16px 32px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(0,0,0,.08);
}

.product-media {
  height: 180px;
  background:
    linear-gradient(135deg, rgba(139, 0, 0, .85), rgba(255, 140, 66, .75)),
    linear-gradient(135deg, #f4f4f4, #dcdcdc);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
}

.product-body {
  padding: 18px;
  display: grid;
  gap: 12px;
  flex: 1;
}

.product-tag {
  display: inline-flex;
  justify-self: start;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(178, 34, 34, .08);
  color: var(--red-mid);
  font-size: .85rem;
  font-weight: 800;
}

.product-title {
  margin: 0;
  font-size: 1.2rem;
}

.product-desc {
  margin: 0;
  color: #5a5a5a;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--red-dark);
}

.btn {
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--red-dark), var(--orange));
  box-shadow: 0 12px 24px rgba(178, 34, 34, .22);
}

.btn-secondary {
  color: var(--dark);
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}

.btn-full {
  width: 100%;
}

.empty-state {
  text-align: center;
  color: #666;
  background: #fff;
  border-radius: 18px;
  border: 1px dashed rgba(0,0,0,.12);
  padding: 18px;
}

.checkout-layout {
  display: grid;
  gap: 20px;
}

.checkout-card,
.summary-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  font-weight: 800;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}

.field-error {
  min-height: 18px;
  color: var(--danger);
  font-weight: 700;
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.toggle-option {
  flex: 1;
  min-width: 140px;
}

.toggle-option input {
  display: none;
}

.toggle-option span {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  text-align: center;
  font-weight: 800;
}

.toggle-option input:checked + span {
  background: linear-gradient(90deg, var(--red-dark), var(--orange));
  color: #fff;
  border-color: transparent;
}

.warning-box {
  margin: 8px 0 18px;
  border-left: 4px solid var(--gold);
  background: rgba(245, 215, 110, .20);
  color: #674f00;
  padding: 12px 14px;
  border-radius: 14px;
}

.summary-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(0,0,0,.08);
}

.summary-item strong {
  display: block;
}

.summary-item small {
  color: #666;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.summary-total {
  font-size: 1.12rem;
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: 6px;
  padding-top: 14px;
}

.summary-note {
  color: #666;
  font-size: .92rem;
  margin-top: 14px;
}

.floating-cart {
  position: fixed;
  z-index: 900;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, var(--red-dark), var(--orange));
  color: #fff;
  box-shadow: 0 20px 34px rgba(139, 0, 0, .28);
  border-radius: 999px;
  padding: 14px 18px;
}

.floating-cart strong,
.floating-cart small {
  display: block;
  text-align: left;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.35);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100vh;
  z-index: 1200;
  background: #fff;
  box-shadow: -20px 0 50px rgba(0,0,0,.18);
  transform: translateX(100%);
  transition: transform .28s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

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

.drawer-header,
.drawer-footer {
  padding: 18px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.drawer-footer {
  border-bottom: none;
  border-top: 1px solid rgba(0,0,0,.06);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.drawer-header h2,
.modal-header h2 {
  margin: 0;
}

.drawer-header p {
  margin: 4px 0 0;
  color: #666;
}

.drawer-body {
  overflow: auto;
  padding: 18px;
}

.cart-items {
  display: grid;
  gap: 14px;
}

.cart-item {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  padding: 14px;
  background: #fffaf7;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cart-item-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.cart-item-meta {
  margin: 0;
  color: #666;
  font-size: .92rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  overflow: hidden;
}

.qty-control button {
  width: 38px;
  height: 38px;
  font-weight: 800;
}

.qty-control span {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
}

.link-danger {
  color: var(--danger);
  font-weight: 800;
}

.icon-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f6f6f6;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.46);
}

.modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,.20);
}

.modal-lg {
  width: min(900px, 100%);
}

.modal-xl {
  width: min(1180px, 100%);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-body {
  padding: 20px;
}

.config-grid {
  display: grid;
  gap: 18px;
}

.option-group {
  display: grid;
  gap: 10px;
}

.option-group h3 {
  margin: 0;
  font-size: 1rem;
}

.radio-card,
.check-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 12px 14px;
}

.config-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.orders-list {
  display: grid;
  gap: 16px;
}

.order-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 16px 32px rgba(0,0,0,.05);
  border-radius: 20px;
  padding: 16px;
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .9rem;
  color: #fff;
}

.status-pendente { background: #7b7b7b; }
.status-confirmado { background: #2563eb; }
.status-preparando { background: #d97706; }
.status-enviado { background: #7c3aed; }
.status-entregue { background: var(--success); }
.status-cancelado { background: var(--danger); }

.admin-topbar {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-filters,
.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-filters input,
.admin-filters select {
  flex: 1;
  min-width: 220px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 14px 16px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: #fff7f2;
  border: 1px solid rgba(255, 140, 66, .15);
  border-radius: 18px;
  padding: 16px;
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 6px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #fff8f3;
}

.admin-table select {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.toast-container {
  position: fixed;
  z-index: 1500;
  right: 16px;
  bottom: 86px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border-left: 5px solid var(--success);
  color: var(--dark);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(0,0,0,.12);
  padding: 14px 16px;
  animation: toastIn .25s ease;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.info {
  border-left-color: var(--orange);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .menu-toggle {
    display: none;
  }

  .header-nav {
    grid-column: auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 0;
  }

  .header-nav a {
    background: transparent;
  }

  .cart-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.12);
    padding: 10px 12px;
    border-radius: 18px;
  }

  .cart-info {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    text-align: left;
  }

  .cart-count {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    color: var(--red-dark);
    font-weight: 800;
    padding: 0 8px;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .hero-grid {
    grid-template-columns: 1.1fr .9fr;
    gap: 36px;
  }

  .highlight-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .checkout-layout {
    grid-template-columns: 1.15fr .85fr;
    align-items: start;
  }

  .checkout-summary {
    position: sticky;
    top: 96px;
  }

  .admin-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .highlight-grid,
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-stats {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .cart-drawer {
    width: 100%;
  }

  .modal-dialog,
  .modal-lg,
  .modal-xl {
    width: 100%;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 22px 22px 0 0;
    align-self: end;
  }
}