:root {
  --leaf: #376334;
  --mint: #c6eba1;
  --gold: #f5b940;
  --ink: #1b1c1c;
  --muted: #42493f;
  --line: #c2c9bc;
  --paper: #fcf9f8;
  --soft: #f6f3f2;
  --white: #ffffff;
  --catalog-bg: #b5b5b5;
  --danger: #a44436;
  --shadow: 0 4px 20px rgba(79, 124, 74, 0.08);
  --shadow-lift: 0 16px 38px rgba(79, 124, 74, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--catalog-bg);
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

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

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(252, 249, 248, 0.94);
  border-bottom: 1px solid rgba(194, 201, 188, 0.65);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

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

.brand-mark,
.brand-logo {
  display: grid;
  width: 38px;
  height: 38px;
  object-fit: cover;
  background: var(--white);
  border-radius: 50%;
}

.brand-mark {
  place-items: center;
  color: var(--white);
  background: var(--leaf);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 0.98rem;
}

.brand div span {
  color: var(--muted);
  font-size: 0.76rem;
}

.top-whatsapp,
.primary-action,
.secondary-action,
.send-order,
.add-cart-button,
.admin-product-actions button,
.clear-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.top-whatsapp:hover,
.primary-action:hover,
.secondary-action:hover,
.send-order:hover,
.add-cart-button:hover,
.clear-filters:hover,
.view-product:hover,
.back-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(55, 99, 52, 0.16);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #27d66f;
  box-shadow: 0 0 0 5px rgba(39, 214, 111, 0.18);
  animation: viewer-breathe 1.8s ease-in-out infinite;
}

@keyframes viewer-breathe {
  0%,
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 4px rgba(39, 214, 111, 0.16);
  }

  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(39, 214, 111, 0.28);
  }
}

.admin-entry {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.viewer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  min-height: 32px;
  pointer-events: none;
}

.viewer-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--leaf), var(--gold), var(--mint), var(--leaf));
  box-shadow: 0 -6px 18px rgba(55, 99, 52, 0.16);
}

.viewer-message {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 14px;
  color: var(--white);
  background: linear-gradient(135deg, #17251b, #2f5c32);
  border: 1px solid rgba(198, 235, 161, 0.22);
  border-radius: 999px 999px 0 0;
  box-shadow: 0 -10px 26px rgba(24, 33, 27, 0.18);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.top-whatsapp,
.primary-action,
.add-cart-button,
.send-order {
  color: var(--white);
  background: var(--leaf);
  box-shadow: 0 8px 18px rgba(55, 99, 52, 0.14);
}

.add-cart-button.added {
  background: #244d28;
}

.top-whatsapp::before,
.send-order::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-right: 7px;
  background: url("assets/whatsapp.png") center / contain no-repeat;
}

.secondary-action {
  position: relative;
  color: #4c3900;
  background: var(--gold);
  box-shadow: 0 8px 18px rgba(245, 185, 64, 0.18);
  overflow: hidden;
  animation: cart-button-pulse 2.2s ease-in-out infinite;
}

.secondary-action::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76), transparent);
  transform: skewX(-18deg);
  animation: cart-button-shine 3s ease-in-out infinite;
}

@keyframes cart-button-pulse {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(245, 185, 64, 0.18);
  }

  50% {
    box-shadow: 0 12px 28px rgba(245, 185, 64, 0.42);
  }
}

@keyframes cart-button-shine {
  0% {
    left: -70%;
  }

  45%,
  100% {
    left: 125%;
  }
}

.hero {
  width: min(1180px, calc(100% - 28px));
  min-height: 190px;
  margin: 18px auto 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 18px clamp(14px, 3vw, 40px);
  background:
    linear-gradient(90deg, rgba(19, 34, 26, 0.78), rgba(19, 34, 26, 0.5), rgba(19, 34, 26, 0.78)),
    var(--hero-image, url("assets/optimized/hero-web.webp"))
      center / cover;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-copy {
  width: min(520px, 100%);
  color: var(--white);
  text-align: center;
}

.hero-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  object-fit: cover;
  display: block;
  background: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 440px;
  margin: 7px auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  line-height: 1.35;
}

