:root {
  --bg: #f2f3f5;
  --bg-accent: #e7e9ee;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-dark: #1f1712;
  --text: #1f2937;
  --text-soft: #6b7280;
  --line: rgba(31, 41, 55, 0.09);
  --line-strong: rgba(31, 41, 55, 0.16);
  --brand: #16a34a;
  --brand-strong: #15803d;
  --brand-soft: #dcfce7;
  --success: #128c7e;
  --danger: #b34646;
  --shadow-lg: 0 14px 36px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: var(--text);
}

body::before {
  display: none;
}

.catalog-body {
  background:
    linear-gradient(180deg, rgba(246, 248, 252, 0.28), rgba(239, 244, 249, 0.36)),
    url("../images/catalog-background.png") center top / cover fixed no-repeat;
}

.catalog-body::before {
  content: "";
  position: fixed;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 18% 18%, rgba(29, 78, 216, 0.1), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(20, 184, 166, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(245, 247, 250, 0.2));
  pointer-events: none;
}

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

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

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

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

.page-shell {
  position: relative;
  z-index: 1;
  padding: 14px 0 36px;
}

.side-promo {
  position: fixed;
  right: 12px;
  bottom: 12px;
  top: auto;
  transform: none;
  z-index: 40;
  width: auto;
  height: auto;
  pointer-events: none;
  opacity: 0.72;
}