.hero-shipping {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-shipping img {
  width: 19px;
  height: 19px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 9px;
}

.filters,
.catalog {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 28px);
}

.filters {
  position: sticky;
  top: 8px;
  z-index: 18;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 14px;
  margin-top: 12px;
  background: var(--white);
  border: 1px solid rgba(194, 201, 188, 0.78);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(31, 42, 36, 0.06);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

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

.search span,
.customer-note span,
.filter-controls span {
  color: var(--leaf);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.search input,
.customer-note textarea,
.filter-controls select,
.filter-controls input {
  width: 100%;
  border: 1px solid rgba(194, 201, 188, 0.82);
  border-radius: 999px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--soft);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.search input:focus,
.customer-note textarea:focus,
.filter-controls select:focus,
.filter-controls input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 107, 69, 0.12);
}

.customer-note textarea {
  height: 92px;
  resize: none;
}

.filter-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr) auto;
  align-items: end;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.filter-controls label {
  display: grid;
  gap: 6px;
}

.filter-controls select,
.filter-controls input {
  min-height: 42px;
  padding: 9px 12px;
}

.clear-filters {
  color: #4c3900;
  background: var(--gold);
  min-height: 42px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2,
.cart-header h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
}

#resultCount {
  color: var(--muted);
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 120px;
}

.product-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 78%, rgba(246, 243, 242, 0.9) 100%);
  border: 1px solid rgba(194, 201, 188, 0.65);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.offer-card {
  border-color: rgba(245, 185, 64, 0.8);
}

.offer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--white);
  color: #4c3900;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(245, 185, 64, 0.28);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  animation: offer-pulse 1.8s ease-in-out infinite;
}

.offer-badge::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  transform: skewX(-18deg);
  animation: offer-shine 2.4s ease-in-out infinite;
}

@keyframes offer-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 22px rgba(245, 185, 64, 0.28);
  }

  50% {
    transform: scale(1.04);
    box-shadow: 0 12px 30px rgba(245, 185, 64, 0.5);
  }
}

@keyframes offer-shine {
  0% {
    left: -70%;
  }

  48%,
  100% {
    left: 120%;
  }
}

.product-card-link {
  display: block;
}

.product-image {
  width: calc(100% - 34px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 17px auto 0;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, rgba(246, 243, 242, 0.52), rgba(255, 255, 255, 0));
  border-radius: 14px;
}

.product-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 205px;
  padding: 16px;
}

.product-meta {
  display: grid;
  gap: 6px;
  text-align: center;
}

.product-card h3 {
  margin: 0;
  min-height: 3.65em;
  font-size: 0.88rem;
  line-height: 1.22;
  text-align: center;
  text-transform: uppercase;
}

.product-card .product-category {
  margin: 0 0 6px;
  color: var(--leaf);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.product-card h3 a:hover {
  color: var(--leaf);
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
}

.price {
  color: var(--leaf);
  display: block;
  font-size: 0.94rem;
  line-height: 1.48;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.price span,
.detail-price span {
  display: block;
}

.price .old-price,
.detail-price .old-price {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 400;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(66, 73, 63, 0.55);
}

.price .current-price,
.detail-price .current-price {
  color: var(--leaf);
  font-size: 1.03em;
  font-weight: 900;
}

.quantity-row {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quantity-row button {
  height: 34px;
  border: 0;
  color: var(--leaf);
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 800;
}

.quantity-row button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.quantity-row span {
  text-align: center;
  font-weight: 800;
}

.view-product {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  margin-top: 2px;
  border-radius: 999px;
  color: var(--white);
  background: var(--leaf);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(55, 99, 52, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cart-panel {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: 16px;
  z-index: 30;
  width: min(380px, calc(100vw - 24px));
}

.cart-toggle {
  display: none;
}

.cart-content {
  display: grid;
  gap: 14px;
  max-height: min(74svh, 640px);
  padding: 16px;
  overflow: auto;
  background: var(--white);
  border: 1px solid rgba(194, 201, 188, 0.78);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.cart-panel.is-hidden .cart-content {
  display: none;
}

.cart-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--danger);
  background: var(--paper);
  cursor: pointer;
  font-weight: 800;
}

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

.empty-cart {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.05rem;
}

.cart-total strong {
  color: var(--leaf);
}

.cart-panel-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 10px;
}

.cart-clear {
  min-height: 42px;
  padding: 0 12px;
  color: #7a2f26;
  background: #f8e7e3;
  box-shadow: none;
}

.cart-clear:hover {
  background: #f2d4cd;
}

.send-order {
  width: 100%;
}

#sendOrder::before {
  display: none;
}

.send-order:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

.add-cart-button:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

.product-detail-page {
  display: none;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 28px) 130px;
}

.product-detail-page.open {
  display: block;
}

.cart-page {
  display: none;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 28px) 130px;
}

.cart-page.open {
  display: block;
}

.cart-page-shell {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: var(--white);
  border: 1px solid rgba(194, 201, 188, 0.78);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.cart-page-shell h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.cart-page-list {
  display: grid;
  gap: 12px;
}

.cart-page-item {
  display: grid;
  grid-template-columns: 92px 1fr minmax(150px, 190px);
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid rgba(194, 201, 188, 0.7);
  border-radius: 14px;
}

.cart-page-item img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--white);
}

.cart-page-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.cart-page-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.cart-page-item strong {
  display: block;
  margin-top: 7px;
  color: var(--leaf);
  font-size: 1.02rem;
}

.cart-page-summary {
  display: grid;
  grid-template-columns: 1fr auto minmax(240px, 320px);
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-page-summary span {
  color: var(--muted);
  font-weight: 700;
}

.cart-page-summary strong {
  color: var(--leaf);
  font-size: 1.25rem;
}

.cart-page-empty {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.back-link {
  min-height: 46px;
  margin-bottom: 12px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--leaf);
  box-shadow: 0 10px 26px rgba(47, 107, 69, 0.18);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.detail-media,
.detail-info,
.detail-section {
  background: var(--white);
  border: 1px solid rgba(194, 201, 188, 0.72);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.detail-media {
  display: grid;
  align-items: center;
  overflow: hidden;
}

.detail-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--paper);
}

.detail-info {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.detail-offer-badge {
  position: static;
  width: fit-content;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--leaf);
  background: var(--mint);
  font-size: 0.84rem;
  font-weight: 800;
}

.detail-pills .empty {
  color: var(--danger);
  background: #f7e7e4;
}

.detail-price {
  color: var(--leaf);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 900;
  text-align: left;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--leaf);
  background: var(--paper);
  cursor: pointer;
  font-weight: 900;
}

.option-choice.selected {
  border-color: var(--leaf);
  background: var(--mint);
}

.option-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--leaf);
}

.detail-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-cart {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 10px;
  align-items: center;
}

.detail-send {
  min-height: 38px;
}

.cart-confirmation {
  margin: -4px 0 0;
  color: var(--leaf);
  font-size: 0.9rem;
  font-weight: 800;
}

.detail-section {
  grid-column: span 1;
  padding: 16px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 28px clamp(12px, 3vw, 28px) 120px;
  background: var(--paper);
}

.footer-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(0, 1.8fr);
  gap: 24px;
  padding: 22px;
  background: var(--white);
  border: 1px solid rgba(194, 201, 188, 0.78);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

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

.footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.footer-brand span {
  margin-top: 2px;
  color: rgba(66, 73, 63, 0.78);
  font-size: 0.78rem;
}

.footer-info {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 18px;
  min-width: 0;
}