.side-promo__link {
  display: inline-block;
  line-height: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.side-promo__link:hover {
  transform: translateX(-2px);
}

.side-promo:hover {
  opacity: 0.88;
}

.side-promo__link img {
  display: block;
  width: auto;
  height: min(46vh, 360px);
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 140px);
  min-height: 180px;
  display: block;
  object-fit: contain;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 12px;
  backdrop-filter: blur(18px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
  overflow: visible;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.brand-name {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.header-banner {
  flex: 1 1 360px;
  display: flex;
  justify-content: center;
  min-width: 180px;
  max-width: 460px;
  padding: 0 10px;
}

.header-banner img {
  width: 100%;
  height: 54px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.nav-link,
.nav-link-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link {
  color: #334155;
}

.nav-link:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.nav-link-cta {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: #f7fffc;
  box-shadow: 0 16px 30px rgba(29, 78, 216, 0.22);
}

.nav-link-cta:hover,
.button-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 32px rgba(29, 78, 216, 0.24);
}

.panel,
.hero-card,
.auth-card,
.dashboard-shell,
.admin-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.hero-card,
.panel,
.auth-card,
.dashboard-shell,
.admin-card {
  border-radius: var(--radius-xl);
}

.hero-card {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.hero-layout {
  display: grid;
  gap: 8px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-metrics {
  display: grid;
  gap: 10px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 4px 0;
  max-width: none;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-card p {
  max-width: 52ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}

.hero-actions,
.button-row,
.cart-summary,
.section-head,
.cart-actions,
.table-actions,
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-actions {
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.metric-card {
  flex: 1 1 180px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: #f9fafb;
  border: 1px solid var(--line);
}

.metric-card strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.metric-card span {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.catalog-body .panel,
.catalog-body .hero-card,
.catalog-body .shelf-section,
.catalog-body .category-tile,
.catalog-body .product-card,
.catalog-body .table-wrap,
.catalog-body .summary-card,
.catalog-body .checkout-side,
.catalog-body .confirmation-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
}

.catalog-body .page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08));
  pointer-events: none;
  z-index: 0;
}

.catalog-body .page-shell > * {
  position: relative;
  z-index: 1;
}

.catalog-body .shelf-section,
.catalog-body .catalog-panel {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.catalog-body .category-track {
  padding: 4px 2px 6px;
}

.catalog-body .category-tile:hover,
.catalog-body .category-tile.is-active,
.catalog-body .product-card:hover {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.catalog-body .shelf-header h2,
.catalog-body .catalog-header h1,
.catalog-body .hero-card h1 {
  color: #0f172a;
}

.catalog-body .shelf-header p,
.catalog-body .catalog-summary,
.catalog-body .hero-card p {
  color: #475569;
}

.panel,
.auth-card,
.dashboard-shell,
.admin-card {
  padding: clamp(14px, 1.8vw, 18px);
}

.page-stack,
.form-grid,
.admin-stack,
.detail-stack {
  display: grid;
  gap: 12px;
}

.section-head {
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-head h1,
.section-head h2,
.panel h1,
.panel h2,
.auth-card h1,
.admin-card h1 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-head p,
.panel-intro,
.admin-heading p,
.auth-subtitle {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.button,
button,
.ghost-button,
.button-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button,
button {
  background: linear-gradient(135deg, var(--brand), #d29b5c);
  color: #fffaf3;
  box-shadow: 0 14px 30px rgba(183, 121, 46, 0.22);
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(183, 121, 46, 0.28);
}

.button-secondary,
.ghost-button {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  border: 1px solid rgba(63, 41, 27, 0.1);
  box-shadow: none;
}

.button-secondary:hover,
.ghost-button:hover {
  background: #fff;
}

.button-whatsapp {
  background: linear-gradient(135deg, #26d366, #128c7e);
  color: #fbfffd;
  box-shadow: 0 18px 30px rgba(18, 140, 126, 0.22);
}

.button-block {
  width: 100%;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.notice.success {
  background: rgba(18, 140, 126, 0.1);
  border-color: rgba(18, 140, 126, 0.18);
  color: #0e6f64;
}

.notice.error {
  background: rgba(179, 70, 70, 0.1);
  border-color: rgba(179, 70, 70, 0.18);
  color: #923a3a;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(63, 41, 27, 0.09);
  color: var(--text-soft);
  font-weight: 700;
}

.chip.active,
.chip:hover {
  color: var(--brand-strong);
  border-color: rgba(183, 121, 46, 0.28);
  background: rgba(242, 225, 202, 0.8);
}

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

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(22, 163, 74, 0.18);
}

.product-media {
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}

.product-media img,
.product-detail-image {
  width: 100%;
  height: 132px;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-soft);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.product-copy {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.66rem;
  flex-wrap: wrap;
}

.product-copy h3 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  min-height: 1.95em;
}

.product-copy h3 a:hover {
  color: var(--brand-strong);
}

.product-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 0.82rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.price-note {
  display: block;
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 0.63rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card form,
.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.product-card form .button {
  min-width: 74px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  box-shadow: none;
}

.product-placeholder {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 10px;
  color: #94a3b8;
  text-align: center;
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-size: 0.72rem;
  position: relative;
  overflow: hidden;
}

.product-placeholder::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.95));
  box-shadow: inset 0 -10px 18px rgba(148, 163, 184, 0.08);
}

.product-placeholder::after {
  content: "";
  position: absolute;
  bottom: 22px;
  width: 58%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.product-placeholder.large {
  min-height: 360px;
}

.muted {
  color: var(--text-soft);
}

.catalog-header,
.cart-header,
.checkout-header,
.admin-heading {
  display: grid;
  gap: 8px;
}

.catalog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.catalog-summary strong {
  color: var(--text);
}

.product-detail {
  display: grid;
  gap: 26px;
}

.product-detail-panel {
  padding: 0;
  overflow: hidden;
}

.product-detail-layout {
  display: grid;
  gap: 0;
}

.product-detail-media {
  position: relative;
  padding: 12px;
  background: #f8fafc;
}

.product-detail-media .product-detail-image,
.product-detail-media .product-placeholder {
  border-radius: 24px;
}

.product-detail-copy {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-description {
  color: var(--text-soft);
  line-height: 1.75;
}

.quantity-input,
.table input[type="number"],
.inline-form input[type="number"] {
  width: 84px;
  text-align: center;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(63, 41, 27, 0.08);
  background: rgba(255, 255, 255, 0.4);
}

.table th,
.table td {
  padding: 16px;
  border-bottom: 1px solid rgba(63, 41, 27, 0.08);
  text-align: left;
}

.table th {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.line-item-title {
  font-weight: 700;
}

.form-grid label,
.field-group {
  display: grid;
  gap: 8px;
}

.table input,
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(63, 41, 27, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-grid textarea {
  min-height: 138px;
  padding: 14px;
  resize: vertical;
}

.table input:focus,
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  border-color: rgba(183, 121, 46, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 121, 46, 0.12);
  background: #fff;
}

.field-hint {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.narrow {
  max-width: 840px;
  margin: 0 auto;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
}

.cart-layout,
.checkout-layout,
.confirmation-layout {
  display: grid;
  gap: 22px;
}

.summary-card,
.checkout-side,
.confirmation-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(63, 41, 27, 0.09);
  background: rgba(255, 255, 255, 0.58);
}

.summary-card h2,
.checkout-side h2,
.confirmation-card h2 {
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  color: var(--text-soft);
}

.summary-row strong,
.summary-total {
  color: var(--text);
}

.summary-total {
  font-size: 1.45rem;
  font-weight: 800;
}

.checkout-side ul,
.confirmation-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.7;
}

.checkout-submit {
  display: grid;
  gap: 12px;
}

.checkout-submit .button-whatsapp {
  width: 100%;
}

.admin-body {
  margin: 0;
  min-height: 100vh;
  background: #f3f4f6;
  color: #111827;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px 18px;
  border-right: 1px solid #e5e7eb;
  background: #ffffff;
}

.admin-sidebar::after {
  display: none;
}

.admin-brand {
  display: grid;
  gap: 10px;
  padding: 4px 2px 8px;
}

.admin-brand .brand-mark {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: none;
}

.admin-brand h1 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
}

.admin-brand p {
  margin: 0;
  color: #6b7280;
  line-height: 1.5;
  font-size: 0.9rem;
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  color: #111827;
  background: #f3f4f6;
  transform: none;
}

.admin-main {
  padding: 22px;
}

.dashboard-shell {
  background: transparent;
  color: #111827;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.category-rail {
  display: grid;
  gap: 6px;
}

.category-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  align-items: stretch;
}

.category-track::-webkit-scrollbar {
  height: 8px;
}

.category-track::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.28);
  border-radius: 999px;
}

.category-tile {
  flex: 0 0 104px;
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: start;
  min-height: 92px;
  padding: 8px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.category-tile:hover,
.category-tile.is-active {
  border-color: rgba(22, 163, 74, 0.28);
  box-shadow: var(--shadow-md);
}

.category-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.category-name {
  width: 100%;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.category-count {
  color: var(--text-soft);
  font-size: 0.6rem;
  line-height: 1.2;
}

.shelf-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.shelf-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.shelf-header h2,
.shelf-header h3 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
}

.shelf-header p {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.catalog-panel {
  background: #ffffff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.stat-card span {
  color: var(--text-soft);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-badge.is-active {
  background: rgba(18, 140, 126, 0.12);
  color: #0e6f64;
}

.status-badge.is-inactive {
  background: rgba(179, 70, 70, 0.12);
  color: #963a3a;
}

.link-button,
.text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-strong);
  font-weight: 700;
  box-shadow: none;
}

.link-button:hover,
.text-link:hover {
  color: var(--text);
  transform: none;
}

.link-button.danger {
  color: var(--danger);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

.preview-thumb {
  width: 160px;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f3f4f6;
}

.auth-card {
  width: min(480px, 100%);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.auth-card .button {
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 12px 0;
  color: var(--text-soft);
}

.spaced-top {
  margin-top: 18px;
}

.admin-body .panel,
.admin-body .summary-card,
.admin-body .checkout-side,
.admin-body .confirmation-card,
.auth-body .auth-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.admin-body .panel h1,
.admin-body .panel h2,
.admin-body .admin-heading h1,
.auth-body .auth-card h1 {
  color: #111827;
}

.admin-body .panel-intro,
.admin-body .admin-heading p,
.auth-body .auth-subtitle {
  color: #6b7280;
}

.admin-body .table-wrap {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 14px;
}

.admin-body .table th,
.admin-body .table td {
  border-bottom: 1px solid #f1f5f9;
  color: #111827;
}

.admin-body .table th {
  background: #f9fafb;
  color: #6b7280;
}

.admin-body .line-item-title {
  color: #111827;
}

.admin-body .button,
.auth-body .button {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;
  box-shadow: none;
}

.admin-body .button:hover,
.auth-body .button:hover {
  box-shadow: none;
}

.admin-body .text-link,
.admin-body .link-button {
  color: #166534;
}

.admin-body .link-button.danger {
  color: #b91c1c;
}

.admin-body .form-grid label,
.auth-body .form-grid label {
  color: #374151;
  font-weight: 600;
}

.admin-body .form-grid input,
.admin-body .form-grid textarea,
.admin-body .form-grid select,
.auth-body .form-grid input,
.auth-body .form-grid textarea,
.auth-body .form-grid select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #111827;
}

.admin-body .form-grid input:focus,
.admin-body .form-grid textarea:focus,
.admin-body .form-grid select:focus,
.auth-body .form-grid input:focus,
.auth-body .form-grid textarea:focus,
.auth-body .form-grid select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.admin-body .status-badge.is-active {
  background: #dcfce7;
  color: #166534;
}

.admin-body .status-badge.is-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.settings-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.qr-panel {
  display: grid;
  gap: 14px;
}

.qr-panel-head {
  display: grid;
  gap: 6px;
}

.qr-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.qr-panel-head p {
  margin: 0;
  color: #6b7280;
  line-height: 1.5;
}

.store-qr-card {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 22px 22px 0;
  border-radius: 28px;
  border: 1px solid #dbe4f3;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.1), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 72%, #f0f7ff 100%);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.store-qr-card__brand {
  justify-content: center;
  padding-bottom: 12px;
}

.store-qr-card__logo {
  width: min(100%, 250px);
  height: auto;
  object-fit: contain;
}

.store-qr-card__qr-wrap {
  display: grid;
  place-items: center;
  padding: 10px 0 18px;
}

.store-qr-card__qr {
  display: grid;
  place-items: center;
  width: 272px;
  min-height: 272px;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #dbe4f3;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.store-qr-card__qr img {
  width: 100%;
  height: auto;
}

.store-qr-card__qr canvas,
.store-qr-card__qr svg {
  width: 100%;
  height: auto;
}

.store-qr-card__cta {
  padding: 0 10px 20px;
  color: #1741a6;
  text-align: center;
  font-size: clamp(1.55rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.store-qr-card__footer {
  margin: 0 -22px;
  display: grid;
  gap: 8px;
  padding: 18px 22px 20px;
  background: linear-gradient(180deg, #0f2f8a 0%, #10286d 100%);
  color: #eff6ff;
  text-align: center;
}

.store-qr-card__footer span {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.store-qr-card__footer small {
  display: block;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(239, 246, 255, 0.85);
}

.qr-actions {
  display: grid;
  gap: 12px;
}

.qr-actions input[readonly] {
  color: #4b5563;
  background: #f9fafb;
}

@media (min-width: 720px) {
  .hero-layout,
  .cart-layout,
  .checkout-layout,
  .confirmation-layout,
  .product-detail-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

  .product-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  }

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

@media (min-width: 920px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  }
}

@media (max-width: 920px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-media img,
  .product-placeholder {
    height: 126px;
    min-height: 126px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .header-banner {
    max-width: 320px;
  }

  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .store-qr-card {
    width: 100%;
  }

  .side-promo,
  .side-promo__link,
  .side-promo__link img {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .site-header,
  .header-row,
  .brand,
  .brand-copy,
  .nav {
    min-height: 0;
    height: auto;
  }
}

@media (max-width: 719px) {
  .catalog-body {
    background:
      linear-gradient(180deg, rgba(246, 248, 252, 0.58), rgba(239, 244, 249, 0.64)),
      url("../images/catalog-background.png") center top / cover no-repeat;
  }

  .catalog-body::before {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(245, 247, 250, 0.42));
  }

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

  .product-media img,
  .product-placeholder {
    height: 120px;
    min-height: 120px;
  }

  .header-row,
  .hero-actions,
  .section-head,
  .cart-actions,
  .button-row,
  .cart-summary,
  .table-actions,
  .admin-topbar {
    align-items: stretch;
  }

  .site-header {
    position: relative;
    top: auto;
    padding-top: 6px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .header-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .brand {
    width: 100%;
    gap: 8px;
    align-items: center;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
  }

  .brand-kicker {
    font-size: 0.56rem;
    letter-spacing: 0.04em;
    margin-bottom: 0;
  }

  .brand-kicker::before {
    width: 10px;
  }

  .brand-name {
    font-size: 0.82rem;
    line-height: 1.05;
    white-space: normal;
  }

  .nav {
    width: 100%;
    justify-content: stretch;
    gap: 6px;
  }

  .header-banner {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .nav-link,
  .nav-link-cta {
    flex: 1 1 0;
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.78rem;
    border-radius: 999px;
  }

  .container {
    width: min(100% - 20px, 1180px);
  }

  .page-shell {
    padding-top: 8px;
  }

  .hero-card {
    padding: 12px;
  }

  .hero-card h1 {
    font-size: 0.98rem;
  }

  .hero-card p {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .hero-badge {
    font-size: 0.58rem;
    padding: 4px 8px;
  }

  .hero-actions {
    margin-top: 10px;
    gap: 10px;
  }

  .hero-actions .button,
  .hero-actions .ghost-button {
    width: 100%;
    min-height: 42px;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .metric-card {
    padding: 10px;
  }

  .category-track {
    gap: 6px;
  }

  .product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card form .button,
  .inline-form .button {
    width: 100%;
  }

  .category-tile {
    flex-basis: 96px;
    min-height: 86px;
  }
}

@media print {
  body.printing-qr * {
    visibility: hidden !important;
  }

  body.printing-qr .store-qr-card,
  body.printing-qr .store-qr-card * {
    visibility: visible !important;
  }

  body.printing-qr .store-qr-card {
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
    width: 92mm;
    margin: 0;
    box-shadow: none;
    break-inside: avoid;
  }

  body.printing-qr {
    background: #ffffff;
  }

  @page {
    size: auto;
    margin: 10mm;
  }
}

.printing-qr-popup {
  margin: 0;
  padding: 24px;
  background: #ffffff;
}

.print-shell {
  display: grid;
  place-items: start center;
}

.printing-qr-popup .store-qr-card {
  width: 92mm;
  margin: 0;
  box-shadow: none;
}