.footer-info div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.footer-info span {
  color: rgba(66, 73, 63, 0.72);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.footer-info strong,
.footer-info a {
  color: rgba(55, 99, 52, 0.82);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.38;
  overflow-wrap: anywhere;
  word-break: normal;
}

.footer-info a:hover {
  text-decoration: underline;
}

.rich-text {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.rich-text p {
  margin: 0 0 8px;
}

.rich-text li {
  margin: 0 0 6px 18px;
}

.admin-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: start center;
  padding: 24px;
  overflow: auto;
  background: rgba(31, 42, 36, 0.62);
}

.admin-shell.open {
  display: grid;
}

.admin-card {
  width: min(980px, 100%);
  margin: 24px 0;
  background: var(--white);
  border: 1px solid rgba(194, 201, 188, 0.78);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.admin-login,
.admin-dashboard {
  padding: clamp(18px, 4vw, 30px);
}

.admin-login h2,
.admin-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.admin-login p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-dashboard {
  display: none;
  gap: 20px;
}

.admin-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.admin-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-session-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
  box-shadow: none;
  animation: none;
}

.admin-session-button::after {
  display: none;
}

.admin-close-button {
  width: 36px;
  height: 36px;
  color: var(--danger);
  background: #fffaf2;
  border-color: rgba(191, 64, 49, 0.22);
}

.admin-toast {
  position: sticky;
  top: 0;
  z-index: 2;
  justify-self: end;
  max-width: min(360px, 100%);
  margin: -6px 0 -4px;
  padding: 11px 16px;
  color: #ffffff;
  background: var(--leaf);
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(55, 99, 52, 0.22);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

.product-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
  background:
    linear-gradient(90deg, var(--admin-accent, var(--leaf)) 0 5px, transparent 5px),
    var(--admin-panel-bg, var(--paper));
  border: 1px solid var(--admin-line, rgba(194, 201, 188, 0.78));
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(55, 66, 50, 0.05);
}

.product-form > .wide-field:first-of-type {
  padding-bottom: 2px;
}

.product-form.is-collapsed {
  gap: 0;
}

.product-form.is-collapsed > :not(.admin-section-summary) {
  display: none !important;
}

.admin-section-summary {
  position: relative;
  display: block !important;
  padding-right: 96px;
  cursor: pointer;
}

.admin-section-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 14px;
  color: var(--admin-accent, var(--leaf));
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--admin-line, var(--line));
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
}

.admin-section-toggle:hover {
  background: #ffffff;
}

.product-form > .wide-field:first-of-type .eyebrow {
  color: var(--admin-accent, var(--gold));
}

.product-form h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.hero-image-form {
  --admin-accent: #f4b83f;
  --admin-line: rgba(244, 184, 63, 0.48);
  --admin-panel-bg: linear-gradient(180deg, rgba(255, 248, 231, 0.98), #ffffff);
}

.category-manager-form {
  --admin-accent: #4d8a62;
  --admin-line: rgba(77, 138, 98, 0.42);
  --admin-panel-bg: linear-gradient(180deg, rgba(237, 249, 241, 0.98), #ffffff);
}

#productForm {
  --admin-accent: #2f6b3b;
  --admin-line: rgba(47, 107, 59, 0.42);
  --admin-panel-bg: linear-gradient(180deg, rgba(246, 252, 247, 0.98), #ffffff);
}

.credentials-form {
  --admin-accent: #60778d;
  --admin-line: rgba(96, 119, 141, 0.38);
  --admin-panel-bg: linear-gradient(180deg, rgba(245, 248, 250, 0.98), #ffffff);
}

.credentials-form .form-message,
.hero-image-form .form-message,
.category-manager-form .form-message {
  align-self: center;
  margin: 0;
}

.hero-image-preview img {
  object-fit: cover;
}

.admin-form label,
.product-form label,
.check-field {
  display: grid;
  gap: 6px;
}

.admin-form span,
.product-form span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-form input,
.product-form input,
.product-form select,
.product-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

.product-form textarea {
  min-height: 96px;
  resize: vertical;
}

.image-upload-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
  gap: 12px;
  align-items: end;
}

.image-preview {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-preview img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.image-preview img[hidden] {
  display: none;
}

.image-preview span {
  color: rgba(66, 73, 63, 0.78);
  font-size: 0.78rem;
  font-weight: 650;
}

.wide-field,
.form-actions {
  grid-column: 1 / -1;
}

.check-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-field input {
  width: 18px;
  min-height: 18px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-message {
  min-height: 20px;
  color: var(--danger);
  font-weight: 700;
}

.admin-list {
  display: grid;
  gap: 10px;
}

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

.admin-product img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--mint);
}

.admin-product strong,
.admin-product span {
  display: block;
}

.admin-product span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-product-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.admin-product-actions button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--leaf);
  background: var(--mint);
}

@media (max-width: 1040px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-info {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 52px;
  }

  .hero {
    width: min(430px, calc(100% - 20px));
    min-height: 170px;
    margin-top: 10px;
    padding: 12px;
    background:
      linear-gradient(90deg, rgba(19, 34, 26, 0.75), rgba(19, 34, 26, 0.45), rgba(19, 34, 26, 0.75)),
      var(--hero-image, url("assets/optimized/hero-mobile.webp"))
        center / cover;
  }

  .hero h1 {
    font-size: 1.12rem;
  }

  .hero-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 5px;
  }

  .hero p:not(.eyebrow) {
    font-size: 0.76rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .filters {
    position: static;
    grid-template-columns: 1fr;
    margin-left: 10px;
    margin-right: 10px;
    width: auto;
  }

  .filter-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .clear-filters {
    grid-column: auto;
  }

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

  .product-detail {
    grid-template-columns: 1fr;
  }

  .detail-cart {
    grid-template-columns: 1fr;
  }

  .cart-page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .cart-page-shell {
    padding: 16px;
  }

  .cart-page-item {
    grid-template-columns: 74px 1fr;
    gap: 12px;
  }

  .cart-page-item img {
    width: 74px;
    height: 74px;
  }

  .cart-page-item .quantity-row {
    grid-column: 1 / -1;
  }

  .cart-page-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-section {
    grid-column: auto;
  }

  .site-footer {
    width: 100%;
    margin: 0;
    padding: 20px 10px 110px;
  }

  .footer-inner,
  .footer-info {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    gap: 18px;
    padding: 18px;
  }

  .product-body {
    min-height: 190px;
    padding: 12px;
  }

  .product-card h3 {
    font-size: 0.78rem;
    min-height: 3.7em;
  }

  .cart-panel {
    left: auto;
    right: 14px;
    bottom: 48px;
    width: auto;
    pointer-events: none;
  }

  .cart-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 54px;
    padding: 0 12px 0 14px;
    color: var(--white);
    background: var(--leaf);
    border: 0;
    border-radius: 999px;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-weight: 800;
  }

  .cart-panel.has-items {
    pointer-events: auto;
  }

  .cart-panel.has-items .cart-toggle {
    display: inline-flex;
  }

  .cart-panel.cart-pop .cart-toggle {
    animation: mobile-cart-pop 700ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
  }

  .cart-toggle-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
  }

  .cart-toggle-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .cart-toggle-label {
    display: none;
  }

  .cart-toggle strong {
    display: grid;
    min-width: 27px;
    height: 27px;
    padding: 0 7px;
    place-items: center;
    color: var(--leaf);
    background: var(--white);
    border-radius: 999px;
  }

  .cart-content {
    display: none;
    margin-top: 8px;
    max-height: 72svh;
  }

  .cart-panel.open .cart-content {
    display: none;
  }

  @keyframes mobile-cart-pop {
    0% {
      transform: translateY(0) scale(1);
      box-shadow: var(--shadow);
    }

    42% {
      transform: translateY(-8px) scale(1.12);
      box-shadow: 0 18px 34px rgba(55, 99, 52, 0.28);
    }

    100% {
      transform: translateY(0) scale(1);
      box-shadow: var(--shadow);
    }
  }

  .top-actions {
    gap: 8px;
  }

  .viewer-bar {
    min-height: 28px;
  }

  .viewer-message {
    min-height: 28px;
    max-width: calc(100vw - 28px);
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .admin-entry {
    display: none;
  }

  .admin-shell {
    padding: 10px;
  }

  .product-form,
  .admin-product {
    grid-template-columns: 1fr;
  }

  .image-upload-field {
    grid-template-columns: 1fr;
  }

  .admin-product-actions {
    justify-content: start;
  }
}
