:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eef4ec;
  --text: #18211c;
  --muted: #667168;
  --line: #d9e0d8;
  --accent: #1d7a46;
  --accent-dark: #155c35;
  --warning: #a15c12;
  --danger: #b3261e;
  --shadow: 0 14px 40px rgba(24, 33, 28, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #111b15;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1,
.brand p,
.hero h2,
.hero p,
.section-head h2,
.section-head p,
.admin-form h3,
.cart-head h2,
.cart-head p {
  margin: 0;
}

.brand h1 {
  font-size: 1.18rem;
  letter-spacing: 0;
}

.brand p,
.section-head p,
.cart-head p,
.hero p {
  color: var(--muted);
}

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

.phone-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #f7f8f7;
  color: var(--text);
  font-weight: 800;
}

.role-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
}

.role-switcher h2,
.role-switcher p {
  margin: 0;
}

.role-switcher p {
  color: var(--muted);
}

.role-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.eyebrow.dark {
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.ghost-button,
.secondary-button,
.primary-button,
.cart-button,
.icon-button,
.whatsapp-button,
.direct-whatsapp {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.ghost-button.active,
.whatsapp-button,
.direct-whatsapp {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary-button,
.cart-button {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

.primary-button:hover,
.cart-button:hover,
.whatsapp-button:hover,
.direct-whatsapp:hover {
  background: var(--accent-dark);
}

.whatsapp-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.whatsapp-icon::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.whatsapp-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(16deg);
}

.whatsapp-only {
  width: 46px;
  padding: 0;
  flex: 0 0 46px;
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: var(--accent);
}

button:disabled,
.secondary-button:disabled,
.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

a.disabled {
  pointer-events: none;
}

.cart-button span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.minimum-banner {
  position: sticky;
  top: 85px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f7;
  color: var(--text);
  font-weight: 800;
}

.hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 20px;
  align-items: end;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(14, 35, 24, 0.88), rgba(14, 35, 24, 0.54)),
    url("https://images.unsplash.com/photo-1601599963565-b7ba29c8e47a?auto=format&fit=crop&w=1600&q=80") center/cover;
  color: #fff;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 800;
  color: #b7f0c9;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
  max-width: 760px;
}

.hero p {
  margin-top: 16px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.hero-panel strong {
  display: block;
  font-size: 2rem;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.8);
}

.content-view {
  padding-top: 32px;
}

.management-shell {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
}

.management-shell h2,
.management-shell p {
  margin: 0;
}

.management-shell p {
  color: var(--muted);
}

.management-tabs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.admin-section-switch .ghost-button {
  border-width: 2px;
  font-weight: 900;
}

.management-access {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.management-access span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.management-access div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hidden {
  display: none !important;
}

.private-management-mode main {
  width: min(1180px, calc(100% - 32px));
}

html[data-private-management="true"] .public-catalog-header,
html[data-private-management="true"] .public-catalog-header + .minimum-banner,
.private-management-mode .public-catalog-header,
.private-management-mode .public-catalog-header + .minimum-banner {
  display: none !important;
}

html[data-private-management="true"] .floating-cart-button,
.private-management-mode .floating-cart-button {
  display: none !important;
}

html[data-private-management="true"] body.internal-catalog-cart-mode .floating-cart-button,
.private-management-mode.internal-catalog-cart-mode .floating-cart-button {
  display: inline-flex !important;
}

.admin-private-nav {
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
}

.admin-private-nav div {
  display: grid;
  gap: 0;
}

.admin-private-nav strong {
  font-size: 1rem;
  line-height: 1.05;
}

.admin-private-nav span {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.05;
}

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

.admin-catalog-preview #catalogView {
  padding-top: 24px;
}

.admin-return-button {
  white-space: nowrap;
}

.internal-login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.internal-login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(24, 33, 28, 0.12);
}

.internal-login-card h2,
.internal-login-card p {
  margin: 0;
}

.login-brand {
  width: 54px;
  height: 54px;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #efb8b8;
  border-radius: 8px;
  background: #fff1f1;
  color: #9b1c1c;
  font-weight: 800;
}

.login-error.login-success {
  border-color: #b8d8c0;
  background: #effaf2;
  color: #176b32;
}

.login-help {
  color: var(--muted);
  line-height: 1.45;
}

.login-link-button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.login-link-button:hover,
.login-link-button:focus-visible {
  color: var(--ink);
}

.password-field span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.password-toggle {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}


.security-section {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.security-section:first-of-type {
  margin-top: 0;
}

.security-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.security-section-head h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 1rem;
}

.security-password-grid {
  grid-template-columns: minmax(0, 1fr);
}

.security-devices-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .security-devices-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.security-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 900px) {
  .security-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .security-panel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.security-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.security-card h3 {
  margin: 0;
}
.security-password-card {
  align-content: start;
}

.security-password-form {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.security-password-form + .security-password-form {
  margin-top: 10px;
}

.security-password-form strong {
  color: var(--ink);
}

.security-password-form label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-weight: 700;
}

.security-password-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}


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

.security-device-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.security-device-row strong,
.security-device-row span,
.security-device-row small {
  overflow-wrap: anywhere;
}

.security-device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-lock {
  display: none !important;
}

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

.section-head h2 {
  font-size: 1.6rem;
}

.search-box {
  min-width: min(420px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.search-box input {
  min-height: 48px;
  border-width: 2px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(24, 33, 28, 0.05);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(29, 122, 70, 0.24);
  border-color: var(--accent);
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.desktop-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-category-menu {
  display: none;
}

.category-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.category-row button.active {
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--accent-dark);
}

.button-label-short {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 18px;
}

.product-card {
  height: 560px;
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(24, 33, 28, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  display: grid;
  grid-template-rows: 330px 1fr;
}

.product-card:hover {
  border-color: rgba(74, 122, 62, 0.38);
  box-shadow: 0 12px 30px rgba(24, 33, 28, 0.08);
}

.product-image {
  width: 100%;
  height: 330px;
  object-fit: contain;
  object-position: center;
  display: block;
  box-sizing: border-box;
  padding: 12px;
  background: #fff;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 0;
  overflow: visible;
}

.tag {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-2);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-title {
  height: 88px;
  font-size: 1.12rem;
  font-weight: 950;
  line-height: 1.22;
  color: var(--text);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.product-title-row .product-title {
  min-width: 0;
}


.brand-line {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.brand-line strong {
  color: var(--text);
}

.variant-select-row {
  display: grid;
  height: 66px;
  gap: 6px;
  color: var(--text);
  font-weight: 900;
  font-size: 0.9rem;
  min-width: 0;
}

.variant-placeholder {
  height: 66px;
}

.variant-select-row select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  min-width: 0;
  border: 1px solid rgba(74, 122, 62, 0.35);
  border-radius: 8px;
  padding: 8px 34px 8px 10px;
  background: #fbfdf9;
  color: var(--text);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presentation-box {
  height: 66px;
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(74, 122, 62, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfdf9;
  min-width: 0;
}

.presentation-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.presentation-box strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details-toggle {
  justify-self: start;
  min-height: 28px;
  padding: 0;
}

.catalog-details {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfbfa;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.catalog-details ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.catalog-details p {
  margin: 0;
}

.product-card .stock-row.client-hidden {
  display: none;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.pack-price {
  display: grid;
  gap: 6px;
  min-height: 84px;
  align-content: center;
  overflow: hidden;
}

.pack-main-price {
  color: var(--accent-dark);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1.1;
}

.pack-unit-price {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.pack-sale-detail {
  display: grid;
  gap: 2px;
  min-height: 36px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

.quantity-row {
  margin-top: auto;
  display: grid;
  grid-template-columns: 104px 1fr;
  grid-template-rows: 42px 48px;
  gap: 10px;
  align-items: stretch;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
}

.quantity-row label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.quantity-row input {
  min-width: 0;
  height: 42px;
  min-height: 42px;
}

.quantity-row .primary-button {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  min-height: 46px;
  height: 46px;
}

.catalog-card-total {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f5f7f2;
  color: var(--muted);
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
}

.catalog-card-total strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-input {
  max-width: 110px;
  min-height: 36px;
}

.wide-input {
  max-width: 190px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.add-product-button {
  justify-self: start;
  min-height: 46px;
  padding-inline: 18px;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 8px 24px rgba(21, 92, 53, 0.18);
}

.product-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.internal-product-toolbar {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.05);
}

.internal-product-toolbar .category-row {
  flex-wrap: wrap;
  overflow: visible;
}

.internal-product-toolbar .category-row button {
  flex: 0 0 auto;
}

.internal-search {
  max-width: 520px;
}

.category-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: grid;
  place-items: center;
  background: rgba(18, 28, 23, 0.56);
  padding: 18px;
}

.category-modal {
  display: grid;
  gap: 12px;
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(18, 28, 23, 0.28);
  padding: 16px;
}

.category-add-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}

.category-add-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

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

.category-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
}

.category-manager-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.toolbar-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-row button span {
  color: inherit;
  opacity: 0.72;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-form,
.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
}

.admin-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.form-section {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.form-section legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.admin-form small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.image-preview-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7f8f7;
}

.image-preview-box img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #f1f2f3;
}

.image-preview-box p,
.image-preview-box span {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.full-field {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.variant-editor {
  display: grid;
  gap: 10px;
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(110px, 0.9fr) minmax(120px, 0.9fr) minmax(110px, 0.9fr) minmax(95px, 0.8fr) minmax(110px, 0.9fr) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f7f8f7;
}

.context-line,
.variant-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.variant-summary {
  display: grid;
  gap: 4px;
  min-width: 260px;
}

.inline-labeled {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-table-wrap {
  overflow: auto;
  max-height: 68vh;
}

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

.table-caption strong {
  font-size: 1rem;
}

.table-caption span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8f7;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-table tbody tr {
  transition: background-color 0.16s ease;
}

.admin-table tbody tr:hover {
  background: #f8fbf6;
}

.admin-table tbody tr.row-missing-price {
  background: #fffdf6;
}

.admin-table tbody tr.row-zero-stock {
  box-shadow: inset 3px 0 0 rgba(224, 184, 88, 0.45);
}

.admin-table tbody tr.row-missing-price.row-zero-stock {
  background: #fffaf3;
}

.table-sort-button {
  width: 100%;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  font-weight: 950;
  cursor: pointer;
}

.table-sort-button.active {
  color: var(--accent-dark);
}

.metric-cell {
  font-weight: 800;
  white-space: nowrap;
}

.price-column,
.stock-column,
.edit-column {
  vertical-align: middle;
}

.price-column {
  text-align: right;
}

th .table-sort-button[data-sort-products="price"],
th .table-sort-button[data-sort-products="stock"] {
  text-align: center;
}

.stock-column,
.edit-column {
  text-align: center;
}

.missing-price {
  color: var(--danger);
  font-weight: 950;
}

.inline-edit-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 850;
  padding: 6px 8px;
}

.inline-edit-input:hover,
.inline-edit-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(93, 138, 84, 0.13);
}

.price-inline-input {
  text-align: right;
}

.image-upload-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 54px;
  padding: 5px;
}

.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  object-fit: cover;
  background: #eef1ed;
}

.no-photo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 34px;
  border-radius: 8px;
  background: #f3f5f2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.muted-cell {
  color: var(--muted);
  font-weight: 700;
}

.compact-select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  background: #f5f7f2;
  padding: 4px 9px;
  color: var(--text);
  font-weight: 900;
}

.small-file-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.small-file-button input {
  display: none;
}

.stock-table {
  min-width: 1120px;
}

.clients-table {
  min-width: 980px;
}

.admin-table tr.selected-row {
  background: #f1f7ee;
}

.client-detail-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(24, 33, 28, 0.08);
}

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

.client-detail-head h3 {
  margin: 3px 0;
  font-size: 1.45rem;
}

.client-detail-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.client-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.client-panel h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  text-transform: uppercase;
}

.client-data-list,
.client-summary-grid {
  display: grid;
  gap: 8px;
}

.client-data-list span,
.client-summary-grid span {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(221, 226, 218, 0.85);
}

.client-data-list em,
.client-summary-grid em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-data-list strong,
.client-summary-grid strong {
  color: var(--text);
  font-size: 0.98rem;
}

.client-summary-panel .client-summary-grid span:last-child {
  background: #eef7eb;
  border-color: rgba(29, 122, 70, 0.24);
}

.client-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.client-edit-form .wide-field {
  grid-column: 1 / -1;
}

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

.client-history-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(140px, 0.9fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-history-row span {
  color: var(--muted);
  font-weight: 800;
}

.client-actions-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.stock-adjust {
  display: flex;
  gap: 6px;
  align-items: center;
}

.stock-adjust.compact {
  align-items: end;
  flex-wrap: wrap;
}

.stock-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  white-space: nowrap;
  width: 100%;
}

.stock-button,
.edit-product-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.stock-button:hover,
.edit-product-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-decoration: underline;
}

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

.stock-history {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.stock-history span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.import-planner {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
}

.section-head.compact {
  align-items: center;
  margin-bottom: 0;
}

.section-head.compact h2,
.section-head.compact h3,
.section-head.compact p {
  margin: 0;
}

.section-head.compact h2,
.section-head.compact h3 {
  font-size: 1.15rem;
}

.section-head.compact p {
  color: var(--muted);
}

.template-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-columns span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #f7f8f7;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 800;
}

.template-example {
  overflow-x: auto;
  border-radius: 8px;
  padding: 12px;
  background: #f7f8f7;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.is-hidden-product {
  background: #fafafa;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.small-button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-weight: 800;
  font-size: 0.8rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pill.visible {
  background: #e9f6ee;
  color: var(--accent-dark);
}

.status-pill.hidden-product {
  background: #f2f2f2;
  color: var(--muted);
}

.status-en-revision {
  background: #fff7df;
  color: #7a5200;
  border-color: #f0cf77;
}

.status-pendiente {
  background: #fff7df;
  color: #7a5200;
  border-color: #f0cf77;
}

.status-presupuesto-enviado {
  background: #eff6de;
  color: #58702d;
  border-color: #bacf83;
}

.status-pendiente-de-pago {
  background: #fff3d9;
  color: #865500;
  border-color: #edc36b;
}

.status-pagado {
  background: #e9f6ee;
  color: #17633a;
  border-color: #8ec7a2;
}

.status-entregado {
  background: #e8f4ff;
  color: #1c5f91;
  border-color: #94c5eb;
}

.status-confirmado {
  background: #eaf1ff;
  color: #1d4f91;
  border-color: #9bbcf0;
}

.status-cancelado {
  background: #fdecec;
  color: #9f1d1d;
  border-color: #ef9a9a;
}

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

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0;
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
  overflow: hidden;
  border-left: 5px solid #cbd5e1;
  transition: opacity 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.order-card.order-dimmed {
  opacity: 0.48;
  filter: grayscale(0.18);
  box-shadow: none;
}

.order-card.order-dimmed:hover {
  opacity: 0.72;
}

.order-card.confirmed {
  border-color: rgba(29, 122, 70, 0.45);
  background: linear-gradient(0deg, rgba(238, 244, 236, 0.65), #fff);
}

.order-kind-consultation {
  border-left-color: #94a3b8;
}

.order-status-en-revision {
  border-left-color: #d69e2e;
  background: linear-gradient(90deg, rgba(255, 247, 223, 0.58), #fff 34%);
}

.order-status-pendiente {
  border-left-color: #d69e2e;
  background: linear-gradient(90deg, rgba(255, 247, 223, 0.58), #fff 34%);
}

.order-status-presupuesto-enviado {
  border-left-color: #7c9f48;
  background: linear-gradient(90deg, rgba(239, 246, 222, 0.64), #fff 34%);
}

.order-status-pendiente-de-pago {
  border-left-color: #d69e2e;
  background: linear-gradient(90deg, rgba(255, 243, 217, 0.6), #fff 34%);
}

.order-status-pagado {
  border-left-color: #2f8f55;
  background: linear-gradient(90deg, rgba(233, 246, 238, 0.68), #fff 34%);
}

.order-status-entregado {
  border-left-color: #2676a8;
  background: linear-gradient(90deg, rgba(232, 244, 255, 0.68), #fff 34%);
}

.order-status-confirmado {
  border-left-color: #2d67b2;
  background: linear-gradient(90deg, rgba(234, 241, 255, 0.68), #fff 34%);
}

.order-status-cancelado {
  border-left-color: #c53030;
  background: linear-gradient(90deg, rgba(253, 236, 236, 0.72), #fff 34%);
}

.order-card:has(.order-detail[open]) > .order-head {
  display: none;
}

.order-card > .order-detail:not([open]) {
  display: none;
}

.order-workspace {
  border-left-width: 6px;
  box-shadow: 0 10px 30px rgba(24, 33, 28, 0.08);
}

.order-workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
}

.order-workspace > .order-detail {
  padding: 18px;
}

.order-workspace > .order-detail > summary {
  display: none;
}

.order-workspace .order-detail-head,
.order-workspace .budget-product-search,
.order-workspace .budget-items,
.order-workspace .order-bottom-grid,
.order-workspace .order-actions {
  margin-top: 18px;
}

.order-workspace .order-detail-head {
  margin-top: 0;
}

.order-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
}

.order-head strong,
.order-head span {
  display: block;
}

.order-main-data {
  display: grid;
  grid-template-columns: minmax(135px, 0.8fr) minmax(160px, 1fr) minmax(135px, 0.8fr) minmax(130px, 0.8fr) minmax(120px, 0.7fr) minmax(160px, 0.9fr);
  gap: 8px 12px;
  align-items: center;
}

.order-main-data strong {
  color: var(--text);
}

.order-main-data b {
  color: var(--text);
}

.order-summary {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
  align-content: center;
  min-width: 110px;
}

.order-head span,
.order-card li {
  color: var(--muted);
}

.order-card ul {
  margin: 0;
  padding-left: 18px;
}

.order-number {
  font-size: 1rem;
  color: var(--text);
}

.order-type-label {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f5f1;
  color: var(--muted);
  font-weight: 900;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.customer-highlight {
  min-height: 34px;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f7faf5;
  color: var(--text) !important;
  font-weight: 900;
}

.inline-status-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

.inline-status-label select {
  min-height: 34px;
  min-width: 178px;
  padding: 6px 9px;
  border-radius: 8px;
}

.order-detail {
  padding: 0 14px 14px;
}

.order-detail summary {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.order-detail[open] summary {
  margin-bottom: 10px;
  border-color: var(--accent);
  color: var(--accent-dark);
}

.order-detail-head {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.order-detail-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.order-detail-head strong,
.order-detail-head span {
  display: block;
}

.order-detail-head span {
  color: var(--muted);
  font-weight: 700;
}

.order-id-block {
  display: grid;
  align-content: start;
  gap: 3px;
}

.customer-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.customer-edit-grid label,
.checkout-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.budget-product-search,
.budget-search-results,
.budget-item {
  display: grid;
  gap: 10px;
}

.budget-product-search {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.budget-product-search label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
}

.budget-product-search input {
  min-height: 36px;
  padding: 8px 10px;
}

.budget-product-search input::placeholder {
  color: #8b978d;
  font-weight: 700;
}

.budget-search-results {
  gap: 6px;
}

.budget-search-result {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.budget-search-result:hover {
  border-color: var(--accent);
  background: #f7fbf6;
}

.budget-search-result span,
.search-empty {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.budget-items {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.budget-section-title {
  margin: 20px 0 0;
  color: var(--text);
  font-size: 1rem;
}

.order-workspace .budget-section-title:first-of-type {
  margin-top: 0;
}

.budget-item {
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, 0.9fr) 86px 120px 120px 74px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 246, 243, 0.7);
}

.budget-item-head {
  background: #eef2ea;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.budget-variant-cell {
  color: var(--text);
}

.budget-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.budget-item span {
  font-weight: 800;
}

.budget-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.budget-product-name {
  font-weight: 900;
}

.budget-field {
  display: block;
}

.icon-trash-button {
  min-width: 44px;
  padding-inline: 8px;
  font-size: 1rem;
}

@media (max-width: 1120px) {
  .order-main-data {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

.checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.checkout-main-field {
  min-width: 0;
}

.discount-control {
  grid-column: 1 / -1;
}

.conditional-delivery-field {
  grid-column: 1 / -1;
}

.discount-input-row {
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(120px, 1fr);
  gap: 8px;
}

.order-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.order-data-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.order-data-panel .budget-section-title {
  margin-top: 0;
}

.order-total-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.order-total-box.economic-summary {
  width: 100%;
  margin-left: auto;
  background: linear-gradient(180deg, #fbfdf9, #f1f8ee);
  border-color: rgba(29, 122, 70, 0.28);
  box-shadow: 0 12px 28px rgba(32, 92, 50, 0.1);
}

.order-total-box.economic-summary .final-total-line strong {
  color: var(--accent-dark);
  font-size: 1.95rem;
  font-weight: 950;
}

.summary-box-title {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(29, 122, 70, 0.18);
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
}

.order-total-box span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.order-total-box em {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
}

.order-total-box strong {
  color: var(--text);
  font-size: 1rem;
}

.order-total-box.economic-summary strong {
  text-align: right;
}

.order-total-box .final-total-line {
  margin-top: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #e7f3e2;
}

.budget-preview {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(29, 122, 70, 0.35);
  border-radius: 8px;
  background: #fcfdfb;
}

.budget-preview-head {
  display: grid;
  gap: 3px;
}

.budget-preview-head span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.budget-preview pre {
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.order-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.order-actions button {
  width: 100%;
  min-height: 42px;
}

.order-actions .order-primary-action {
  min-height: 46px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(32, 92, 50, 0.14);
}

.order-actions .order-secondary-action {
  border-color: #d8ded6;
  background: #fbfcfb;
  color: #3f4b42;
  font-weight: 850;
  box-shadow: none;
}

.order-actions .order-secondary-action:hover {
  border-color: #bfc9bd;
  background: #f5f7f4;
}

.report-grid {
  display: grid;
  gap: 20px;
}

.executive-report-section,
.report-section,
.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 6px 24px rgba(24, 33, 28, 0.06);
}

.executive-report-section {
  display: grid;
  gap: 16px;
}

.executive-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.executive-section-head span {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.executive-section-head strong {
  display: block;
  color: var(--text);
  font-size: 1.15rem;
}

.executive-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.executive-card-grid.three-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.executive-card {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 18px;
}

.executive-card.highlight {
  background: linear-gradient(180deg, #f5fbf2, #eaf5e5);
  border-color: rgba(29, 122, 70, 0.26);
}

.executive-card span,
.executive-product-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-card strong {
  color: var(--text);
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.05;
}

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

.report-period-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
}

.report-period-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-period-controls input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.stock-movement-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.stock-movement-filters .active {
  border-color: var(--accent-dark);
  background: #f0f7ed;
  color: var(--accent-dark);
}

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

.stock-movement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.stock-movement-row.entrada {
  border-left-color: var(--accent);
}

.stock-movement-row.salida {
  border-left-color: var(--danger);
}

.stock-movement-row div {
  display: grid;
  gap: 3px;
}

.stock-movement-row div:last-child {
  text-align: right;
}

.stock-movement-row span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.stock-movement-row b {
  color: var(--text);
  font-size: 0.98rem;
}

.executive-product-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px 12px;
}

.executive-product-row span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #eaf4e7;
  color: var(--accent-dark);
  font-weight: 950;
}

.executive-product-row strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-product-row em {
  font-style: normal;
  text-align: right;
}

.report-section h3,
.ranking-panel h3 {
  margin: 0 0 12px;
}

.report-card-grid,
.report-list-grid,
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.report-card span {
  color: var(--muted);
  font-weight: 700;
}

.report-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.7rem;
}

.report-list-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.report-list-card strong {
  display: block;
  margin-bottom: 10px;
}

.report-list-card ol,
.ranking-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.report-list-card li,
.ranking-list li {
  color: var(--muted);
  font-weight: 700;
}

.ranking-list li {
  padding-right: 4px;
}

.ranking-list li strong {
  float: right;
  color: var(--text);
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-button {
  min-height: 34px;
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: 8px;
  background: #fff6f5;
  color: var(--danger);
  font-weight: 800;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  justify-content: end;
  background: rgba(24, 33, 28, 0.42);
}

.cart-drawer.open {
  display: flex;
}

.print-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 24, 20, 0.52);
}

.stock-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  background: rgba(18, 28, 23, 0.56);
  padding: 20px;
}

#stockModalOverlay {
  z-index: 170;
}

.stock-movements-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.stock-movement-list-wrap {
  display: grid;
  gap: 8px;
}

.stock-modal {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(18, 28, 23, 0.28);
  padding: 20px;
}

.product-edit-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.product-create-modal {
  width: min(720px, 100%);
}

.product-edit-modal h3,
.product-create-modal h3,
.product-edit-modal h2 {
  margin: 0;
}

.product-edit-modal .eyebrow {
  margin: 0 0 4px;
}

.product-edit-modal .form-section,
.product-create-modal .form-section {
  padding: 12px;
}

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

.product-edit-grid {
  display: grid;
  gap: 10px;
}

.product-edit-modal > .product-edit-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.product-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}

.product-edit-grid label:has(#editProductName) { order: 1; }
.product-edit-grid label:has(#editProductBrand) { order: 2; }
.product-edit-grid label:has(#editProductCategory) { order: 3; }
.product-edit-grid label:has(#editProductCatalog) { order: 4; }
.product-edit-grid label:has(#editProductImage) {
  order: 5;
  grid-column: 1 / -1;
}
.product-edit-grid label:has(#editProductPresentation) { order: 6; }
.product-edit-grid label:has(#editProductCost) { order: 7; }
.product-edit-grid label:has(#editProductPrice) { order: 8; }

.product-edit-grid input,
.product-edit-grid select,
.product-edit-grid textarea,
.product-create-modal input,
.product-create-modal select,
.product-create-modal textarea,
.product-create-modal button {
  min-width: 0;
}

.input-error {
  border-color: var(--danger) !important;
  background: #fff7f6;
}

.field-error-message {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 900;
}

.variant-manage-button {
  justify-self: start;
  min-height: 42px;
  padding-inline: 18px;
  border-color: var(--accent);
  background: #f0f7ed;
  color: var(--accent-dark);
  font-weight: 950;
}

.edit-image-preview {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f7f8f7;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.edit-image-preview img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f2f3;
}

.stock-modal h2 {
  margin: 0;
  font-size: 1.28rem;
}

.stock-current-line {
  margin: 8px 0 0;
  border-radius: 8px;
  background: #f5f7f2;
  padding: 9px 10px;
  color: var(--text);
  font-weight: 900;
}

.stock-mode-options {
  display: grid;
  gap: 8px;
}

.stock-mode-options label,
.stock-modal-quantity,
.stock-modal-reason {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 800;
}

.stock-mode-options label {
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.stock-modal-quantity input,
.stock-modal-reason select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-weight: 800;
}

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

.description-modal {
  width: min(520px, 100%);
}

.description-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.description-modal-head h3 {
  margin: 0;
}

.description-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.print-preview-panel {
  width: min(920px, 100%);
  height: min(760px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(24, 33, 28, 0.24);
}

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

.print-preview-actions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-download-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f6;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.pdf-download-slot a {
  color: var(--green);
  text-decoration: none;
}

.pdf-download-slot a:hover {
  text-decoration: underline;
}

.print-preview-actions a.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.print-preview-body {
  overflow: auto;
  padding: 28px;
  background: #fff;
  color: #111;
}

.print-preview-body h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.print-preview-body h2 {
  margin: 0 0 16px;
  color: #444;
  font-size: 18px;
}

.print-preview-body p {
  margin: 5px 0;
}

.print-preview-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.print-preview-body th,
.print-preview-body td {
  padding: 9px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.print-preview-body th {
  background: #f5f5f5;
}

.print-preview-body .summary {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 2px solid #111;
}

.print-preview-body .total {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 800;
}

.print-preview-body .document-shell {
  display: grid;
  gap: 18px;
  color: #111;
}

.print-preview-body .document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid #122018;
}

.print-preview-body .document-logo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #122018;
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.print-preview-body .document-logo span {
  font-size: 11px;
}

.print-preview-body .document-header h1 {
  margin: 0 0 4px;
  text-align: right;
  text-transform: uppercase;
}

.print-preview-body .document-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.print-preview-body .document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.print-preview-body .document-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.print-preview-body .document-grid strong,
.print-preview-body .document-grid span {
  display: block;
}

.print-preview-body .document-grid strong {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.print-preview-body .document-wide {
  grid-column: 1 / -1;
}

.print-preview-body .document-totals {
  width: min(380px, 100%);
  margin-left: auto;
  display: grid;
  gap: 8px;
}

.print-preview-body .document-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.print-preview-body .document-final {
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: #eaf4e7;
}

.print-preview-body .document-final strong {
  color: var(--accent-dark);
  font-size: 1.5rem;
}

.cart-panel {
  width: min(430px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.icon-button {
  width: 40px;
  padding: 0;
  font-size: 1.2rem;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}

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

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

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

.cart-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cart-total strong {
  font-size: 1.5rem;
}

.customer-fields {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.customer-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.minimum-status {
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.minimum-status.reached {
  background: #e9f6ee;
  color: var(--accent-dark);
}

.minimum-status.pending {
  background: #fff1f0;
  color: var(--danger);
}

.cart-error {
  border: 1px solid #f3b3ab;
  border-radius: 8px;
  background: #fff8f6;
  color: var(--danger);
  padding: 10px 12px;
  font-weight: 900;
  line-height: 1.35;
}

.whatsapp-button {
  width: 100%;
  min-height: 48px;
}

.whatsapp-button.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.full {
  width: 100%;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  z-index: 20;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--accent-dark);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.site-footer div {
  display: grid;
  gap: 4px;
}

.site-footer span {
  color: var(--muted);
  font-weight: 700;
}

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

.footer-lock {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.footer-lock:hover {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .topbar,
  .section-head,
  .role-switcher,
  .admin-private-nav,
  .hero {
    align-items: stretch;
    flex-direction: column;
  }

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

  .management-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .management-tabs {
    justify-content: flex-start;
  }

  .management-access {
    justify-items: start;
  }

  .admin-private-nav nav {
    justify-content: stretch;
  }

  .admin-private-nav button {
    flex: 1;
  }

  .admin-section-switch {
    justify-content: stretch;
  }

  .admin-section-switch button {
    flex: 1;
  }

  .management-access div {
    justify-content: flex-start;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .brand {
    width: 100%;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .search-box {
    min-width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .product-card {
    height: 540px;
    grid-template-rows: 300px 1fr;
  }

  .product-image {
    height: 300px;
  }

  .hero h2 {
    font-size: 2.4rem;
  }

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

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

  .variant-row {
    grid-template-columns: 1fr 1fr;
  }

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

  .site-footer .direct-whatsapp {
    width: 100%;
  }

  .site-footer .footer-actions {
    width: 100%;
  }

  .budget-tools,
  .budget-item,
  .order-head,
  .order-main-data,
  .order-bottom-grid,
  .order-detail-head,
  .customer-edit-grid,
  .checkout-grid,
  .order-total-box {
    grid-template-columns: 1fr;
  }

  .order-summary {
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .inline-status-label,
  .inline-status-label select {
    width: 100%;
  }

}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    position: sticky;
    gap: 10px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 46px repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .top-actions button,
  .top-actions a {
    min-width: 0;
    min-height: 46px;
    padding-inline: 8px;
    white-space: nowrap;
  }

  .cart-button span {
    min-width: 22px;
    height: 22px;
  }

  .minimum-banner {
    position: static;
    line-height: 1.35;
  }

  .hero {
    min-height: 0;
  }

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

  .section-head {
    display: grid;
    align-items: stretch;
  }

  .management-shell,
  .internal-product-toolbar,
  .import-planner,
  .admin-form {
    padding: 14px;
  }

  .management-tabs,
  .management-access div,
  .product-action-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .management-tabs button,
  .management-access button,
  .product-action-bar button {
    width: 100%;
    min-height: 46px;
    padding-inline: 8px;
  }

  .internal-product-toolbar .category-row,
  .category-row {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    margin-bottom: 16px;
  }

  .internal-product-toolbar .category-row button,
  .category-row button {
    flex: 1 1 calc(50% - 8px);
    min-width: min(100%, 148px);
    min-height: 46px;
    padding: 0 10px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 6px 18px rgba(24, 33, 28, 0.06);
    overflow: hidden;
  }

  .admin-table td {
    display: grid;
    grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    word-break: break-word;
  }

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

  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .admin-table td[colspan] {
    display: block;
  }

  .admin-table td[colspan]::before {
    content: "";
    display: none;
  }

  .stock-cell,
  .stock-adjust,
  .budget-row-actions {
    justify-content: flex-start;
  }

  .stock-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .small-file-button,
  .stock-button,
  .edit-product-button,
  .compact-select,
  .catalog-status {
    min-height: 42px;
  }

  .budget-item-head {
    display: none;
  }

  .budget-item {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 10px;
  }

  .budget-item:not(.budget-item-head) > [data-label] {
    display: grid;
    grid-template-columns: minmax(106px, 36%) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .budget-item:not(.budget-item-head) > [data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .budget-item > span,
  .budget-item > strong,
  .budget-item > label,
  .budget-item > button {
    width: 100%;
    max-width: 100%;
  }

  .budget-item > label input,
  .budget-item > button {
    min-height: 44px;
  }

  .print-preview-body .document-grid {
    grid-template-columns: 1fr;
  }

  .print-preview-body .document-header,
  .print-preview-body .document-totals div {
    align-items: flex-start;
  }

  .customer-edit-grid,
  .checkout-grid,
  .order-bottom-grid,
  .order-total-box,
  .order-detail-head,
  .budget-tools {
    grid-template-columns: 1fr;
  }

  .discount-input-row {
    grid-template-columns: 1fr;
  }

  .template-example {
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ranking-grid,
  .report-card-grid,
  .report-list-grid,
  .executive-card-grid,
  .executive-card-grid.three-cards,
  .report-period-controls,
  .report-actions {
    grid-template-columns: 1fr;
  }

  .executive-section-head {
    display: grid;
    gap: 4px;
  }

  .executive-card {
    min-height: 112px;
  }

  .executive-product-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .executive-product-row em {
    grid-column: 2;
    text-align: left;
  }

  .client-detail-card {
    padding: 14px;
  }

  .client-detail-head {
    display: grid;
  }

  .client-detail-grid,
  .client-edit-form,
  .client-history-row {
    grid-template-columns: 1fr;
  }

  .client-actions-panel {
    justify-content: stretch;
  }

  .client-actions-panel > * {
    width: 100%;
  }

  .stock-modal-overlay,
  .print-preview-overlay,
  .category-modal-overlay {
    align-items: start;
    overflow: auto;
    padding: 12px;
  }

  .stock-modal,
  .category-modal,
  .print-preview-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .stock-modal-actions,
  .print-preview-actions,
  .category-add-row,
  .category-manager-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stock-modal-actions button,
  .print-preview-actions button,
  .print-preview-actions a {
    width: 100%;
    min-height: 46px;
  }

  .cart-drawer.open {
    justify-content: stretch;
  }

  .cart-panel {
    width: 100%;
    height: 100dvh;
    padding: 14px;
  }
}

@page {
  size: A4;
  margin: 14mm;
}

@media print {
  body {
    margin: 0;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .print-area,
  .print-area * {
    visibility: visible !important;
  }

  .print-preview-overlay {
    position: static !important;
    display: block !important;
    inset: auto !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .print-preview-panel {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .print-preview-actions,
  .print-preview-actions * {
    display: none !important;
  }

  .print-area {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
    color: #111 !important;
    font-family: Arial, sans-serif !important;
    font-size: 12pt !important;
  }

  .print-area h1 {
    margin: 0 0 6px !important;
    font-size: 20pt !important;
  }

  .print-area h2 {
    margin: 0 0 12px !important;
    color: #333 !important;
    font-size: 14pt !important;
  }

  .print-area p {
    margin: 4px 0 !important;
  }

  .print-area table {
    width: 100% !important;
    margin-top: 14px !important;
    border-collapse: collapse !important;
  }

  .print-area th,
  .print-area td {
    padding: 7px !important;
    border-bottom: 1px solid #ddd !important;
    text-align: left !important;
  }

  .print-area th {
    background: #f2f2f2 !important;
  }

  .print-area .summary {
    margin-top: 16px !important;
    padding-top: 10px !important;
    border-top: 2px solid #111 !important;
  }

  .print-area .total {
    margin-top: 12px !important;
    font-size: 16pt !important;
    font-weight: 800 !important;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .topbar {
    gap: 12px;
    padding: 12px 10px;
  }

  .brand h1 {
    font-size: 1.05rem;
  }

  .brand p {
    font-size: 0.82rem;
  }

  .top-actions {
    justify-content: stretch;
    gap: 8px;
  }

  .top-actions button,
  .top-actions a {
    min-height: 46px;
    padding: 0 10px;
  }

  .top-actions .whatsapp-only {
    width: 46px;
    padding: 0;
  }

  .minimum-banner {
    top: 0;
    text-align: center;
  }

  .role-buttons {
    justify-content: stretch;
  }

  .role-buttons button {
    flex: 1;
  }

  .management-tabs button {
    flex: 1 1 100%;
  }

  .management-access button {
    flex: 1;
  }

  .hero {
    min-height: 220px;
    padding: 22px;
  }

  .hero h2 {
    font-size: 1.85rem;
    line-height: 1.06;
  }

  .section-head {
    gap: 12px;
  }

  .section-head h2 {
    font-size: 1.35rem;
  }

  .search-box input {
    min-height: 50px;
  }

  .category-row {
    display: block;
    flex-wrap: initial;
    overflow: visible;
    padding-bottom: 2px;
  }

  .desktop-category-buttons {
    display: none;
  }

  .mobile-category-menu {
    display: block;
  }

  .mobile-category-menu summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
  }

  .mobile-category-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-category-menu summary::after {
    content: "▾";
    color: var(--accent-dark);
    font-size: 0.9rem;
  }

  .mobile-category-menu[open] summary::after {
    content: "▴";
  }

  .mobile-category-menu summary strong {
    min-width: 0;
    overflow: hidden;
    color: var(--accent-dark);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-category-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
  }

  .mobile-category-options button {
    min-height: 36px;
    min-width: 0;
    padding: 0 8px;
    justify-content: center;
    font-size: 0.78rem;
    text-align: center;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  .product-card {
    height: auto;
    min-height: 370px;
    grid-template-rows: 150px 1fr;
    overflow: visible;
  }

  .product-image {
    height: 150px;
    padding: 8px;
  }

  .product-body {
    padding: 8px;
    gap: 5px;
  }

  .product-title {
    font-size: 0.76rem;
    height: 52px;
    line-height: 1.14;
    -webkit-line-clamp: 3;
  }

  .variant-select-row,
  .presentation-box {
    height: 42px;
    min-height: 42px;
  }

  .variant-select-row {
    gap: 2px;
    font-size: 0.7rem;
  }

  .variant-select-row select {
    height: 28px;
    min-height: 28px;
    padding: 4px 24px 4px 7px;
    font-size: 0.72rem;
  }

  .presentation-box {
    padding: 6px 8px;
  }

  .presentation-box span {
    font-size: 0.68rem;
  }

  .presentation-box strong {
    font-size: 0.78rem;
  }

  .pack-price {
    min-height: 50px;
    gap: 2px;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .cart-button,
  .whatsapp-button,
  .direct-whatsapp,
  .danger-button {
    min-height: 46px;
  }

  .quantity-row {
    grid-template-columns: 1fr;
    grid-template-rows: 13px 28px 34px;
    gap: 4px;
  }

  .quantity-row label {
    font-size: 0.68rem;
  }

  .quantity-row input {
    height: 28px;
    min-height: 28px;
    padding: 4px 7px;
    font-size: 0.78rem;
  }

  .catalog-card-total {
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .catalog-card-total strong {
    font-size: 0.82rem;
  }

  .quantity-row .primary-button {
    grid-row: 3;
    height: 36px;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .button-label-full {
    display: none;
  }

  .button-label-short {
    display: inline;
  }

  .pack-main-price {
    font-size: 1.08rem;
  }

  .pack-sale-detail {
    min-height: 24px;
    font-size: 0.62rem;
    line-height: 1.12;
  }

  .cart-panel {
    width: 100%;
    height: 100dvh;
    padding: 14px;
    gap: 12px;
  }

  .cart-item {
    grid-template-columns: 54px 1fr;
    align-items: start;
  }

  .cart-item .danger-button {
    grid-column: 1 / -1;
  }

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

  .variant-row {
    grid-template-columns: 1fr;
  }

  .product-edit-grid,
  .edit-image-preview {
    grid-template-columns: 1fr;
  }

  .section-head.compact {
    align-items: stretch;
  }

  .section-head.compact .secondary-button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .top-actions {
    grid-template-columns: 46px 1fr;
  }

  .top-actions .cart-button {
    grid-column: 1 / -1;
  }

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

  .product-card {
    height: auto;
    min-height: 364px;
    grid-template-rows: 146px 1fr;
  }

  .product-image {
    height: 146px;
  }

  .admin-table td {
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
  }

  .stock-cell {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .management-tabs,
  .management-access div,
  .product-action-bar {
    grid-template-columns: 1fr;
  }
}
.product-image-button {
  width: 100%;
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.product-image-button .product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.gallery-thumb {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gallery-thumb.is-primary {
  border-color: rgba(74, 122, 62, 0.55);
  box-shadow: 0 0 0 2px rgba(74, 122, 62, 0.08);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: #f7f7f2;
}

.gallery-thumb span {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-thumb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gallery-thumb-actions button,
.gallery-replace {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #f8f8f3;
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.gallery-thumb-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}

.gallery-replace input {
  display: none;
}

.gallery-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fafaf6;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(9, 12, 10, 0.88);
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox-frame {
  display: grid;
  gap: 12px;
  width: min(980px, calc(100vw - 120px));
  max-height: calc(100dvh - 80px);
  margin: 0;
  color: #fff;
  text-align: center;
}

.image-lightbox-frame img {
  width: 100%;
  max-height: calc(100dvh - 132px);
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.image-lightbox-frame figcaption {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 850;
}

.image-lightbox-close,
.image-lightbox-arrow {
  position: fixed;
  z-index: 121;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.image-lightbox-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.image-lightbox-arrow {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  font-size: 2.4rem;
  line-height: 0.8;
}

.image-lightbox-prev {
  left: 20px;
}

.image-lightbox-next {
  right: 20px;
}

@media (max-width: 760px) {
  .product-image-button {
    height: 150px;
  }

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

  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox-frame {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 64px);
  }

  .image-lightbox-frame img {
    max-height: calc(100dvh - 110px);
  }

  .image-lightbox-arrow {
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }

  .image-lightbox-prev {
    left: 10px;
  }

  .image-lightbox-next {
    right: 10px;
  }
}
.floating-cart-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(43, 87, 57, 0.22);
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 14px 34px rgba(24, 33, 28, 0.22);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.floating-cart-button:hover,
.floating-cart-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(24, 33, 28, 0.28);
}

.floating-cart-label::before {
  content: "🛒";
  margin-right: 7px;
}

.floating-cart-count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 0.88rem;
  line-height: 1;
}

.floating-cart-button.has-items {
  animation: cartPulse 0.28s ease;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  .floating-cart-button {
    right: 14px;
    bottom: 14px;
    min-height: 48px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .floating-cart-count {
    min-width: 26px;
    height: 26px;
  }
}

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

.image-lightbox-frame figcaption {
  display: grid;
  gap: 8px;
  justify-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.image-lightbox-frame figcaption span {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-line;
}

@media (max-width: 760px) {
  .image-lightbox-frame figcaption span {
    max-width: calc(100vw - 40px);
    font-size: 0.9rem;
  }
}

/* Catalog card stability: keep all purchase controls visible on desktop and mobile. */
.product-card {
  height: auto;
  min-height: 0;
  grid-template-rows: auto 1fr;
  overflow: visible;
}

.product-body {
  min-height: 0;
  overflow: visible;
}

.product-title {
  height: auto;
  min-height: 82px;
}

.variant-select-row {
  height: auto;
  min-height: 66px;
}

.pack-price {
  min-height: 96px;
  overflow: visible;
}

.quantity-row {
  min-height: 100px;
  overflow: visible;
}

.quantity-row .primary-button {
  width: 100%;
}

@media (min-width: 761px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .product-card {
    min-height: 680px;
  }

  .product-image-button,
  .product-image {
    height: 330px;
  }
}

@media (max-width: 760px) {
  .product-card {
    height: auto;
    min-height: 0;
  }

  .product-title {
    min-height: 48px;
  }

  .variant-select-row {
    min-height: 42px;
  }

  .pack-price {
    min-height: 54px;
  }

  .quantity-row {
    min-height: 83px;
    overflow: visible;
  }
}

/* Cart redesign */
.cart-drawer.open {
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  background: rgba(24, 33, 28, 0.34);
}

.cart-panel {
  width: min(1120px, calc(100vw - 48px));
  height: min(840px, calc(100dvh - 48px));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(219, 226, 216, 0.9);
  border-radius: 14px;
  background: #fbfcf8;
  box-shadow: 0 24px 70px rgba(24, 33, 28, 0.24);
  overflow: hidden;
}

.cart-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.cart-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.cart-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 18px;
}

.cart-products-section,
.cart-sidebar,
.cart-section {
  min-width: 0;
}

.cart-products-section,
.cart-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 33, 28, 0.04);
}

.cart-products-section {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 0;
  padding: 16px;
}

.cart-products-section h3,
.cart-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
}

.cart-items {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.cart-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(118px, auto);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(219, 226, 216, 0.9);
  border-radius: 12px;
  background: #fff;
}

.cart-item-image,
.cart-item img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 10px;
  background: #f7f8f2;
}

.cart-item-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cart-item-main strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.25;
}

.cart-item-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.cart-item-side {
  display: grid;
  gap: 7px;
  justify-items: end;
  text-align: right;
}

.cart-item-side > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-item-side strong {
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 950;
}

.cart-remove-button {
  min-height: 30px;
  border: 1px solid #ead2ce;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7f6;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.cart-remove-button:hover {
  background: #ffecea;
}

.cart-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding-right: 2px;
}

.cart-section {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.customer-fields {
  border-top: 0;
  padding-top: 0;
}

.customer-fields input {
  min-height: 42px;
  border-radius: 8px;
}

.cart-total {
  border-top: 0;
  padding-top: 0;
}

.cart-total span {
  color: var(--muted);
  font-weight: 900;
}

.cart-total strong {
  color: var(--accent-dark);
  font-size: 2rem;
  line-height: 1;
}

.minimum-status {
  line-height: 1.35;
}

.cart-action-section {
  gap: 10px;
}

@media (max-width: 820px) {
  .cart-drawer.open {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .cart-panel {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    padding: 14px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    overflow: auto;
    padding-bottom: 78px;
  }

  .cart-products-section {
    overflow: visible;
  }

  .cart-items,
  .cart-sidebar {
    overflow: visible;
  }

  .cart-item {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .cart-item-image,
  .cart-item img {
    width: 76px;
    height: 76px;
  }

  .cart-item-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
    text-align: left;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .cart-item-side > span {
    display: none;
  }

  .cart-remove-button {
    justify-self: end;
  }
}

/* Image viewer: keep the product enlarged but still framed by the dark backdrop. */
.image-lightbox {
  padding: clamp(22px, 4vw, 58px);
}

.image-lightbox-frame {
  width: min(68vw, 860px);
  max-width: calc(100vw - 110px);
  max-height: calc(100dvh - 92px);
  gap: 14px;
  align-content: center;
}

.image-lightbox-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(64dvh, 620px);
  object-fit: contain;
}

.image-lightbox-frame figcaption {
  max-width: min(680px, 100%);
  max-height: 24dvh;
  overflow: auto;
  padding: 0 10px;
}

.image-lightbox-frame figcaption span {
  max-width: 100%;
}

@media (max-width: 760px) {
  .image-lightbox {
    padding: 18px;
  }

  .image-lightbox-frame {
    width: min(70vw, 430px);
    max-width: calc(100vw - 36px);
    max-height: calc(100dvh - 56px);
    gap: 10px;
  }

  .image-lightbox-frame img {
    max-height: min(56dvh, 430px);
  }

  .image-lightbox-frame figcaption {
    max-height: 28dvh;
    font-size: 0.92rem;
  }
}

@media (max-width: 390px) {
  .image-lightbox-frame {
    width: 70vw;
  }

  .image-lightbox-frame img {
    max-height: 52dvh;
  }
}

/* Mobile must keep the same catalog wording as desktop. */
.button-label-full {
  display: inline;
}

.button-label-short {
  display: none;
}

/* Ajuste visual catalogo publico: compacto, sin tocar logica ni datos. */
:root {
  --gb-yellow: #ffd000;
  --gb-red: #d71920;
  --gb-black: #111111;
}

.topbar {
  min-height: 72px;
  flex-wrap: nowrap;
  overflow: visible;
}

.top-actions {
  min-width: 0;
}

.top-actions .ghost-button,
.top-actions .cart-button,
.top-actions .direct-whatsapp {
  white-space: nowrap;
}

.minimum-banner {
  position: relative;
  top: auto;
  z-index: 3;
  display: block;
  width: 100%;
  height: 38px;
  overflow: hidden;
  border-top: 2px solid var(--gb-black);
  border-bottom: 2px solid var(--gb-black);
  background: var(--gb-yellow);
  color: var(--gb-black);
  padding: 0;
  font-weight: 950;
  line-height: 38px;
  white-space: nowrap;
}

.minimum-banner::before,
.minimum-banner::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  width: 42px;
  height: 100%;
  pointer-events: none;
}

.minimum-banner::before {
  left: 0;
  background: linear-gradient(90deg, var(--gb-yellow), rgba(255, 208, 0, 0));
}

.minimum-banner::after {
  right: 0;
  background: linear-gradient(270deg, var(--gb-yellow), rgba(255, 208, 0, 0));
}

.minimum-marquee {
  display: inline-flex;
  gap: 52px;
  min-width: max-content;
  padding-left: 100%;
  animation: gbMarquee 18s linear infinite;
}

.minimum-marquee span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gb-black);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.minimum-marquee span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gb-red);
  box-shadow: 0 0 0 3px var(--gb-black);
}

@keyframes gbMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

main {
  padding-top: 14px;
}

.hero {
  min-height: 0;
  grid-template-columns: 1fr;
  align-items: center;
  margin-bottom: 4px;
  padding: 12px 18px;
  border: 2px solid var(--gb-black);
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.92), rgba(215, 25, 32, 0.72)),
    url("https://images.unsplash.com/photo-1601599963565-b7ba29c8e47a?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.hero-copy {
  max-width: 780px;
}

.hero .eyebrow {
  margin-bottom: 6px;
  color: var(--gb-yellow);
}

.hero h2 {
  max-width: 720px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.04;
}

.hero p {
  margin-top: 4px;
  max-width: 620px;
  font-size: 0.88rem;
}

.hero-panel {
  display: none;
}

.content-view {
  padding-top: 18px;
}

#catalogView .section-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 520px) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 12px;
}

#catalogView .section-head > div {
  min-width: 0;
}

#catalogView .section-head p {
  margin-top: 2px;
}

#catalogView .search-box {
  width: 100%;
  min-width: 0;
}

.admin-return-button {
  align-self: end;
  min-width: max-content;
}

.category-row {
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.category-row button {
  min-height: 38px;
  padding: 0 14px;
}

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

.product-card {
  min-width: 0;
  height: auto;
  min-height: 0;
  grid-template-rows: 168px 1fr;
}

.product-image-button,
.product-image {
  height: 168px;
}

.product-image {
  padding: 10px;
}

.product-body {
  gap: 8px;
  padding: 12px;
}

.product-title {
  height: 64px;
  font-size: 1rem;
  line-height: 1.18;
}

.variant-select-row,
.variant-placeholder {
  height: 54px;
  min-height: 54px;
}

.variant-select-row select {
  height: 36px;
  min-height: 36px;
}

.presentation-box {
  height: 54px;
  min-height: 54px;
}

.pack-price {
  min-height: 58px;
  gap: 3px;
}

.quantity-row {
  grid-template-columns: 86px 1fr;
  grid-template-rows: 36px 42px;
  gap: 8px;
  min-height: 88px;
}

.quantity-row input {
  height: 36px;
  min-height: 36px;
}

.quantity-row .primary-button {
  min-height: 42px;
  height: 42px;
}

.floating-cart-button {
  right: 20px;
  bottom: 20px;
  z-index: 20;
}

.admin-private-nav {
  align-items: center;
  margin-top: 14px;
}

.admin-private-nav nav {
  flex: 0 0 auto;
}

.admin-private-nav .ghost-button {
  min-width: 118px;
  white-space: nowrap;
}

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

@media (max-width: 900px) {
  .topbar {
    min-height: 0;
    flex-wrap: wrap;
  }

  .minimum-banner {
    height: 34px;
    line-height: 34px;
  }

  .minimum-marquee {
    gap: 38px;
    animation-duration: 16s;
  }

  .minimum-marquee span {
    font-size: 0.84rem;
  }

  .hero {
    display: none;
  }

  .hero h2 {
    font-size: 1.08rem;
  }

  .hero p {
    display: none;
  }

  #catalogView .section-head {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .admin-return-button {
    width: 100%;
  }

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

  .product-card {
    grid-template-rows: 100px 1fr;
  }

  .product-image-button,
  .product-image {
    height: 100px;
  }

  .product-body {
    gap: 6px;
    padding: 8px;
  }

  .product-title {
    height: 44px;
    font-size: 0.82rem;
    line-height: 1.12;
    -webkit-line-clamp: 3;
  }

  .variant-select-row,
  .variant-placeholder {
    height: 42px;
    min-height: 42px;
    font-size: 0.78rem;
  }

  .variant-select-row select {
    height: 32px;
    min-height: 32px;
    padding: 5px 26px 5px 7px;
    font-size: 0.78rem;
  }

  .presentation-box {
    height: 42px;
    min-height: 42px;
    padding: 6px 7px;
  }

  .presentation-box span {
    font-size: 0.7rem;
  }

  .presentation-box strong {
    font-size: 0.78rem;
  }

  .pack-price {
    min-height: 48px;
  }

  .pack-price strong {
    font-size: 1rem;
  }

  .unit-price-note,
  .price-note {
    font-size: 0.68rem;
  }

  .quantity-row {
    grid-template-columns: 62px 1fr;
    grid-template-rows: 32px 38px;
    gap: 6px;
    min-height: 76px;
  }

  .quantity-row label {
    font-size: 0.72rem;
  }

  .quantity-row input {
    height: 32px;
    min-height: 32px;
    padding: 0 6px;
  }

  .quantity-row .primary-button {
    min-height: 38px;
    height: 38px;
    padding-inline: 6px;
    font-size: 0.78rem;
  }

  .floating-cart-button {
    top: 50%;
    right: 8px;
    bottom: auto;
    width: 52px;
    min-height: 52px;
    transform: translateY(-50%);
    justify-content: center;
    padding: 0;
    border-radius: 999px;
  }

  .floating-cart-button:hover,
  .floating-cart-button:focus-visible {
    transform: translateY(-50%);
  }

  .floating-cart-label {
    font-size: 0;
  }

  .floating-cart-label::before {
    margin-right: 0;
    font-size: 1.1rem;
  }

  .floating-cart-count {
    position: absolute;
    right: -4px;
    bottom: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-size: 0.78rem;
  }
}

@media (max-width: 520px) {
  main {
    padding-top: 10px;
  }

  .topbar {
    padding: 10px;
  }

  .hero {
    margin-bottom: 2px;
  }

  .category-row button {
    min-height: 40px;
  }
}

/* Ajuste visual final Punto X Mayor: identidad amarilla/roja/negra */
:root {
  --gb-yellow: #ffd429;
  --gb-yellow-soft: #fff3a8;
  --gb-yellow-bg: #fff7cf;
  --gb-red: #d71920;
  --gb-red-dark: #a80f16;
  --gb-black: #111111;
  --bg: #fff5bf;
  --surface: #fffef5;
  --surface-2: #ffe36a;
  --text: #17120c;
  --muted: #6f5f32;
  --line: rgba(17, 17, 17, 0.16);
  --accent: var(--gb-red);
  --accent-dark: var(--gb-black);
  --shadow: 0 14px 34px rgba(92, 64, 0, 0.14);
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 212, 41, 0.62), transparent 34%),
    linear-gradient(180deg, #fff0a3 0%, #fff8d9 42%, #fffdf2 100%);
}

.runtime-stats-hidden,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.topbar {
  min-height: 82px;
  padding: 10px clamp(14px, 4vw, 46px);
  background: linear-gradient(90deg, var(--gb-yellow) 0%, #ffe45c 58%, #fff2a6 100%);
  border-bottom: 4px solid var(--gb-black);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.14);
  overflow: visible;
}

.brand {
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border: 3px solid var(--gb-black);
  background: var(--gb-red);
  color: var(--gb-yellow);
  box-shadow: 5px 5px 0 var(--gb-black);
  font-size: 1.35rem;
}

.brand h1 {
  color: var(--gb-black);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.92;
  font-weight: 950;
  text-transform: uppercase;
}

.brand p {
  margin-top: 4px;
  color: var(--gb-red-dark);
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  font-weight: 950;
  text-transform: uppercase;
}

.top-actions {
  gap: 8px;
}

.site-menu {
  position: relative;
  z-index: 25;
}

.site-menu summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gb-black);
  border-radius: 8px;
  background: var(--gb-black);
  color: var(--gb-yellow);
  font-size: 1.38rem;
  font-weight: 950;
  list-style: none;
  cursor: pointer;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}

.site-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 2px solid var(--gb-black);
  border-radius: 10px;
  background: #fffdf0;
  box-shadow: 8px 8px 0 rgba(17, 17, 17, 0.14), 0 18px 36px rgba(17, 17, 17, 0.22);
}

.site-menu:not([open]) .site-menu-panel {
  display: none;
}

.site-menu-panel a,
.site-menu-panel button {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: var(--gb-black);
  text-align: left;
  text-decoration: none;
  font-weight: 900;
}

.site-menu-panel a:hover,
.site-menu-panel button:hover {
  background: var(--gb-yellow);
}

.private-management-mode .admin-menu-only.hidden,
.admin-catalog-preview .admin-menu-only.hidden {
  display: flex !important;
}

.ghost-button,
.secondary-button,
.primary-button,
.cart-button,
.icon-button,
.whatsapp-button,
.direct-whatsapp,
.contact-whatsapp {
  border-radius: 8px;
  font-weight: 950;
}

.ghost-button.active,
.whatsapp-button,
.direct-whatsapp,
.contact-whatsapp {
  border-color: var(--gb-black);
  background: var(--gb-black);
  color: var(--gb-yellow);
}

.primary-button,
.cart-button {
  border-color: var(--gb-black);
  background: var(--gb-red);
  color: #fff;
}

.primary-button:hover,
.cart-button:hover,
.whatsapp-button:hover,
.direct-whatsapp:hover,
.contact-whatsapp:hover {
  background: var(--gb-black);
  color: var(--gb-yellow);
}

.cart-button {
  min-height: 42px;
  border: 2px solid var(--gb-black);
  box-shadow: 3px 3px 0 var(--gb-black);
}

main {
  width: min(1260px, calc(100% - 28px));
  padding: 14px 0 54px;
}

.minimum-banner {
  position: relative;
  top: auto;
  z-index: 3;
  height: 38px;
  overflow: hidden;
  display: block;
  padding: 0;
  border-top: 2px solid var(--gb-black);
  border-bottom: 2px solid var(--gb-black);
  background: var(--gb-black);
  color: var(--gb-yellow);
  line-height: 38px;
}

.minimum-marquee {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 54px;
  white-space: nowrap;
  animation: gbMarquee 19s linear infinite;
}

.minimum-marquee span {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--gb-yellow);
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0;
}

.minimum-marquee span::after {
  content: "";
  width: 12px;
  height: 12px;
  margin-left: 54px;
  border-radius: 999px;
  background: var(--gb-red);
  box-shadow: 0 0 0 3px var(--gb-yellow);
}

@keyframes gbMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero,
.hero-copy,
.hero-panel {
  display: none !important;
}

.content-view {
  padding-top: 8px;
}

#catalogView .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

#catalogView .section-head > div {
  min-width: 0;
}

#catalogView .search-box {
  width: 100%;
  min-width: 0;
  color: var(--gb-black);
  font-weight: 950;
}

.search-box input {
  min-height: 44px;
  border: 2px solid var(--gb-black);
  background: #fffef8;
  box-shadow: 3px 3px 0 rgba(17, 17, 17, 0.12);
}

.admin-return-button {
  min-width: max-content;
  border: 2px solid var(--gb-black);
  background: var(--gb-black);
  color: var(--gb-yellow);
}

.category-row {
  gap: 8px;
  margin: 0 0 12px;
}

.desktop-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-category-menu {
  display: none;
}

.category-row button {
  min-height: 38px;
  border: 2px solid rgba(17, 17, 17, 0.28);
  background: #fffdf0;
  color: var(--gb-black);
  font-weight: 950;
}

.category-row button.active {
  border-color: var(--gb-black);
  background: var(--gb-yellow);
  color: var(--gb-black);
  box-shadow: 3px 3px 0 var(--gb-black);
}

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

.product-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid rgba(17, 17, 17, 0.16);
  border-radius: 10px;
  background: #fffef8;
  box-shadow: 0 10px 24px rgba(92, 64, 0, 0.12);
}

.product-image-button,
.product-image {
  height: 180px;
  background: #ffffff;
}

.product-image {
  padding: 10px;
}

.product-body {
  gap: 8px;
  padding: 12px;
}

.product-title {
  height: 58px;
  color: var(--gb-black);
  font-size: 0.98rem;
  line-height: 1.16;
  font-weight: 950;
}

.variant-select-row,
.variant-placeholder {
  height: 50px;
  min-height: 50px;
}

.variant-select-row select,
.quantity-row input {
  border: 2px solid rgba(17, 17, 17, 0.18);
  background: #fffef8;
}

.price,
.pack-price strong {
  color: var(--gb-red);
  font-weight: 950;
}

.presentation-box,
.pack-price {
  min-height: 48px;
}

.quantity-row {
  grid-template-columns: 78px 1fr;
  grid-template-rows: 34px 40px;
  gap: 7px;
  min-height: 82px;
}

.quantity-row input {
  height: 34px;
  min-height: 34px;
}

.quantity-row .primary-button {
  min-height: 40px;
  height: 40px;
  border: 2px solid var(--gb-black);
  background: var(--gb-red);
  box-shadow: 3px 3px 0 var(--gb-black);
}

.floating-cart-button {
  right: 18px;
  bottom: 18px;
  z-index: 30;
  min-height: 42px;
  padding: 0 12px;
  border: 2px solid var(--gb-black);
  background: var(--gb-red);
  box-shadow: 4px 4px 0 var(--gb-black);
}

.floating-cart-count,
#floatingCartCount,
#cartCount {
  background: var(--gb-yellow) !important;
  color: var(--gb-black) !important;
}

.admin-private-nav {
  margin-top: 8px;
  border: 2px solid var(--gb-black);
  background: #fffdf0;
}

.admin-private-nav .ghost-button,
.admin-section-switch .ghost-button {
  min-width: 122px;
  border: 2px solid var(--gb-black);
  white-space: nowrap;
}

.contact-section {
  margin-top: 26px;
  padding: 18px;
  border: 2px solid rgba(17, 17, 17, 0.16);
  border-radius: 10px;
  background: rgba(255, 254, 248, 0.84);
  box-shadow: 0 10px 24px rgba(92, 64, 0, 0.09);
}

.contact-section h2,
.contact-section p {
  margin: 0;
}

.contact-section h2 {
  color: var(--gb-black);
  font-size: 1.15rem;
  text-transform: uppercase;
}

.contact-section p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.contact-whatsapp {
  width: max-content;
  margin-top: 12px;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

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

@media (max-width: 900px) {
  body {
    background: linear-gradient(180deg, #ffe778 0%, #fff6c7 42%, #fffdf2 100%);
  }

  .topbar {
    min-height: 76px;
    gap: 8px;
    padding: 9px 10px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    font-size: 1rem;
    box-shadow: 3px 3px 0 var(--gb-black);
  }

  .brand h1 {
    font-size: clamp(1.45rem, 8vw, 2.15rem);
  }

  .brand p {
    font-size: 0.7rem;
  }

  .top-actions {
    gap: 6px;
  }

  .site-menu summary {
    width: 40px;
    height: 40px;
  }

  .site-menu-panel {
    right: -4px;
    min-width: 210px;
  }

  .whatsapp-only {
    width: 40px;
    flex-basis: 40px;
  }

  .topbar > .top-actions > .cart-button {
    display: none;
  }

  .minimum-banner {
    height: 34px;
    line-height: 34px;
  }

  .minimum-marquee {
    gap: 34px;
    animation-duration: 16s;
  }

  .minimum-marquee span {
    font-size: 0.78rem;
  }

  main {
    width: min(100% - 16px, 760px);
    padding-top: 10px;
  }

  #catalogView .section-head {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  #catalogView .section-head > div {
    display: none;
  }

  .search-box input {
    min-height: 42px;
  }

  .desktop-category-buttons {
    display: none;
  }

  .mobile-category-menu {
    display: block;
    width: 100%;
  }

  .mobile-category-menu summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--gb-black);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--gb-yellow);
    color: var(--gb-black);
    font-weight: 950;
    text-transform: uppercase;
    list-style: none;
  }

  .mobile-category-menu summary::before {
    content: "CATEGORÍAS";
  }

  .mobile-category-menu summary > * {
    display: none;
  }

  .mobile-category-menu summary::after {
    content: "▼";
    font-size: 0.75rem;
  }

  .mobile-category-menu[open] summary::after {
    content: "▲";
  }

  .mobile-category-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
  }

  .mobile-category-options button {
    width: 100%;
    justify-content: flex-start;
  }

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

  .product-card {
    border-radius: 9px;
  }

  .product-image-button,
  .product-image {
    height: 120px;
  }

  .product-image {
    padding: 7px;
  }

  .product-body {
    gap: 6px;
    padding: 8px;
  }

  .product-title {
    height: 48px;
    font-size: 0.78rem;
    line-height: 1.16;
  }

  .variant-select-row,
  .variant-placeholder {
    height: 42px;
    min-height: 42px;
  }

  .variant-select-row label,
  .presentation-box span,
  .quantity-row label,
  .pack-price span {
    font-size: 0.64rem;
  }

  .variant-select-row select {
    height: 30px;
    min-height: 30px;
    font-size: 0.72rem;
  }

  .presentation-box,
  .pack-price {
    min-height: 42px;
  }

  .pack-price strong,
  .price {
    font-size: 0.9rem;
  }

  .quantity-row {
    grid-template-columns: 56px 1fr;
    grid-template-rows: 30px 36px;
    gap: 6px;
    min-height: 72px;
  }

  .quantity-row input {
    height: 30px;
    min-height: 30px;
    padding: 0 6px;
  }

  .quantity-row .primary-button {
    min-height: 36px;
    height: 36px;
    padding: 0 6px;
    font-size: 0.72rem;
    box-shadow: 2px 2px 0 var(--gb-black);
  }

  .floating-cart-button {
    right: 8px;
    bottom: 12px;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 999px;
  }

  .floating-cart-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .floating-cart-count,
  #floatingCartCount {
    position: absolute;
    right: -4px;
    top: -7px;
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 2px solid var(--gb-black);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 950;
  }

  .admin-private-nav {
    align-items: stretch;
  }

  .admin-private-nav nav {
    width: 100%;
  }

  .admin-private-nav .ghost-button {
    flex: 1 1 120px;
  }

  .contact-section {
    margin-top: 18px;
    padding: 14px;
  }
}

@media (max-width: 360px) {
  .product-grid {
    gap: 8px;
  }

  .product-image-button,
  .product-image {
    height: 108px;
  }

  .product-title {
    height: 44px;
    font-size: 0.72rem;
  }
}

@media (max-width: 900px) {
  .floating-cart-button {
    top: auto !important;
    right: 8px !important;
    bottom: 12px !important;
    transform: none !important;
  }

  .floating-cart-button:hover,
  .floating-cart-button:focus-visible {
    transform: none !important;
  }
}

.admin-catalog-preview .topbar.hidden {
  display: flex !important;
}

.admin-catalog-preview main {
  padding-top: 10px;
}

/* Ajuste cantidad y carrito profesional */
.quantity-stepper-row {
  grid-template-columns: 1fr;
  grid-template-rows: auto 36px 40px;
  gap: 6px;
  min-height: 92px;
}

.quantity-stepper-row label {
  min-height: 14px;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
}

.quantity-stepper-button {
  width: 34px;
  height: 34px;
  border: 2px solid var(--gb-black, #111);
  border-radius: 7px;
  background: var(--gb-yellow, #ffd429);
  color: var(--gb-black, #111);
  font-weight: 950;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

.quantity-stepper input,
.quantity-row .quantity-stepper input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 4px;
  text-align: center;
  font-weight: 900;
  -moz-appearance: textfield;
}

.quantity-stepper input::-webkit-outer-spin-button,
.quantity-stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.quantity-stepper-row .primary-button {
  grid-column: 1 / -1;
  width: 100%;
}

.pack-price,
.presentation-box,
.variant-select-row,
.variant-placeholder {
  flex: 0 0 auto;
  overflow: hidden;
}

.product-body {
  min-height: 0;
}

.cart-panel {
  width: min(520px, 100%);
  background: #fffdf4;
}

.cart-head {
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(17,17,17,0.12);
}

.cart-head h2::before {
  content: "RESUMEN DEL PEDIDO";
  display: block;
  margin-bottom: 4px;
  color: var(--gb-red, #d71920);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.cart-total {
  margin: 10px 0;
  padding: 12px;
  border: 2px solid var(--gb-black, #111);
  border-radius: 10px;
  background: var(--gb-yellow, #ffd429);
  color: var(--gb-black, #111);
}

.cart-total span {
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cart-total strong {
  color: var(--gb-red, #d71920);
  font-size: 1.55rem;
  font-weight: 950;
}

.minimum-status {
  margin-bottom: 10px;
  border-radius: 9px;
  font-weight: 900;
}

.cart-items {
  gap: 8px;
}

.cart-items::before,
.customer-fields::before,
.cart-actions::before {
  display: block;
  color: var(--gb-black, #111);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cart-items::before { content: "PRODUCTOS"; }
.customer-fields::before { content: "DATOS DEL CLIENTE"; }
.cart-actions::before { content: "ACCIONES"; }

.compact-cart-item,
.cart-item.compact-cart-item {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(17,17,17,0.14);
  border-radius: 10px;
  background: #fffef8;
}

.compact-cart-item .cart-item-image {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.compact-cart-item .cart-item-main strong {
  font-size: 0.82rem;
  line-height: 1.16;
}

.compact-cart-item .cart-item-meta {
  display: grid;
  gap: 1px;
  margin-top: 3px;
}

.compact-cart-item .cart-item-meta span {
  font-size: 0.74rem;
  line-height: 1.18;
}

.compact-cart-item .cart-item-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 86px;
}

.compact-cart-item .cart-item-side strong {
  color: var(--gb-red, #d71920);
  font-size: 0.86rem;
}

.cart-remove-button {
  min-height: 28px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 0.72rem;
}

.customer-fields {
  gap: 8px;
  margin-top: 10px;
}

.customer-fields input {
  min-height: 38px;
}

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

.cart-actions .whatsapp-button,
.cart-actions .secondary-button {
  min-height: 40px;
}

.floating-cart-button {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.86rem;
}

@media (min-width: 901px) {
  .quantity-stepper-row {
    grid-template-rows: auto 34px 40px;
    min-height: 88px;
  }

  .cart-drawer.open {
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .quantity-stepper-row {
    grid-template-rows: 13px 30px 34px;
    gap: 4px;
    min-height: 78px;
  }

  .quantity-stepper {
    grid-template-columns: 30px 1fr 30px;
    gap: 4px;
    min-height: 30px;
  }

  .quantity-stepper-button,
  .quantity-stepper input,
  .quantity-row .quantity-stepper input {
    width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .quantity-stepper input,
  .quantity-row .quantity-stepper input {
    width: 100%;
  }

  .quantity-stepper-row .primary-button {
    height: 34px;
    min-height: 34px;
  }

  .cart-panel {
    width: 100%;
    height: 100dvh;
    padding: 10px;
  }

  .compact-cart-item,
  .cart-item.compact-cart-item {
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
  }

  .compact-cart-item .cart-item-image {
    width: 46px;
    height: 46px;
  }

  .compact-cart-item .cart-item-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
    width: 100%;
  }

  .floating-cart-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }
}

/* Calibracion final tarjetas catalogo */
.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.product-image-button,
.product-image {
  height: 196px;
}

.product-image {
  padding: 7px;
}

.product-body {
  gap: 6px;
  padding: 10px;
}

.product-title {
  height: 52px;
  min-height: 52px;
  font-size: 0.94rem;
  line-height: 1.14;
}

.variant-select-row {
  height: 34px;
  min-height: 34px;
  gap: 0;
  font-size: 0;
}

.variant-select-row select {
  height: 34px;
  min-height: 34px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pack-price {
  min-height: 50px;
  gap: 2px;
}

.pack-main-price {
  font-size: 1.08rem;
  line-height: 1.05;
}

.pack-sale-detail {
  display: grid;
  gap: 1px;
  min-height: 28px;
}

.pack-sale-detail span {
  font-size: 0.72rem;
  line-height: 1.12;
}

.quantity-stepper-row {
  grid-template-rows: 14px 30px 36px;
  gap: 4px;
  min-height: 84px;
}

.quantity-stepper-row label {
  min-height: 14px;
  font-size: 0.72rem;
  line-height: 1;
}

.quantity-stepper {
  grid-template-columns: 28px 46px 28px;
  justify-content: start;
  gap: 4px;
  min-height: 30px;
}

.quantity-stepper-button,
.quantity-stepper input,
.quantity-row .quantity-stepper input {
  height: 30px;
  min-height: 30px;
}

.quantity-stepper-button {
  width: 28px;
}

.quantity-stepper input,
.quantity-row .quantity-stepper input {
  width: 46px;
  max-width: 46px;
}

.quantity-stepper-row .primary-button {
  height: 36px;
  min-height: 36px;
}

@media (max-width: 900px) {
  .product-image-button,
  .product-image {
    height: 132px;
  }

  .product-body {
    gap: 5px;
    padding: 7px;
  }

  .product-title {
    height: 44px;
    min-height: 44px;
    font-size: 0.74rem;
    line-height: 1.12;
  }

  .variant-select-row {
    height: 30px;
    min-height: 30px;
  }

  .variant-select-row select {
    height: 30px;
    min-height: 30px;
    font-size: 0.7rem;
  }

  .pack-price {
    min-height: 43px;
  }

  .pack-main-price {
    font-size: 0.9rem;
  }

  .pack-sale-detail {
    min-height: 25px;
  }

  .pack-sale-detail span {
    font-size: 0.62rem;
  }

  .quantity-stepper-row {
    grid-template-rows: 12px 28px 34px;
    min-height: 76px;
  }

  .quantity-stepper-row label {
    font-size: 0.64rem;
  }

  .quantity-stepper {
    grid-template-columns: 26px 40px 26px;
    min-height: 28px;
  }

  .quantity-stepper-button,
  .quantity-stepper input,
  .quantity-row .quantity-stepper input {
    height: 28px;
    min-height: 28px;
  }

  .quantity-stepper-button {
    width: 26px;
  }

  .quantity-stepper input,
  .quantity-row .quantity-stepper input {
    width: 40px;
    max-width: 40px;
  }

  .quantity-stepper-row .primary-button {
    height: 34px;
    min-height: 34px;
  }
}

/* Ajuste header, categorias horizontales y tarjetas catalogo */
.top-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-menu {
  display: none !important;
}

.whatsapp-header-button {
  min-width: 44px;
  min-height: 42px;
  border: 2px solid var(--gb-black, #111) !important;
  background: #25d366 !important;
  color: #ffffff !important;
  box-shadow: 3px 3px 0 var(--gb-black, #111);
  padding: 0 12px !important;
}

.whatsapp-header-button .whatsapp-icon {
  width: 22px;
  height: 22px;
  background: #ffffff;
  color: #25d366;
}

.whatsapp-header-button .whatsapp-label {
  font-size: 0.86rem;
  font-weight: 950;
}

.header-cart-button,
.cart-button.header-cart-button {
  position: relative;
  min-height: 42px;
  border: 2px solid var(--gb-black, #111) !important;
  border-radius: 9px !important;
  background: var(--gb-black, #111) !important;
  color: var(--gb-yellow, #ffd429) !important;
  box-shadow: 3px 3px 0 var(--gb-red, #d71920);
  padding: 0 12px !important;
  gap: 7px;
}

.header-cart-button::before {
  content: "🛒";
  font-size: 1rem;
  line-height: 1;
}

.header-cart-button #cartCount {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gb-black, #111);
  border-radius: 999px;
  background: var(--gb-red, #d71920) !important;
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 950;
  padding: 0 4px;
}

.category-row {
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 2px 0 8px;
}

.mobile-category-menu {
  display: none !important;
}

.desktop-category-buttons {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  width: max-content;
  min-width: 100%;
}

.category-row button {
  flex: 0 0 auto !important;
  min-width: max-content !important;
  min-height: 38px;
  border: 2px solid rgba(17, 17, 17, 0.28);
  border-radius: 999px;
  background: #fffdf0;
  color: var(--gb-black, #111);
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: none;
}

.category-row button.active {
  border-color: var(--gb-black, #111) !important;
  background: var(--gb-yellow, #ffd429) !important;
  color: var(--gb-black, #111) !important;
  box-shadow: 3px 3px 0 var(--gb-black, #111);
}

.product-card {
  grid-template-rows: auto 1fr;
}

.product-image-button,
.product-image {
  height: 202px;
}

.product-image {
  padding: 6px;
}

.product-body {
  gap: 7px;
  padding: 10px;
}

.product-title {
  height: 50px;
  min-height: 50px;
  margin-bottom: -2px;
  font-size: 0.94rem;
  line-height: 1.13;
}

.variant-select-row {
  height: 34px;
  min-height: 34px;
  margin-top: -1px;
  gap: 0;
  font-size: 0;
}

.variant-select-row select {
  height: 34px;
  min-height: 34px;
  font-size: 0.78rem;
  font-weight: 850;
}

.pack-price {
  min-height: 58px;
  gap: 4px;
  padding-top: 2px;
}

.pack-main-price {
  font-size: 1.12rem;
  line-height: 1.08;
}

.pack-sale-detail {
  display: grid;
  gap: 3px;
  min-height: 32px;
}

.pack-sale-detail span {
  font-size: 0.72rem;
  line-height: 1.16;
}

.quantity-stepper-row {
  grid-template-rows: 14px 30px 36px;
  gap: 5px;
  min-height: 88px;
  padding-top: 2px;
}

.quantity-stepper-row label {
  font-size: 0.72rem;
  line-height: 1;
}

.quantity-stepper {
  grid-template-columns: 28px 46px 28px;
  justify-content: start;
  gap: 4px;
}

.quantity-stepper input,
.quantity-row .quantity-stepper input {
  width: 46px;
  max-width: 46px;
  text-align: center;
}

.floating-cart-button {
  width: auto;
  min-width: 42px;
  min-height: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: center;
  }

  .top-actions {
    width: auto !important;
    margin-left: auto;
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 7px;
  }

  .whatsapp-header-button {
    width: 42px;
    min-width: 42px;
    padding: 0 !important;
  }

  .whatsapp-header-button .whatsapp-label,
  .header-cart-button .cart-button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .header-cart-button,
  .cart-button.header-cart-button {
    display: inline-flex !important;
    min-width: 48px;
    width: 48px;
    padding: 0 !important;
    justify-content: center;
    gap: 0;
  }

  .header-cart-button #cartCount {
    position: absolute;
    top: -7px;
    right: -7px;
  }

  .category-row {
    margin-left: -2px;
    margin-right: -2px;
    padding-bottom: 9px;
  }

  .desktop-category-buttons {
    gap: 7px;
    padding: 0 2px;
  }

  .category-row button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .product-image-button,
  .product-image {
    height: 136px;
  }

  .product-body {
    gap: 6px;
    padding: 7px;
  }

  .product-title {
    height: 43px;
    min-height: 43px;
    font-size: 0.73rem;
    line-height: 1.12;
  }

  .variant-select-row {
    height: 30px;
    min-height: 30px;
  }

  .variant-select-row select {
    height: 30px;
    min-height: 30px;
    font-size: 0.7rem;
  }

  .pack-price {
    min-height: 50px;
    gap: 3px;
  }

  .pack-main-price {
    font-size: 0.92rem;
  }

  .pack-sale-detail {
    min-height: 29px;
    gap: 2px;
  }

  .pack-sale-detail span {
    font-size: 0.63rem;
  }

  .quantity-stepper-row {
    grid-template-rows: 12px 28px 34px;
    gap: 5px;
    min-height: 82px;
  }

  .quantity-stepper-row label {
    font-size: 0.64rem;
  }

  .quantity-stepper {
    grid-template-columns: 26px 40px 26px;
  }

  .quantity-stepper input,
  .quantity-row .quantity-stepper input {
    width: 40px;
    max-width: 40px;
  }

  .floating-cart-button {
    right: 8px !important;
    bottom: 10px !important;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }
}

/* Cabecera compacta */
.topbar {
  min-height: 54px !important;
  padding: 4px clamp(10px, 3vw, 28px) !important;
  gap: 10px !important;
  align-items: center !important;
  border-bottom-width: 3px !important;
}

.brand {
  gap: 8px !important;
}

.brand-mark {
  width: 42px !important;
  height: 42px !important;
  border-width: 2px !important;
  border-radius: 7px !important;
  box-shadow: 3px 3px 0 var(--gb-black, #111) !important;
  font-size: 0.92rem !important;
}

.brand h1 {
  font-size: clamp(1.35rem, 3vw, 2.05rem) !important;
  line-height: 0.9 !important;
}

.brand p {
  margin-top: 1px !important;
  font-size: clamp(0.58rem, 1vw, 0.74rem) !important;
  line-height: 1 !important;
}

.top-actions {
  gap: 7px !important;
  flex-wrap: nowrap !important;
}

.whatsapp-header-button {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  box-shadow: 2px 2px 0 var(--gb-black, #111) !important;
}

.whatsapp-header-button .whatsapp-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.whatsapp-header-button .whatsapp-icon {
  width: 20px !important;
  height: 20px !important;
}

.header-cart-button,
.cart-button.header-cart-button {
  width: 38px !important;
  min-width: 38px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  justify-content: center !important;
  border-radius: 10px !important;
  box-shadow: 2px 2px 0 var(--gb-red, #d71920) !important;
}

.header-cart-button .cart-button-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.header-cart-button::before {
  content: "🛒" !important;
  font-size: 1rem !important;
}

.header-cart-button #cartCount {
  position: absolute !important;
  top: -7px !important;
  right: -7px !important;
  min-width: 18px !important;
  height: 18px !important;
  border-width: 2px !important;
  font-size: 0.66rem !important;
  padding: 0 3px !important;
}

@media (max-width: 900px) {
  .topbar {
    min-height: 50px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
  }

  .brand {
    gap: 7px !important;
    min-width: 0 !important;
  }

  .brand-mark {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.82rem !important;
  }

  .brand h1 {
    font-size: clamp(1.18rem, 6vw, 1.62rem) !important;
  }

  .brand p {
    font-size: 0.56rem !important;
  }

  .top-actions {
    width: auto !important;
    gap: 6px !important;
  }

  .whatsapp-header-button {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .header-cart-button,
  .cart-button.header-cart-button {
    width: 36px !important;
    min-width: 36px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}

/* Correccion cabecera una sola linea mobile */
.topbar {
  flex-wrap: nowrap !important;
}

.brand {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.brand > div:not(.brand-mark) {
  min-width: 0 !important;
}

.brand h1,
.brand p {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.top-actions {
  flex: 0 0 auto !important;
  width: auto !important;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: nowrap !important;
  }

  .brand h1 {
    font-size: clamp(1.02rem, 5.2vw, 1.38rem) !important;
  }

  .brand p {
    font-size: 0.5rem !important;
  }
}

/* Forzar cabecera compacta horizontal */
.topbar {
  flex-direction: row !important;
  justify-content: space-between !important;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: row !important;
    justify-content: space-between !important;
  }

  .brand {
    width: auto !important;
    max-width: calc(100% - 88px) !important;
  }
}

/* Rediseño formal carrito catalogo */
.cart-drawer.open {
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background: rgba(17, 17, 17, 0.48) !important;
}

body.cart-is-open .floating-cart-button {
  display: none !important;
}

.cart-panel {
  width: min(980px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-height: min(780px, calc(100dvh - 28px)) !important;
  padding: 14px !important;
  border: 1px solid rgba(17, 17, 17, 0.18) !important;
  border-radius: 14px !important;
  background: #fffdf4 !important;
  box-shadow: 0 20px 52px rgba(17, 17, 17, 0.24) !important;
  overflow: hidden !important;
}

.cart-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid rgba(17, 17, 17, 0.14) !important;
}

.cart-kicker,
.cart-head h2::before {
  content: none !important;
  display: block !important;
  margin: 0 0 2px !important;
  color: var(--gb-red, #d71920) !important;
  font-size: 0.68rem !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.cart-head h2 {
  margin: 0 !important;
  color: var(--gb-black, #111) !important;
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

.cart-head p#cartSubtitle {
  margin: 5px 0 0 !important;
  color: #4b4030 !important;
  font-size: 0.82rem !important;
  font-weight: 850 !important;
}

.cart-close-button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(17, 17, 17, 0.18) !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: var(--gb-black, #111) !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.cart-layout {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr) !important;
  gap: 14px !important;
  padding-top: 12px !important;
  overflow: hidden !important;
}

.cart-products-section,
.cart-sidebar,
.cart-section {
  min-height: 0 !important;
}

.cart-products-section {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 8px !important;
}

.cart-products-section h3,
.cart-section h3 {
  margin: 0 !important;
  color: var(--gb-black, #111) !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.cart-items::before,
.customer-fields::before,
.cart-actions::before {
  display: none !important;
  content: none !important;
}

.cart-items {
  display: grid !important;
  gap: 7px !important;
  overflow: auto !important;
  padding-right: 3px !important;
}

.cart-sidebar {
  display: grid !important;
  gap: 10px !important;
  align-content: start !important;
  overflow: auto !important;
}

.cart-section {
  padding: 10px !important;
  border: 1px solid rgba(17, 17, 17, 0.13) !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.cart-summary-section {
  order: -1 !important;
  border-color: rgba(215, 25, 32, 0.35) !important;
  background: linear-gradient(180deg, #fff9d7, #ffffff) !important;
}

.cart-total {
  margin: 7px 0 8px !important;
  padding: 9px 10px !important;
  border: 1px solid var(--gb-black, #111) !important;
  border-radius: 10px !important;
  background: var(--gb-yellow, #ffd429) !important;
  color: var(--gb-black, #111) !important;
}

.cart-total span {
  color: var(--gb-black, #111) !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.cart-total strong {
  color: var(--gb-red, #d71920) !important;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.minimum-status {
  margin: 0 !important;
  padding: 8px 9px !important;
  border-radius: 9px !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
}

.minimum-status.reached {
  color: #12612d !important;
  background: #e5f7e9 !important;
  border: 1px solid rgba(18, 97, 45, 0.22) !important;
}

.minimum-status.pending {
  color: #7b2300 !important;
  background: #fff2d6 !important;
  border: 1px solid rgba(215, 25, 32, 0.18) !important;
}

.compact-cart-item,
.cart-item.compact-cart-item {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) minmax(112px, auto) !important;
  gap: 9px !important;
  align-items: center !important;
  padding: 8px !important;
  border: 1px solid rgba(17, 17, 17, 0.12) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

.compact-cart-item .cart-item-image {
  width: 58px !important;
  height: 58px !important;
  border: 1px solid rgba(17, 17, 17, 0.08) !important;
  border-radius: 8px !important;
  background: #fffdf4 !important;
  object-fit: contain !important;
}

.compact-cart-item .cart-item-main {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

.compact-cart-item .cart-item-main strong {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: var(--gb-black, #111) !important;
  font-size: 0.84rem !important;
  font-weight: 950 !important;
  line-height: 1.16 !important;
}

.compact-cart-item .cart-item-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 3px 8px !important;
  margin: 0 !important;
}

.compact-cart-item .cart-item-meta span {
  display: inline !important;
  color: #625542 !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  line-height: 1.15 !important;
}

.compact-cart-item .cart-item-side {
  min-width: 0 !important;
  display: grid !important;
  gap: 5px !important;
  justify-items: end !important;
  align-content: center !important;
}

.compact-cart-item .cart-item-side strong {
  color: var(--gb-red, #d71920) !important;
  font-size: 0.92rem !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.cart-remove-button {
  min-height: 26px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(215, 25, 32, 0.28) !important;
  border-radius: 999px !important;
  background: #fff6f2 !important;
  color: var(--gb-red, #d71920) !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
}

.customer-fields {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  margin: 8px 0 0 !important;
}

.customer-fields label {
  gap: 4px !important;
  color: var(--gb-black, #111) !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
}

.customer-fields input {
  min-height: 34px !important;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  font-size: 0.88rem !important;
}

.cart-action-section {
  background: #fffdf4 !important;
}

.cart-actions {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
}

.cart-actions .whatsapp-button,
.cart-actions .secondary-button {
  min-height: 38px !important;
  border-radius: 10px !important;
  font-size: 0.86rem !important;
  font-weight: 950 !important;
}

.cart-actions .whatsapp-button {
  background: #1fae52 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.cart-actions .whatsapp-button::before {
  content: "☎";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ffffff;
  color: #1fae52;
  font-size: 0.72rem;
  font-weight: 950;
}

.cart-actions .secondary-button {
  background: #ffffff !important;
  color: var(--gb-black, #111) !important;
  border: 1px solid rgba(17, 17, 17, 0.18) !important;
}

.cart-action-section::after_DISABLED {
  content: "Seguir comprando";
  display: grid;
  place-items: center;
  min-height: 32px;
  margin-top: 8px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 10px;
  background: #ffffff;
  color: var(--gb-black, #111);
  font-size: 0.8rem;
  font-weight: 900;
  pointer-events: none;
}

.cart-error {
  margin-bottom: 8px !important;
  padding: 8px 9px !important;
  font-size: 0.8rem !important;
}

.floating-cart-button {
  right: 14px !important;
  bottom: 14px !important;
  width: auto !important;
  min-width: 46px !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: 2px solid var(--gb-black, #111) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--gb-black, #111) !important;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.16) !important;
  transform: none !important;
}

.floating-cart-button:hover,
.floating-cart-button:focus-visible {
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.2) !important;
}

.floating-cart-label::before {
  content: none !important;
  display: none !important;
}

.floating-cart-icon {
  display: inline-flex !important;
  font-size: 1rem !important;
  line-height: 1 !important;
}

.floating-cart-label {
  color: var(--gb-black, #111) !important;
  font-size: 0.8rem !important;
  font-weight: 950 !important;
}

.floating-cart-count,
#floatingCartCount {
  position: absolute !important;
  right: -6px !important;
  top: -7px !important;
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 5px !important;
  display: grid !important;
  place-items: center !important;
  border: 2px solid #ffffff !important;
  border-radius: 999px !important;
  background: var(--gb-red, #d71920) !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  font-weight: 950 !important;
}

@media (min-width: 821px) {
  .customer-section .customer-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .cart-drawer.open {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }

  .cart-panel {
    width: 100% !important;
    max-height: 100dvh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    padding: 10px !important;
  }

  .cart-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: #fffdf4 !important;
  }

  .cart-layout {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    overflow: auto !important;
    padding-bottom: 18px !important;
  }

  .cart-products-section {
    order: 0 !important;
  }

  .cart-sidebar {
    order: 1 !important;
    overflow: visible !important;
  }

  .cart-items {
    overflow: visible !important;
  }

  .compact-cart-item,
  .cart-item.compact-cart-item {
    grid-template-columns: 50px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .compact-cart-item .cart-item-image {
    width: 50px !important;
    height: 50px !important;
  }

  .compact-cart-item .cart-item-side {
    grid-column: 1 / -1 !important;
    grid-template-columns: 1fr auto !important;
    justify-items: start !important;
    align-items: center !important;
  }

  .compact-cart-item .cart-item-side strong {
    font-size: 0.95rem !important;
  }

  .cart-section {
    padding: 9px !important;
  }

  .floating-cart-button {
    right: 10px !important;
    bottom: 10px !important;
    min-width: 42px !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
  }

  .floating-cart-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
  }
}

/* Ajuste carrito multiples productos y datos cliente */
.cart-panel,
.cart-layout,
.cart-products-section,
.cart-sidebar,
.cart-section,
.cart-items,
.customer-fields,
.customer-fields label,
.customer-fields input,
.compact-cart-item,
.cart-item.compact-cart-item {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.cart-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}

.cart-layout {
  height: 100% !important;
  min-height: 0 !important;
}

.cart-products-section,
.cart-sidebar {
  max-height: 100% !important;
}

.cart-items {
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.customer-fields label {
  display: grid !important;
  width: 100% !important;
  overflow: visible !important;
}

.customer-fields input {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.compact-cart-item,
.cart-item.compact-cart-item {
  height: auto !important;
  min-height: 74px !important;
}

.compact-cart-item .cart-item-side strong {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

@media (min-width: 821px) {
  .cart-products-section {
    min-height: 0 !important;
  }

  .cart-sidebar {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .customer-section .customer-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 820px) {
  .cart-panel {
    overflow: hidden !important;
  }

  .cart-layout {
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-content: start !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .cart-products-section {
    display: grid !important;
    grid-template-rows: auto auto !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  .cart-items {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .cart-sidebar {
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 8px !important;
  }

  .customer-section {
    padding: 8px !important;
  }

  .customer-section h3 {
    margin-bottom: 6px !important;
  }

  .customer-fields {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }

  .customer-fields label {
    gap: 3px !important;
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
  }

  .customer-fields input {
    height: 35px !important;
    min-height: 35px !important;
    padding: 6px 8px !important;
    font-size: 16px !important;
    line-height: 1.15 !important;
  }

  .compact-cart-item,
  .cart-item.compact-cart-item {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 7px !important;
    min-height: 72px !important;
  }

  .compact-cart-item .cart-item-image {
    width: 48px !important;
    height: 48px !important;
  }

  .compact-cart-item .cart-item-meta {
    gap: 2px 6px !important;
  }

  .compact-cart-item .cart-item-meta span {
    font-size: 0.7rem !important;
  }

  .compact-cart-item .cart-item-side {
    grid-column: 1 / -1 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .cart-total {
    padding: 8px 9px !important;
  }

  .minimum-status {
    padding: 7px 8px !important;
  }

  .cart-actions .whatsapp-button,
  .cart-actions .secondary-button {
    min-height: 36px !important;
  }
}

/* Correccion carrito: lista larga y campos completos */
body.cart-is-open {
  overflow: hidden !important;
}

body.cart-is-open .cart-drawer.open {
  overflow-x: hidden !important;
}

.customer-section .customer-fields {
  grid-template-columns: 1fr !important;
}

.customer-section .customer-fields label,
.customer-section .customer-fields input {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 820px) {
  .cart-layout {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .cart-products-section {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .cart-products-section h3 {
    margin-bottom: 7px !important;
  }

  .cart-items {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .cart-sidebar {
    display: grid !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin-top: 10px !important;
    overflow: visible !important;
  }

  .customer-section .customer-fields {
    grid-template-columns: 1fr !important;
  }
}

/* Evitar scroll horizontal de fondo mientras carrito esta abierto */
body.cart-is-open .minimum-marquee,
body.cart-is-open .desktop-category-buttons,
body.cart-is-open .category-bar,
body.cart-is-open .catalog-controls {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Ocultar fondo ancho mientras se usa el carrito */
body.cart-is-open .minimum-marquee,
body.cart-is-open .desktop-category-buttons {
  display: none !important;
}

/* Bloquear ancho del documento durante carrito abierto */
html:has(body.cart-is-open),
body.cart-is-open {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: clip !important;
}

/* Orden visual carrito: cliente, productos, resumen, acciones */
.cart-layout {
  grid-template-columns: 1fr !important;
  align-content: start !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.cart-layout > .customer-section,
.cart-layout > .cart-products-section,
.cart-layout > .cart-summary-section,
.cart-layout > .cart-action-section {
  width: 100% !important;
  max-width: 100% !important;
}

.cart-products-section {
  display: block !important;
  overflow: visible !important;
}

.cart-products-section h3 {
  margin-bottom: 8px !important;
}

.cart-items {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.cart-summary-section {
  order: initial !important;
  margin-top: 2px !important;
}

.cart-summary-counts {
  margin: 6px 0 8px !important;
  color: #4b4030 !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
}

.cart-action-section {
  margin-bottom: 2px !important;
}

@media (min-width: 821px) {
  .cart-panel {
    width: min(860px, calc(100vw - 32px)) !important;
  }

  .customer-section .customer-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .cart-layout {
    display: block !important;
    height: 100% !important;
  }

  .cart-layout > .cart-section,
  .cart-layout > .cart-products-section {
    margin-bottom: 10px !important;
  }

  .cart-items {
    display: grid !important;
    gap: 7px !important;
  }
}

/* Layout fijo reconstruido del carrito */
.cart-drawer.open {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow: hidden !important;
}

.cart-panel {
  width: min(900px, calc(100vw - 32px)) !important;
  height: min(840px, calc(100dvh - 32px)) !important;
  max-height: calc(100dvh - 32px) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  padding: 12px !important;
}

.cart-head {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 0 0 9px !important;
}

.cart-head h2 {
  margin: 0 !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
}

.cart-head p#cartSubtitle {
  margin: 4px 0 0 !important;
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
}

.cart-layout {
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 10px !important;
  overflow: hidden !important;
  padding-top: 10px !important;
}

.cart-layout > .customer-section,
.cart-layout > .cart-products-section,
.cart-layout > .cart-footer {
  min-width: 0 !important;
  max-width: 100% !important;
}

.customer-section {
  flex: 0 0 auto !important;
  padding: 9px !important;
  overflow: visible !important;
}

.customer-section h3,
.cart-products-section h3 {
  margin: 0 0 7px !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
}

.customer-fields {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
}

.customer-fields label {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
  font-size: 0.74rem !important;
  line-height: 1.1 !important;
}

.customer-fields input {
  width: 100% !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 0.9rem !important;
  line-height: 1.15 !important;
}

.cart-products-section {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
}

.cart-items {
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  display: grid !important;
  align-content: start !important;
  gap: 8px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 4px 2px 0 !important;
  -webkit-overflow-scrolling: touch !important;
}

.compact-cart-item,
.cart-item.compact-cart-item {
  position: static !important;
  height: auto !important;
  min-height: 72px !important;
  flex: none !important;
}

.cart-footer {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px) !important;
  gap: 10px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.cart-footer .cart-section {
  margin: 0 !important;
  padding: 9px !important;
}

.cart-summary-section {
  order: initial !important;
}

.cart-summary-counts {
  margin: 0 0 6px !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.cart-total {
  margin: 0 0 7px !important;
  padding: 8px 9px !important;
}

.minimum-status {
  margin: 0 !important;
  padding: 7px 8px !important;
}

.cart-actions {
  display: grid !important;
  gap: 7px !important;
  margin: 0 !important;
}

.cart-actions .whatsapp-button,
.cart-actions .secondary-button {
  min-height: 34px !important;
}

@media (max-width: 820px) {
  .cart-drawer.open {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }

  .cart-panel {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding: 9px !important;
  }

  .cart-layout {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding-top: 8px !important;
  }

  .customer-section {
    padding: 8px !important;
  }

  .customer-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .customer-fields label:last-child {
    grid-column: 1 / -1 !important;
  }

  .customer-fields label {
    font-size: 0.7rem !important;
  }

  .customer-fields input {
    height: 32px !important;
    min-height: 32px !important;
    font-size: 16px !important;
  }

  .cart-footer {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  .cart-footer .cart-section {
    padding: 8px !important;
  }

  .cart-total strong {
    font-size: 1.25rem !important;
  }

  .cart-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
  }

  .cart-actions .whatsapp-button {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 420px) {
  .cart-head h2 {
    font-size: 1.2rem !important;
  }

  .cart-head p#cartSubtitle {
    font-size: 0.76rem !important;
  }

  .customer-fields input {
    height: 31px !important;
    min-height: 31px !important;
    padding: 5px 7px !important;
  }

  .cart-actions .whatsapp-button,
  .cart-actions .secondary-button {
    min-height: 33px !important;
    font-size: 0.78rem !important;
  }
}

/* Correccion carrito: scroll normal de pagina */
.cart-drawer.open {
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.cart-panel {
  width: min(900px, calc(100vw - 32px)) !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  display: block !important;
  overflow: visible !important;
  padding: 12px !important;
}

.cart-head,
.cart-layout,
.cart-layout > .customer-section,
.cart-layout > .cart-products-section,
.cart-layout > .cart-summary-section,
.cart-layout > .cart-action-section,
.cart-footer,
.cart-items,
.compact-cart-item,
.cart-item.compact-cart-item {
  position: static !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.cart-layout {
  display: block !important;
  padding-top: 10px !important;
}

.cart-layout > .customer-section,
.cart-layout > .cart-products-section,
.cart-layout > .cart-summary-section,
.cart-layout > .cart-action-section,
.cart-footer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 10px !important;
}

.cart-footer {
  display: block !important;
}

.cart-footer .cart-summary-section,
.cart-footer .cart-action-section {
  margin-bottom: 10px !important;
}

.cart-products-section {
  display: block !important;
}

.cart-products-section h3 {
  margin: 0 0 8px !important;
}

.cart-items {
  display: grid !important;
  align-content: start !important;
  gap: 8px !important;
  padding: 0 !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
}

.cart-summary-section {
  order: initial !important;
}

.customer-fields {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.cart-action-section .cart-actions,
.cart-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

body.cart-is-open {
  overflow: hidden !important;
}

@media (max-width: 820px) {
  .cart-drawer.open {
    display: block !important;
    padding: 0 !important;
  }

  .cart-panel {
    width: 100% !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    padding: 10px !important;
  }

  .cart-head {
    padding-bottom: 9px !important;
  }

  .customer-fields {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .customer-fields label:last-child {
    grid-column: auto !important;
  }

  .customer-fields input {
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .compact-cart-item,
  .cart-item.compact-cart-item {
    min-height: 72px !important;
  }

  .cart-actions {
    grid-template-columns: 1fr !important;
  }

  .cart-actions .whatsapp-button {
    grid-column: auto !important;
  }
}

/* Gestion de productos compacta */
#adminView > .section-head {
  display: none !important;
}

#resetProducts {
  display: none !important;
}

.product-action-bar {
  align-items: center;
}

.more-product-actions {
  position: relative;
}

.more-product-actions summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  padding: 0.72rem 1rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.more-product-actions summary::-webkit-details-marker {
  display: none;
}

.more-product-actions-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
}

.more-product-actions:not([open]) .more-product-actions-menu {
  display: none;
}

.more-product-actions-menu .secondary-button {
  width: 100%;
  justify-content: flex-start;
  padding: 0.62rem 0.75rem;
}

#adminView .admin-table {
  min-width: 900px;
}

#adminView .admin-table th,
#adminView .admin-table td {
  padding: 0.62rem 0.7rem;
  vertical-align: middle;
}

#adminView .product-photo-cell {
  width: 64px;
}

#adminView .product-thumb,
#adminView .mobile-product-thumb img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.1);
}

#adminView .image-upload-cell {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#adminView .no-photo-pill {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

#adminView .stock-cell {
  justify-content: flex-start;
  gap: 0.45rem;
  white-space: nowrap;
}

#adminView .stock-button,
#adminView .edit-product-button {
  min-height: 34px;
  border-radius: 9px;
  padding: 0.42rem 0.66rem;
  font-size: 0.78rem;
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-weight: 900;
  font-size: 0.78rem;
  background: #f3f4f6;
  color: #374151;
}

.catalog-status.is-visible {
  background: #dcfce7;
  color: #166534;
}

.catalog-status.is-hidden {
  background: #fee2e2;
  color: #991b1b;
}

.mobile-product-card {
  display: none;
}

@media (max-width: 820px) {
  #adminView .section-head {
    gap: 0.75rem;
  }

  #adminView .internal-product-toolbar {
    gap: 0.75rem;
  }

  #adminView .product-action-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  #adminView .add-product-button {
    min-height: 42px;
    padding: 0.72rem 0.9rem;
  }

  .more-product-actions summary {
    min-height: 42px;
    padding: 0.65rem 0.78rem;
    white-space: nowrap;
  }

  .more-product-actions-menu {
    right: 0;
    left: auto;
    min-width: min(78vw, 260px);
  }

  #adminView .admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #adminView .table-caption {
    padding: 0.2rem 0 0.55rem;
  }

  #adminView .admin-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 0.45rem;
  }

  #adminView .admin-table thead {
    display: none;
  }

  #adminView .admin-table tbody,
  #adminView .admin-table tr {
    display: block;
  }

  #adminView .admin-table tr {
    padding: 0;
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  }

  #adminView .admin-table td {
    border: 0;
    padding: 0;
  }

  #adminView .admin-table td:not(.mobile-product-card) {
    display: none !important;
  }

  #adminView .admin-table td::before {
    display: none !important;
  }

  #adminView .mobile-product-card {
    display: block !important;
  }

  #adminView .mobile-product-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.58rem;
    min-height: 64px;
  }

  #adminView .mobile-product-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(17, 24, 39, 0.08);
    display: grid;
    place-items: center;
    overflow: hidden;
  }

  #adminView .mobile-product-thumb img {
    width: 44px;
    height: 44px;
    border: 0;
  }

  #adminView .mobile-product-thumb span {
    padding: 0.2rem;
    color: #6b7280;
    font-size: 0.62rem;
    line-height: 1.05;
    font-weight: 800;
    text-align: center;
  }

  #adminView .mobile-product-info {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
  }

  #adminView .mobile-product-info strong {
    color: #111827;
    font-size: 0.86rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #adminView .mobile-product-info span {
    color: #4b5563;
    font-size: 0.75rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #adminView .mobile-product-info small {
    color: #111827;
    font-size: 0.73rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #adminView .mobile-edit-product {
    min-height: 34px;
    padding: 0.44rem 0.58rem;
    border-radius: 9px;
    font-size: 0.72rem;
  }
}

/* Edicion de producto compacta */
.edit-product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-product-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.edit-product-close {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
}

.product-edit-modal {
  gap: 10px;
  width: min(680px, 100%);
  padding: 14px;
}

.product-edit-modal > .product-edit-grid {
  gap: 8px;
  padding: 10px;
}

.product-edit-grid label {
  gap: 4px;
  font-size: 0.82rem;
}

.product-edit-grid input,
.product-edit-grid select,
.product-edit-grid textarea {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.product-edit-grid textarea {
  min-height: 68px;
}

.product-edit-modal .edit-image-preview {
  grid-template-columns: 68px 1fr;
  gap: 8px;
  padding: 8px;
}

.product-edit-modal .edit-image-preview img {
  width: 68px;
  height: 54px;
}

.product-edit-modal .product-image-gallery {
  gap: 6px;
  max-height: 110px;
  overflow: auto;
}

.edit-product-more-options {
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  background: #f8fafc;
}

.edit-product-more-options summary {
  cursor: pointer;
  padding: 9px 11px;
  font-weight: 900;
  color: #374151;
}

.edit-product-more-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 10px 10px;
}

.edit-product-more-actions .small-button,
.edit-product-primary-actions .small-button {
  min-height: 36px;
  padding: 0.48rem 0.75rem;
  border-radius: 9px;
}

.edit-product-primary-actions {
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.edit-product-primary-actions .primary-button {
  min-width: 150px;
}

@media (max-width: 720px) {
  .product-edit-modal {
    padding: 12px;
    gap: 8px;
  }

  .product-edit-modal > .product-edit-grid {
    grid-template-columns: 1fr;
  }

  .edit-product-more-actions,
  .edit-product-primary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .edit-product-primary-actions .primary-button {
    min-width: 0;
  }
}
/* Pedidos compactos - Gestion Interna */
#addSampleOrder {
  display: none !important;
}

.orders-list {
  gap: 12px;
}

.internal-web-pending-slot {
  margin-bottom: 8px;
}

.internal-web-pending {
  display: grid;
  gap: 8px;
}

.internal-web-pending-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid rgba(201, 162, 74, 0.4);
  border-radius: 12px;
  background: #111;
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  cursor: pointer;
}

.internal-web-pending.has-pending .internal-web-pending-toggle {
  border-color: rgba(201, 162, 74, 0.85);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.internal-web-pending.is-empty .internal-web-pending-toggle {
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.72;
  cursor: default;
}

.internal-web-pending-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 950;
}

.internal-web-pending-title svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #c9a24a;
}

.internal-web-pending-title b {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d71920;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.internal-web-pending-toggle small {
  color: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.82;
  text-align: right;
}

.internal-web-pending-list {
  display: grid;
  gap: 6px;
}

.internal-web-pending-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 10px;
  background: #fff;
}

.internal-web-pending-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.internal-web-pending-row strong,
.internal-web-pending-row span,
.internal-web-pending-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.internal-web-pending-row strong {
  color: #111827;
  font-size: 0.86rem;
}

.internal-web-pending-row em {
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid rgba(29, 78, 216, 0.22);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.internal-web-pending-row span,
.internal-web-pending-row small {
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 750;
}

body.operational-web-detail-mode #ordersView > .section-head {
  display: none;
}

body.operational-web-detail-mode #ordersView {
  padding-top: 0;
}

.operational-web-order-card {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(201, 162, 74, 0.38);
  border-radius: 10px;
  background: #f6f3ec;
  box-shadow: none;
}

.operational-web-order-head {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #0b0b0b;
  color: #fff;
}

.operational-web-order-head > .small-button {
  width: fit-content;
}

.operational-web-order-head .status-pill.status-en-revision {
  border-color: rgba(201, 162, 74, 0.85);
  background: #fff;
  color: #111;
}

.operational-web-order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.operational-web-order-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.operational-web-order-summary h3 {
  margin: 0;
  color: #fff;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.operational-web-order-summary span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.operational-web-order-summary strong {
  color: #c9a24a;
  font-size: 1.08rem;
  font-weight: 950;
  text-align: right;
}

.operational-web-order-card .compact-order-detail {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.operational-web-order-card .compact-order-detail > summary {
  display: none;
}

.operational-web-order-card .compact-order-section,
.operational-web-order-card .compact-order-summary {
  border: 1px solid #ded6c5;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: none;
}

.operational-web-order-card .compact-section-title-row h4,
.operational-web-order-card .budget-items-title-row h4,
.operational-web-order-card .compact-order-data-panel h4 {
  margin: 0;
  color: #111;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.operational-web-order-card .client-order-section {
  display: grid;
  gap: 8px;
}

.operational-web-order-card .compact-customer-readonly {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.operational-web-order-card .compact-customer-readonly span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e4dece;
  border-radius: 8px;
  background: #fffaf0;
  color: #6b6250;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.operational-web-order-card .compact-customer-readonly b {
  color: #111;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.operational-web-order-card .compact-budget-items {
  display: grid;
  gap: 8px;
}

.operational-web-hidden {
  display: none !important;
}

.operational-web-product-item {
  margin: 0;
}

.operational-web-product-item .quick-sale-item-main strong {
  font-size: 1rem;
}

.operational-web-product-item .quick-sale-item-main span {
  color: #4d4638;
  font-size: 0.9rem;
  font-weight: 950;
}

.operational-web-product-actions {
  justify-content: flex-start;
}

.operational-web-product-actions .small-button {
  min-height: 38px;
}

.operational-web-order-card .consultation-summary-box {
  display: grid;
  gap: 8px;
}

.operational-web-order-card .consultation-total-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #0b0b0b;
  font-size: 1.22rem;
  font-weight: 950;
}

.operational-web-order-card .consultation-summary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  color: #6b6250;
  font-size: 0.82rem;
  font-weight: 800;
}

.operational-web-order-card .compact-order-actions {
  display: grid;
  gap: 8px;
}

@media (max-width: 640px) {
  .internal-web-pending-toggle {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .internal-web-pending-toggle small {
    text-align: left;
  }

  .operational-web-order-card {
    margin-inline: -6px;
    padding: 8px;
  }

  .operational-web-order-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .operational-web-order-summary > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .operational-web-order-summary strong {
    text-align: right;
  }

  .operational-web-order-card .compact-customer-readonly,
  .operational-web-order-card .consultation-summary-meta {
    grid-template-columns: 1fr;
  }

  .operational-web-order-card .consultation-total-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    font-size: 1.08rem;
  }

  .operational-web-product-actions {
    align-items: stretch;
  }

  .operational-web-product-actions .small-button {
    flex: 1;
  }
}

.orders-workbar {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: #fffdf4;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.orders-search-box {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #374151;
}

.orders-search-box input {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  padding: 0 12px;
  font: inherit;
  background: #fff;
}

.orders-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.orders-filter-button {
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.orders-filter-button.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.orders-compact-table {
  display: grid;
  gap: 6px;
}

.orders-compact-head,
.orders-compact-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.35fr 1.05fr 0.9fr 1fr 72px;
  align-items: center;
  gap: 10px;
}

.orders-compact-head {
  padding: 0 12px 4px;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.orders-compact-row {
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.orders-compact-row.order-status-pagado,
.orders-compact-row.order-status-entregado {
  border-left-color: #16a34a;
}

.orders-compact-row.order-status-cancelado {
  border-left-color: #dc2626;
}

.orders-compact-row.order-status-pendiente-de-pago,
.orders-compact-row.order-status-en-revision {
  border-left-color: #f59e0b;
}

.orders-row-number,
.orders-row-total {
  color: #111827;
  font-weight: 950;
}

.orders-row-number {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.1;
}

.order-origin-badge,
.order-origin-inline {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #f8fafc;
  color: #374151;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.order-origin-badge {
  padding: 2px 6px;
}

.order-origin-inline {
  margin-top: 4px;
  padding: 3px 8px;
}

.order-origin-web {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  color: #1d4ed8;
}

.order-origin-local {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffbeb;
  color: #92400e;
}

.orders-row-date,
.orders-row-client,
.orders-row-location {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  color: #374151;
}

.orders-row-action {
  display: flex;
  justify-content: flex-end;
}

.orders-row-action .small-button {
  min-height: 32px;
  padding: 0.42rem 0.7rem;
}

.compact-order-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7cc, #ffffff);
}

.compact-order-top h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #111827;
}

.compact-order-top span:not(.status-pill) {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 750;
}

.compact-order-detail {
  display: block;
  margin-top: 10px;
}

.compact-order-detail > summary {
  display: none;
}

.compact-order-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: #fff;
}

.compact-order-section h4,
.budget-items-title-row h4 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 950;
}

.compact-customer-grid,
.compact-checkout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.compact-customer-grid label,
.compact-checkout-grid label,
.compact-budget-search label {
  display: grid;
  gap: 5px;
  color: #374151;
  font-size: 0.74rem;
  font-weight: 900;
}

.operational-web-order-card .compact-budget-search label {
  font-size: 0.86rem;
}

.compact-customer-grid input,
.compact-checkout-grid input,
.compact-checkout-grid select,
.compact-budget-search input {
  min-height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  padding: 0 9px;
  background: #fff;
  font: inherit;
}

.operational-web-order-card .compact-budget-search input {
  min-height: 48px;
  padding-inline: 12px;
  font-size: 1rem;
}

.compact-checkout-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-checkout-grid .conditional-delivery-field {
  grid-column: span 2;
}

.discount-input-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
}

.compact-budget-search {
  margin-bottom: 10px;
}

.budget-search-results {
  margin-top: 6px;
}

.budget-items-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.budget-items-title-row span {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 850;
}

.compact-budget-items {
  display: grid;
  gap: 6px;
}

.compact-budget-items .budget-item-head,
.compact-budget-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.7fr) minmax(90px, 0.75fr) minmax(105px, 0.85fr) 72px 102px 112px 78px;
  align-items: center;
  gap: 8px;
}

.compact-budget-items .budget-item-head {
  padding: 0 8px 4px;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.compact-budget-item-row {
  padding: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 11px;
  background: #f9fafb;
}

.compact-budget-item-row .budget-product-name {
  min-width: 0;
  color: #111827;
  font-weight: 950;
  line-height: 1.25;
}

.budget-option-cell {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 800;
}

.compact-budget-item-row .budget-field {
  margin: 0;
}

.compact-budget-item-row .inline-input {
  width: 100%;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 7px;
  text-align: left;
}

.compact-quantity-field .inline-input,
.compact-price-field .inline-input {
  text-align: right;
}

.budget-subtotal-cell {
  text-align: right;
  color: #111827;
  font-weight: 950;
}

.compact-budget-item-row .icon-trash-button {
  min-height: 31px;
  padding: 0.36rem 0.55rem;
  font-size: 0.72rem;
}

.compact-order-summary {
  margin-top: 12px;
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
}

.compact-order-summary span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.compact-order-summary em {
  color: #fde68a;
  font-style: normal;
  font-weight: 850;
}

.compact-order-summary strong {
  color: #fff;
}

.compact-order-summary .final-total-line {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.compact-order-summary .final-total-line strong {
  font-size: 1.35rem;
}

.compact-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

.compact-order-actions .small-button {
  min-height: 36px;
  padding: 0.5rem 0.8rem;
}

.budget-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.62);
}

.budget-preview-dialog {
  width: min(720px, 100%);
  max-height: min(86vh, 760px);
  display: grid;
  gap: 12px;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.budget-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.budget-preview-head strong {
  display: block;
  color: #111827;
  font-size: 1rem;
}

.budget-preview-head span {
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 700;
}

.budget-preview-head .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff7cc;
  color: #111827;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.budget-preview-editor {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 900;
}

.budget-preview-editor textarea {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  padding: 11px;
  font: 0.88rem/1.45 Consolas, "Courier New", monospace;
  background: #f9fafb;
}

.budget-preview-actions {
  justify-content: flex-end;
}

@media (max-width: 920px) {
  .orders-compact-head {
    display: none;
  }

  .orders-compact-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "number status"
      "client action"
      "total date";
    min-height: 0;
    gap: 4px 10px;
    padding: 9px 10px;
  }

  .orders-row-number { grid-area: number; }
  .orders-row-status { grid-area: status; justify-self: end; }
  .orders-row-client { grid-area: client; }
  .orders-row-location { display: inline; }
  .orders-row-date { grid-area: date; justify-self: end; font-size: 0.78rem; }
  .orders-row-total { grid-area: total; }
  .orders-row-action { grid-area: action; }

  .orders-row-client::after {
    content: " · " attr(data-location);
  }

  .orders-row-location {
    display: none;
  }

  .compact-order-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .compact-order-top .small-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .compact-checkout-grid .conditional-delivery-field {
    grid-column: 1 / -1;
  }

  .compact-budget-items .budget-item-head {
    display: none;
  }

  .compact-budget-item-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product remove"
      "option subtotal"
      "presentation presentation"
      "qty price";
    gap: 6px 8px;
  }

  .compact-budget-item-row .budget-product-name { grid-area: product; }
  .budget-option-cell { grid-area: option; }
  .compact-presentation-field { grid-area: presentation; }
  .compact-quantity-field { grid-area: qty; }
  .compact-price-field { grid-area: price; }
  .budget-subtotal-cell { grid-area: subtotal; align-self: center; }
  .compact-budget-item-row .icon-trash-button { grid-area: remove; }

  .compact-order-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .orders-workbar,
  .compact-order-section,
  .compact-order-summary,
  .compact-order-top {
    border-radius: 12px;
    padding: 10px;
  }

  .orders-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .orders-filter-button {
    flex: 0 0 auto;
  }

  .compact-customer-grid,
  .compact-checkout-grid,
  .compact-order-actions {
    grid-template-columns: 1fr;
  }

  .compact-budget-item-row {
    padding: 8px;
  }

  .compact-budget-item-row .inline-input,
  .compact-customer-grid input,
  .compact-checkout-grid input,
  .compact-checkout-grid select,
  .compact-budget-search input {
    min-height: 32px;
  }

  .compact-order-summary .final-total-line strong {
    font-size: 1.2rem;
  }

  .budget-preview-modal {
    padding: 10px;
  }

  .budget-preview-dialog {
    max-height: 90vh;
    padding: 12px;
  }

  .budget-preview-editor textarea {
    min-height: 260px;
    font-size: 0.8rem;
  }
}

/* Ajuste final Consultas y Pedidos */
.compact-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.compact-customer-readonly {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-customer-readonly span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 10px;
  background: #f9fafb;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 850;
}

.compact-customer-readonly b {
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.customer-edit-toggle {
  margin-top: 8px;
}

.order-confirm-action {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.compact-budget-items .budget-item-head,
.compact-budget-item-row {
  grid-template-columns: minmax(190px, 1.9fr) minmax(90px, 0.8fr) minmax(118px, 0.85fr) minmax(96px, 0.8fr) minmax(112px, 0.85fr) 78px;
}

.quantity-with-unit {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.quantity-with-unit em {
  overflow: hidden;
  color: #4b5563;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-budget-item-row .budget-field > span:first-child {
  display: none;
}

.compact-order-summary {
  background: #fffbea;
  border: 1px solid rgba(146, 64, 14, 0.22);
  color: #111827;
}

.compact-order-summary em {
  color: #92400e;
}

.compact-order-summary strong {
  color: #111827;
}

.compact-order-summary .final-total-line {
  border-top-color: rgba(146, 64, 14, 0.22);
}

@media (max-width: 920px) {
  .compact-customer-readonly {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .compact-customer-readonly span {
    padding: 7px 9px;
    font-size: 0.84rem;
  }

  .compact-budget-item-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product remove"
      "option subtotal"
      "qty qty"
      "price price";
    align-items: start;
    gap: 6px 8px;
  }

  .compact-budget-item-row .budget-product-name {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .budget-option-cell {
    font-size: 0.8rem;
  }

  .compact-quantity-field,
  .compact-price-field {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .compact-budget-item-row .budget-field > span:first-child {
    display: inline;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 950;
  }

  .compact-quantity-field { grid-area: qty; }
  .compact-price-field { grid-area: price; }

  .quantity-with-unit {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .budget-subtotal-cell {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .compact-budget-item-row .icon-trash-button {
    min-width: 0;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .compact-order-top {
    gap: 7px;
  }

  .compact-order-top h3 {
    font-size: 1rem;
  }

  .compact-order-section {
    margin-top: 9px;
  }

  .compact-budget-item-row {
    border-radius: 10px;
    padding: 8px;
  }

  .compact-quantity-field,
  .compact-price-field {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .compact-order-actions {
    gap: 7px;
  }
}

/* Productos compactos dentro de Consulta/Pedido */
.compact-budget-items .budget-item-head,
.order-product-read-row {
  grid-template-columns: minmax(210px, 1.9fr) minmax(90px, 0.75fr) minmax(105px, 0.8fr) minmax(82px, 0.7fr) minmax(106px, 0.85fr) 136px;
}

.order-product-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-product-presentation,
.order-product-quantity,
.order-product-price,
.order-product-option {
  min-width: 0;
  overflow: hidden;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-product-price,
.order-product-subtotal {
  text-align: right;
  white-space: nowrap;
}

.order-product-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.order-product-actions .small-button {
  min-height: 30px;
  padding: 0.34rem 0.55rem;
  font-size: 0.72rem;
}

.budget-item-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.56);
}

.budget-item-edit-dialog {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.budget-item-edit-grid {
  display: grid;
  gap: 8px;
}

.budget-item-edit-grid label {
  display: grid;
  gap: 5px;
  color: #374151;
  font-size: 0.76rem;
  font-weight: 900;
}

.budget-item-edit-grid input {
  min-height: 36px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 10px;
  padding: 0 10px;
  font: inherit;
}

.budget-item-edit-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: #fffbea;
  color: #92400e;
  font-weight: 900;
}

.budget-item-edit-subtotal strong {
  color: #111827;
  font-size: 1.05rem;
}

.budget-item-edit-actions {
  justify-content: flex-end;
}

@media (max-width: 920px) {
  .compact-budget-items .budget-item-head {
    display: none;
  }

  .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "line actions"
      "subtotal actions";
    align-items: center;
    gap: 4px 8px;
    padding: 8px 9px;
  }

  .order-product-line {
    grid-area: line;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.22;
    font-size: 0.86rem;
  }

  .order-product-option,
  .order-product-presentation,
  .order-product-quantity,
  .order-product-price {
    display: none;
  }

  .order-product-subtotal {
    grid-area: subtotal;
    justify-self: start;
    color: #111827;
    font-size: 0.88rem;
    text-align: left;
  }

  .order-product-subtotal::before {
    content: "Subtotal: ";
    color: #6b7280;
    font-weight: 850;
  }

  .order-product-actions {
    grid-area: actions;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
  }

  .order-product-actions .small-button {
    min-height: 28px;
    min-width: 68px;
    padding: 0.25rem 0.45rem;
  }
}

@media (max-width: 560px) {
  .order-product-read-row {
    border-radius: 10px;
    gap: 3px 7px;
  }

  .order-product-line {
    font-size: 0.82rem;
  }

  .order-product-actions .small-button {
    min-width: 62px;
    font-size: 0.68rem;
  }

  .budget-item-edit-modal {
    padding: 10px;
  }

  .budget-item-edit-dialog {
    border-radius: 14px;
    padding: 12px;
  }
}

/* Columnas finales: Producto, Opcion, Presentacion, Cantidad, Precio, Subtotal, Editar, Eliminar */
.compact-budget-items .budget-item-head,
.order-product-read-row {
  grid-template-columns: minmax(180px, 1.8fr) minmax(80px, 0.7fr) minmax(92px, 0.75fr) minmax(82px, 0.65fr) minmax(82px, 0.7fr) minmax(98px, 0.8fr) 68px 74px;
}

.order-product-edit-action,
.order-product-delete-action {
  display: flex;
  justify-content: flex-end;
}

.order-product-edit-action .small-button,
.order-product-delete-action .small-button {
  min-height: 30px;
  padding: 0.34rem 0.5rem;
  font-size: 0.7rem;
}

@media (max-width: 920px) {
  .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "line edit delete"
      "subtotal edit delete";
  }

  .order-product-edit-action {
    grid-area: edit;
    align-self: center;
  }

  .order-product-delete-action {
    grid-area: delete;
    align-self: center;
  }

  .order-product-edit-action .small-button,
  .order-product-delete-action .small-button {
    min-width: 58px;
    min-height: 28px;
    padding: 0.25rem 0.38rem;
    font-size: 0.66rem;
  }
}

/* Consultas: lista interna de articulos final */
.compact-budget-items .budget-item-head,
.order-product-read-row {
  grid-template-columns: minmax(88px, 0.72fr) minmax(210px, 1.8fr) minmax(90px, 0.75fr) minmax(105px, 0.8fr) 68px 74px;
}

.order-product-mobile-line {
  display: none;
}

.order-product-quantity,
.order-product-line,
.order-product-option,
.order-product-subtotal {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-product-line {
  color: #111827;
  font-weight: 900;
}

.order-product-quantity,
.order-product-option {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 850;
}

.order-product-subtotal {
  text-align: right;
  color: #111827;
  font-weight: 950;
}

.order-product-edit-action,
.order-product-delete-action {
  display: flex;
  justify-content: flex-end;
}

.order-product-edit-action .small-button,
.order-product-delete-action .small-button {
  min-height: 29px;
  padding: 0.3rem 0.48rem;
  font-size: 0.68rem;
}

.orders-row-client::after {
  content: " \00B7  " attr(data-location);
}

@media (max-width: 920px) {
  .compact-budget-items .budget-item-head {
    display: none;
  }

  .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "mobile edit delete"
      "subtotal edit delete";
    align-items: center;
    gap: 4px 7px;
    padding: 8px 9px;
  }

  .order-product-mobile-line {
    grid-area: mobile;
    display: block;
    min-width: 0;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .order-product-quantity,
  .order-product-line,
  .order-product-option {
    display: none;
  }

  .order-product-subtotal {
    grid-area: subtotal;
    justify-self: start;
    text-align: left;
    font-size: 0.86rem;
  }

  .order-product-edit-action {
    grid-area: edit;
    align-self: center;
  }

  .order-product-delete-action {
    grid-area: delete;
    align-self: center;
  }

  .order-product-edit-action .small-button,
  .order-product-delete-action .small-button {
    min-width: 56px;
    min-height: 28px;
    padding: 0.24rem 0.36rem;
    font-size: 0.66rem;
  }
}

@media (max-width: 560px) {
  .order-product-read-row {
    border-radius: 10px;
    padding: 8px;
  }

  .order-product-mobile-line {
    font-size: 0.8rem;
  }

  .order-product-subtotal {
    font-size: 0.82rem;
  }

  .order-product-edit-action .small-button,
  .order-product-delete-action .small-button {
    min-width: 52px;
  }
}

/* Ajuste movil final de articulos en consulta */
.order-product-mobile-main,
.order-product-mobile-option {
  display: none;
}

@media (max-width: 920px) {
  .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) 62px;
    grid-template-areas:
      "main edit"
      "option edit"
      "subtotal delete";
    align-items: center;
    gap: 4px 9px;
    padding: 10px 9px;
    min-height: 78px;
  }

  .order-product-mobile-line,
  .order-product-quantity,
  .order-product-line,
  .order-product-option {
    display: none !important;
  }

  .order-product-mobile-main {
    grid-area: main;
    display: grid;
    gap: 3px;
    min-width: 0;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .order-product-mobile-main small {
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .order-product-mobile-option {
    grid-area: option;
    display: block;
    min-height: 1em;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .order-product-subtotal {
    grid-area: subtotal;
    justify-self: start;
    color: #111827;
    font-size: 0.82rem;
    font-weight: 950;
    text-align: left;
    white-space: nowrap;
  }

  .order-product-subtotal::before {
    content: "Subtotal: ";
    color: #6b7280;
    font-weight: 850;
  }

  .order-product-edit-action,
  .order-product-delete-action {
    justify-content: stretch;
  }

  .order-product-edit-action {
    grid-area: edit;
    align-self: end;
  }

  .order-product-delete-action {
    grid-area: delete;
    align-self: start;
  }

  .order-product-edit-action .small-button,
  .order-product-delete-action .small-button {
    width: 62px;
    min-width: 62px;
    min-height: 29px;
    padding: 0.24rem 0.3rem;
    font-size: 0.66rem;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) 58px;
    padding: 10px 8px;
  }

  .order-product-mobile-main {
    font-size: 0.8rem;
  }

  .order-product-mobile-option,
  .order-product-subtotal {
    font-size: 0.76rem;
  }

  .order-product-edit-action .small-button,
  .order-product-delete-action .small-button {
    width: 58px;
    min-width: 58px;
  }
}

/* Consulta manual y resumen compacto */
.new-consultation-button {
  justify-self: start;
  min-height: 34px;
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  font-weight: 950;
}

.consultation-summary-box {
  background: #fffbea;
  border: 1px solid rgba(146, 64, 14, 0.18);
  color: #111827;
  gap: 8px;
  padding: 12px 14px;
}

.consultation-total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
}

.consultation-total-line span {
  color: #111827;
  font-size: 1.35rem;
}

.consultation-summary-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 10px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 800;
}

.consultation-summary-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consultation-summary-meta b {
  color: #111827;
  font-weight: 950;
}

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

@media (max-width: 920px) {
  .consultation-summary-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .new-consultation-button {
    width: 100%;
  }

  .consultation-summary-box {
    padding: 10px;
  }

  .consultation-total-line {
    display: grid;
    gap: 2px;
    font-size: 0.78rem;
  }

  .consultation-total-line span {
    font-size: 1.22rem;
  }

  .consultation-summary-meta {
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 0.74rem;
  }
}

/* PDF compacto consultas */
.print-preview-body .compact-document-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #d8d8d0;
  border-radius: 8px;
  background: #fff;
}

.print-preview-body .compact-document-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
}

.print-preview-body .compact-document-logo {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  background: #111;
  color: #ffd21f;
  font-size: 19px;
  line-height: 1;
  flex: 0 0 auto;
}

.print-preview-body .compact-document-logo span {
  color: #fff;
  font-size: 9px;
}

.print-preview-body .compact-document-title {
  min-width: 0;
}

.print-preview-body .compact-document-title h1 {
  margin: 0 0 4px;
  font-size: 20px;
  text-align: left;
}

.print-preview-body .compact-document-title p {
  margin: 0;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.print-preview-body .compact-document-table {
  width: 100%;
  table-layout: fixed;
  margin-top: 12px;
}

.print-preview-body .compact-document-table th,
.print-preview-body .compact-document-table td {
  padding: 5px 6px;
  font-size: 11.5px;
  line-height: 1.25;
  vertical-align: top;
}

.print-preview-body .compact-document-table th {
  background: #fff1a6;
  color: #111;
  font-size: 10px;
}

.print-preview-body .doc-qty {
  width: 70px;
  white-space: normal;
}

.print-preview-body .doc-product {
  overflow-wrap: anywhere;
  word-break: normal;
}

.print-preview-body .doc-variant {
  width: 120px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.print-preview-body .doc-money {
  width: 84px;
  text-align: right;
  white-space: nowrap;
}

.print-preview-body .compact-document-totals {
  width: min(300px, 100%);
  margin: 14px 0 0 auto;
  display: grid;
  gap: 3px;
}

.print-preview-body .compact-document-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px solid #e4e4dc;
  font-size: 12px;
}

.print-preview-body .compact-document-totals span {
  color: #333;
  font-weight: 800;
}

.print-preview-body .compact-document-final {
  align-items: center;
  padding: 7px 9px !important;
  border: 2px solid #111 !important;
  border-radius: 6px;
  background: #ffd21f;
}

.print-preview-body .compact-document-final span {
  color: #111;
  text-transform: uppercase;
}

.print-preview-body .compact-document-final strong {
  color: #b00000;
  font-size: 18px;
}

@media (max-width: 640px) {
  .print-preview-body {
    padding: 8px;
  }

  .print-preview-body .compact-document-shell {
    padding: 10px;
  }

  .print-preview-body .compact-document-header {
    align-items: flex-start;
  }

  .print-preview-body .compact-document-title h1 {
    font-size: 17px;
  }

  .print-preview-body .compact-document-title p {
    font-size: 10.5px;
  }

  .print-preview-body .compact-document-table th,
  .print-preview-body .compact-document-table td {
    padding: 4px;
    font-size: 10px;
  }

  .print-preview-body .doc-qty {
    width: 52px;
  }

  .print-preview-body .doc-variant {
    width: 76px;
  }

  .print-preview-body .doc-money {
    width: 62px;
  }
}

/* Detalle editable compacto tipo PDF */
.compact-budget-items .order-product-table-head,
.compact-budget-items .order-product-read-row {
  display: grid;
  grid-template-columns: 84px minmax(240px, 1fr) 112px 112px 150px;
  align-items: center;
  gap: 8px;
}

.compact-budget-items .order-product-table-head {
  padding: 6px 8px;
  border-radius: 8px 8px 0 0;
  background: #fff1a6;
  color: #111;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.compact-budget-items .order-product-read-row {
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 0;
  background: #fff;
}

.compact-budget-items .order-product-read-row + .order-product-read-row {
  border-top: 0;
}

.order-product-quantity,
.order-product-line,
.order-product-unit-price,
.order-product-subtotal {
  min-width: 0;
  line-height: 1.25;
}

.order-product-quantity {
  white-space: nowrap;
  color: #374151;
  font-weight: 850;
}

.order-product-line {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #111827;
  font-weight: 900;
}

.order-product-unit-price,
.order-product-subtotal {
  text-align: right;
  white-space: nowrap;
}

.order-product-unit-price {
  color: #374151;
  font-weight: 800;
}

.order-product-subtotal {
  color: #111827;
  font-weight: 950;
}

.order-product-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.order-product-actions .small-button {
  min-height: 28px;
  padding: 0.28rem 0.48rem;
  font-size: 0.72rem;
}

.order-product-mobile-main {
  display: none;
}

@media (max-width: 920px) {
  .compact-budget-items .order-product-table-head {
    display: none;
  }

  .compact-budget-items .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) 72px;
    grid-template-areas:
      "main actions"
      "subtotal actions";
    align-items: center;
    gap: 4px 9px;
    min-height: 58px;
    margin-bottom: 6px;
    padding: 8px 9px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 9px;
  }

  .order-product-mobile-main {
    grid-area: main;
    display: block;
    min-width: 0;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .order-product-quantity,
  .order-product-line,
  .order-product-unit-price {
    display: none !important;
  }

  .order-product-subtotal {
    grid-area: subtotal;
    justify-self: start;
    color: #111827;
    font-size: 0.82rem;
    text-align: left;
  }

  .order-product-subtotal::before {
    content: "Subtotal: ";
    color: #6b7280;
    font-weight: 800;
  }

  .order-product-actions {
    grid-area: actions;
    display: grid;
    gap: 5px;
    justify-items: stretch;
    align-self: center;
  }

  .order-product-actions .small-button {
    width: 66px;
    min-width: 66px;
    min-height: 27px;
    padding: 0.22rem 0.3rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 420px) {
  .compact-budget-items .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) 62px;
    padding: 8px;
  }

  .order-product-mobile-main,
  .order-product-subtotal {
    font-size: 0.78rem;
  }

  .order-product-actions .small-button {
    width: 58px;
    min-width: 58px;
    font-size: 0.64rem;
  }
}

/* Ajuste final columnas reales productos consulta mobile */
@media (max-width: 920px) {
  .compact-budget-items .order-product-read-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    grid-template-areas:
      "main actions"
      "subtotal actions";
    column-gap: 10px;
    row-gap: 5px;
    align-items: center;
  }

  .order-product-mobile-main {
    grid-area: main;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
  }

  .order-product-subtotal {
    grid-area: subtotal;
    min-width: 0;
    max-width: 100%;
  }

  .order-product-actions {
    grid-area: actions;
    width: 110px;
    min-width: 110px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    align-self: center;
    justify-self: end;
  }

  .order-product-actions .small-button {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    min-height: 28px;
    padding: 0.22rem 0.2rem;
    text-align: center;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .compact-budget-items .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) 92px;
    column-gap: 8px;
  }

  .order-product-actions,
  .order-product-actions .small-button {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
  }
}


/* Correccion estricta boton editar consulta mobile */
@media (max-width: 920px) {
  .compact-budget-items .order-product-read-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 120px !important;
    grid-template-areas:
      "main actions"
      "subtotal actions" !important;
    gap: 8px 12px !important;
    align-items: stretch !important;
  }

  .order-product-mobile-main {
    grid-area: main !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
  }

  .order-product-subtotal {
    grid-area: subtotal !important;
    min-width: 0 !important;
    max-width: 100% !important;
    align-self: end !important;
  }

  .order-product-actions {
    grid-area: actions !important;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: stretch !important;
    align-self: stretch !important;
    justify-self: end !important;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
  }

  .order-product-actions .small-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 420px) {
  .compact-budget-items .order-product-read-row {
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px 10px !important;
  }

  .order-product-actions {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
  }
}

/* Cantidad previa al agregar productos en consultas */
.budget-search-result-with-quantity {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.budget-search-result-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.budget-search-result-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.budget-search-quantity-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.budget-search-quantity-stepper {
  display: grid;
  grid-template-columns: 30px 48px 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.budget-search-quantity-stepper .quantity-stepper-button {
  width: 30px;
  height: 32px;
  border-radius: 0;
  border: 0;
}

.budget-search-quantity-stepper input {
  width: 48px;
  height: 32px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font-weight: 900;
  background: #fff;
}

.budget-search-add-button {
  min-height: 34px;
  padding-inline: 12px;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .budget-search-result-with-quantity {
    grid-template-columns: minmax(0, 1fr);
  }

  .budget-search-result-actions {
    justify-content: space-between;
    align-items: end;
  }

  .budget-search-add-button {
    min-width: 104px;
  }
}

/* Edicion compacta de producto: stock y foto */
.compact-edit-product-grid {
  align-items: start;
}

.edit-section-title {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.edit-product-stock-block,
.edit-product-photo-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.edit-product-stock-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.edit-product-stock-control label {
  margin: 0;
}

.edit-product-stock-control input {
  text-align: center;
  font-weight: 900;
}

.edit-product-photo-section .edit-image-preview {
  margin: 0;
  max-width: 180px;
}

.edit-product-photo-section .edit-image-preview img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  background: #fff;
}

.edit-product-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-product-file-field {
  margin: 0;
}

.edit-product-more-options {
  margin-top: 8px;
}

.edit-product-more-options summary,
.more-product-actions summary {
  cursor: pointer;
}

.internal-role-card {
  gap: 12px;
}

.role-choice-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.internal-role-actions,
.admin-key-form {
  display: grid;
  gap: 10px;
  width: 100%;
}

.admin-key-form {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-key-form.hidden {
  display: none !important;
}

.admin-private-nav {
  min-height: 0;
  padding-block: 8px;
}

.admin-private-nav .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
}

.admin-private-nav strong {
  line-height: 1.05;
}

.admin-private-nav span {
  line-height: 1.1;
}

@media (max-width: 680px) {
  .stock-movement-row {
    grid-template-columns: 1fr;
  }

  .stock-movement-row div:last-child {
    text-align: left;
  }

  .product-edit-modal {
    gap: 10px;
  }

  .compact-edit-product-grid {
    gap: 8px;
  }

  .edit-product-stock-control {
    grid-template-columns: 1fr;
  }

  .edit-product-photo-section .edit-image-preview {
    max-width: 150px;
  }
}


/* Compacta el panel principal de Gestion Interna */
.management-shell {
  gap: 10px 14px;
  margin-top: 8px;
  padding: 8px 10px;
}

.management-shell > div:first-child {
  display: grid;
  gap: 3px;
}

.management-shell h2 {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.15;
}

.management-shell p,
.management-shell .eyebrow {
  font-size: 0.78rem;
  line-height: 1.2;
}

.management-tabs {
  gap: 6px;
  align-items: center;
}

.management-tabs .ghost-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 0.84rem;
  line-height: 1.05;
}

@media (max-width: 900px) {
  .management-shell {
    gap: 6px;
    margin-top: 8px;
    padding: 8px;
  }

  .management-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .management-tabs button {
    width: auto;
    min-height: 34px;
    flex: 1 1 auto;
    padding: 7px 9px;
    font-size: 0.8rem;
  }
}


.readonly-order-note {
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

/* Visualizacion final de fotos del catalogo: mostrar originales sin editar ni fondos artificiales. */
#catalogView .product-image-button {
  background: transparent !important;
  overflow: hidden !important;
}

#catalogView .product-image-button .product-image,
#catalogView .product-card .product-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
}

.image-lightbox {
  padding: 0 !important;
  background: rgba(0, 0, 0, 0.92) !important;
  place-items: center !important;
  touch-action: pinch-zoom !important;
}

.image-lightbox-frame {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: clamp(10px, 2vw, 22px) !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) minmax(92px, auto) !important;
  gap: 10px !important;
  place-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.image-lightbox-frame img {
  display: block !important;
  width: auto !important;
  max-width: calc(100vw - clamp(20px, 4vw, 44px)) !important;
  height: auto !important;
  max-height: calc(100dvh - min(36dvh, 260px) - 48px) !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  touch-action: pinch-zoom !important;
}

.image-lightbox-frame figcaption {
  align-self: stretch !important;
  width: min(920px, calc(100vw - 28px)) !important;
  max-width: min(920px, calc(100vw - 28px)) !important;
  max-height: min(36dvh, 260px) !important;
  margin: 0 auto !important;
  padding: 10px 12px 12px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  background: rgba(0, 0, 0, 0.38) !important;
  border-radius: 10px !important;
  line-height: 1.45 !important;
  scrollbar-width: thin !important;
}

.image-lightbox-frame figcaption span {
  display: block !important;
  max-width: 100% !important;
  margin-top: 6px !important;
  white-space: normal !important;
}

@media (max-width: 760px) {
  .image-lightbox-frame {
    padding: 8px !important;
    gap: 8px !important;
    grid-template-rows: minmax(0, 1fr) minmax(112px, auto) !important;
  }

  .image-lightbox-frame img {
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - min(42dvh, 300px) - 36px) !important;
  }

  .image-lightbox-frame figcaption {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: min(42dvh, 300px) !important;
    padding: 9px 10px 12px !important;
    font-size: 0.92rem !important;
  }
}

/* Fotos multiples en edicion de producto */
.edit-product-photo-section {
  display: grid;
  gap: 10px;
}

.edit-product-photo-section .edit-section-title {
  margin-bottom: 0;
}

.edit-product-photo-section .edit-product-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-product-photo-section .product-image-gallery {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  max-height: none;
  overflow: visible;
}

.edit-product-photo-section .gallery-thumb {
  align-content: start;
}

.edit-product-photo-section .gallery-thumb-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.edit-product-photo-section .gallery-thumb-actions button,
.edit-product-photo-section .gallery-replace {
  width: 100%;
  text-align: center;
}


/* Fotos producto bloque compacto */
.edit-product-photo-section {
  order: -10;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 10px;
  background: #fffdf2;
}

.edit-product-photo-section .edit-section-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 950;
  text-transform: uppercase;
}

.edit-product-photo-section .edit-product-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.edit-product-photo-section .product-image-gallery {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: none;
  overflow: visible;
}

.edit-product-photo-section .gallery-thumb {
  padding: 6px;
  gap: 5px;
}

.edit-product-photo-section .gallery-thumb img {
  object-fit: cover;
}

.edit-product-photo-section .gallery-thumb-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.edit-product-photo-section .gallery-thumb-actions button,
.edit-product-photo-section .gallery-replace {
  width: 100%;
  min-height: 28px;
  padding: 4px 7px;
  text-align: center;
}

.edit-product-photo-section small {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 680px) {
  .edit-product-photo-section .product-image-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Modal confirmacion borrado */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.52);
}

.confirm-modal-overlay.hidden {
  display: none;
}

.confirm-modal {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(179, 38, 30, 0.2);
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.22);
}

.confirm-modal h3 {
  margin: 0;
  color: #111827;
  font-size: 1.15rem;
}

.confirm-modal p {
  margin: 0;
  color: #4b5563;
  line-height: 1.45;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-modal-actions .danger-button:disabled,
.confirm-modal-actions .secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 520px) {
  .confirm-modal { padding: 16px; }
  .confirm-modal-actions { display: grid; grid-template-columns: 1fr; }
}


/* Fotos producto compacto mobile */
.photo-gallery-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #374151;
}

.gallery-toggle-button {
  min-height: 26px !important;
  padding: 0.22rem 0.48rem !important;
  font-size: 0.68rem !important;
}

.edit-product-photo-section {
  gap: 6px;
  padding: 7px;
}

.edit-product-photo-section .edit-section-title {
  font-size: 0.78rem;
}

.edit-product-photo-section .edit-product-photo-actions {
  gap: 6px;
}

.edit-product-photo-section .edit-product-photo-actions .small-button {
  min-height: 29px;
  padding: 0.3rem 0.58rem;
  font-size: 0.76rem;
}

.edit-product-photo-section .product-image-gallery {
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 5px;
}

.edit-product-photo-section .gallery-thumb {
  padding: 4px;
  gap: 3px;
  border-radius: 7px;
}

.edit-product-photo-section .gallery-thumb img {
  border-radius: 5px;
}

.edit-product-photo-section .gallery-thumb span {
  font-size: 0.64rem;
}

.edit-product-photo-section .gallery-thumb-actions {
  gap: 3px;
}

.edit-product-photo-section .gallery-thumb-actions button,
.edit-product-photo-section .gallery-replace {
  min-height: 22px;
  padding: 2px 4px;
  font-size: 0.58rem;
  border-radius: 7px;
}

.edit-product-photo-section small {
  font-size: 0.68rem;
  line-height: 1.2;
}

@media (max-width: 680px) {
  .edit-product-photo-section {
    gap: 5px;
    padding: 6px;
  }

  .edit-product-photo-section .product-image-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Ajuste escritorio catálogo y orden integrado en Gestión */
@media (min-width: 901px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .product-card {
    min-width: 0;
    height: auto;
    min-height: 0;
  }

  .product-body {
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 9px;
    padding: 12px;
  }

  .variant-select-row,
  .variant-placeholder {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 38px;
    margin: 0;
    overflow: visible;
  }

  .variant-select-row select {
    width: 100%;
    min-width: 0;
    height: 38px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.86rem;
    white-space: normal;
    text-overflow: clip;
  }

  .pack-price {
    min-height: 66px;
    gap: 5px;
  }

  .quantity-row.quantity-stepper-row {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 7px;
    min-height: 0;
    padding-top: 0;
  }

  .quantity-stepper-row label {
    display: block;
    min-height: 0;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .quantity-stepper {
    width: min(150px, 100%);
    grid-template-columns: 34px 54px 34px;
    justify-content: start;
    gap: 6px;
  }

  .quantity-stepper input,
  .quantity-row .quantity-stepper input {
    width: 54px;
    max-width: 54px;
  }

  .quantity-stepper-row .primary-button {
    width: 100%;
    min-height: 40px;
    grid-column: 1 / -1;
  }
}

@media (min-width: 1181px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Orden integrado en la lista normal de Gestión */
.admin-selectable-product {
  cursor: pointer;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-selectable-product.is-order-selected {
  background: #fff3bf;
  box-shadow: inset 4px 0 0 #c9a24a, 0 8px 22px rgba(0, 0, 0, 0.12);
}

.admin-selectable-product.order-swap-flash {
  animation: admin-order-swap-flash 0.48s ease;
}

@keyframes admin-order-swap-flash {
  0% { transform: scale(1); background-color: #fff3bf; }
  45% { transform: scale(1.015); background-color: #ffe08a; }
  100% { transform: scale(1); background-color: transparent; }
}
.archived-products-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: min(82vh, 720px);
  overflow: auto;
}

.archived-products-dialog .modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.archived-products-dialog .modal-title-row h3,
.archived-products-dialog .modal-title-row p {
  margin: 0;
}

.archived-products-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.archived-product-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.archived-product-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.archived-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archived-product-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.archived-product-info strong,
.archived-product-info span,
.archived-product-info small {
  overflow-wrap: anywhere;
}

.archived-product-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (min-width: 901px) {
  .quantity-row.quantity-stepper-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .quantity-stepper-row label {
    order: 1;
    width: 100%;
  }

  .quantity-row.quantity-stepper-row .quantity-stepper {
    order: 2;
    align-self: center;
    justify-content: center;
  }

  .quantity-stepper-row .primary-button {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 820px) {
  #adminView .mobile-product-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  #adminView .mobile-product-actions {
    display: grid;
    gap: 6px;
    justify-items: stretch;
  }

  .archived-product-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .archived-product-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .archived-product-actions .small-button {
    flex: 1 1 140px;
  }
}
/* Encabezado público negro y dorado */
.topbar.public-catalog-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 6 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  min-height: 0 !important;
  padding: 14px clamp(16px, 4vw, 48px) 12px !important;
  background: #050505 !important;
  border-bottom: 1px solid rgba(206, 164, 74, 0.5) !important;
  color: #f7efd9 !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22) !important;
  backdrop-filter: none !important;
}

.public-brand-shell {
  width: min(100%, 720px);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.public-catalog-brand.brand {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  display: grid !important;
  justify-items: center !important;
  gap: 8px !important;
  text-align: center !important;
}

.public-brand-mark.brand-mark {
  width: 70px !important;
  height: 70px !important;
  border: 1.5px solid #cfa24a !important;
  border-radius: 999px !important;
  background: radial-gradient(circle at 50% 35%, #18120a 0%, #050505 68%) !important;
  color: #d6ad55 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.75rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.08em !important;
  box-shadow: 0 0 0 4px rgba(207, 162, 74, 0.08), 0 10px 24px rgba(0, 0, 0, 0.32) !important;
}

.public-brand-copy,
.public-brand-copy h1,
.public-brand-copy p {
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  text-align: center !important;
}

.public-brand-copy h1 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: clamp(1.75rem, 6.8vw, 3rem) !important;
  line-height: 0.95 !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.public-brand-copy p {
  margin: 5px 0 0 !important;
  color: #d6ad55 !important;
  font-size: clamp(0.84rem, 2.8vw, 1.02rem) !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
}

.public-brand-copy::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: #cfa24a;
}

.public-social-links.top-actions {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: clamp(16px, 7vw, 52px) !important;
  margin: 0 !important;
}

.public-social-link {
  min-width: 64px;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 800;
}

.public-social-link svg {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.28));
}

.public-social-whatsapp svg { color: #25d366; background: #fff; }
.public-social-instagram svg { color: #e4408f; background: #fff; }
.public-social-facebook svg { color: #1877f2; background: #fff; }

.public-header-cart-hidden.header-cart-button,
.cart-button.public-header-cart-hidden {
  display: none !important;
}

.public-catalog-header + .minimum-banner {
  position: relative !important;
  top: auto !important;
  z-index: 5 !important;
  height: 36px !important;
  line-height: 36px !important;
  background: linear-gradient(90deg, #111 0%, #cfa24a 18%, #e0b85d 50%, #cfa24a 82%, #111 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35) !important;
  color: #050505 !important;
  overflow: hidden !important;
}

.public-catalog-header + .minimum-banner::before,
.public-catalog-header + .minimum-banner::after {
  background: linear-gradient(90deg, #050505, rgba(5, 5, 5, 0)) !important;
}

.public-catalog-header + .minimum-banner::after {
  background: linear-gradient(270deg, #050505, rgba(5, 5, 5, 0)) !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee {
  gap: 46px !important;
  animation-duration: 18s !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee span {
  color: #050505 !important;
  font-size: 0.88rem !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee span::before,
.public-catalog-header + .minimum-banner .minimum-marquee span::after {
  background: #050505 !important;
}

@media (min-width: 901px) {
  .topbar.public-catalog-header {
    padding-top: 18px !important;
    padding-bottom: 14px !important;
  }

  .public-brand-shell {
    gap: 14px;
  }

  .public-brand-mark.brand-mark {
    width: 76px !important;
    height: 76px !important;
    font-size: 1.9rem !important;
  }

  .public-social-link svg {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 520px) {
  .topbar.public-catalog-header {
    padding: 12px 12px 10px !important;
  }

  .public-brand-shell {
    gap: 10px;
  }

  .public-brand-mark.brand-mark {
    width: 62px !important;
    height: 62px !important;
    font-size: 1.55rem !important;
  }

  .public-social-links.top-actions {
    gap: clamp(14px, 8vw, 30px) !important;
  }

  .public-social-link {
    min-width: 58px;
    font-size: 0.68rem;
  }

  .public-social-link svg {
    width: 36px;
    height: 36px;
  }

  .public-catalog-header + .minimum-banner {
    height: 34px !important;
    line-height: 34px !important;
  }

  .public-catalog-header + .minimum-banner .minimum-marquee span {
    font-size: 0.78rem !important;
  }
}
/* Tema visual público negro, dorado y neutro: solo colores del catálogo. */
body:not(.private-management-mode) {
  background: #f3f1ec !important;
  color: #111111;
}

body:not(.private-management-mode) main {
  background: transparent;
}

body:not(.private-management-mode) #catalogView .product-card {
  background: #ffffff !important;
  border-color: #d8d8d8 !important;
  box-shadow: 0 10px 26px rgba(11, 11, 11, 0.07) !important;
}

body:not(.private-management-mode) #catalogView .product-card:hover {
  border-color: rgba(201, 162, 74, 0.55) !important;
  box-shadow: 0 12px 30px rgba(11, 11, 11, 0.1) !important;
}

body:not(.private-management-mode) #catalogView .pack-main-price {
  color: #0b0b0b !important;
}

body:not(.private-management-mode) #catalogView .pack-sale-detail,
body:not(.private-management-mode) #catalogView .product-title-row,
body:not(.private-management-mode) #catalogView .quantity-stepper-row label {
  color: #6b6250 !important;
}

body:not(.private-management-mode) #catalogView .quantity-stepper-button {
  background: #c9a24a !important;
  border-color: #0b0b0b !important;
  color: #0b0b0b !important;
}

body:not(.private-management-mode) #catalogView .quantity-stepper input,
body:not(.private-management-mode) #catalogView .quantity-row .quantity-stepper input {
  background: #fffdf7 !important;
  border-color: #d8d8d8 !important;
  color: #111111 !important;
}

body:not(.private-management-mode) #catalogView .quantity-stepper-row .primary-button {
  background: #0b0b0b !important;
  border-color: #c9a24a !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body:not(.private-management-mode) #catalogView .quantity-stepper-row .primary-button:hover,
body:not(.private-management-mode) #catalogView .quantity-stepper-row .primary-button:focus-visible {
  background: #c9a24a !important;
  border-color: #0b0b0b !important;
  color: #0b0b0b !important;
}

body:not(.private-management-mode) #catalogView .category-row button {
  background: #ffffff !important;
  border-color: #d8d8d8 !important;
  color: #111111 !important;
  box-shadow: none !important;
}

body:not(.private-management-mode) #catalogView .category-row button.active {
  background: #c9a24a !important;
  border-color: #0b0b0b !important;
  color: #0b0b0b !important;
  box-shadow: none !important;
}

body:not(.private-management-mode) #catalogView .search-box input {
  background: #ffffff !important;
  border-color: #6f6a60 !important;
  color: #111111 !important;
}

body:not(.private-management-mode) #catalogView .search-box input:focus {
  border-color: #c9a24a !important;
  outline-color: rgba(201, 162, 74, 0.35) !important;
}

body:not(.private-management-mode) #catalogView .search-box input::placeholder {
  color: #756f64 !important;
}

body:not(.private-management-mode) .floating-cart-button {
  background: #0b0b0b !important;
  border: 1px solid #c9a24a !important;
  color: #c9a24a !important;
  box-shadow: 0 12px 28px rgba(11, 11, 11, 0.2) !important;
}

body:not(.private-management-mode) .floating-cart-icon,
body:not(.private-management-mode) .floating-cart-label {
  color: #c9a24a !important;
}

body:not(.private-management-mode) .floating-cart-count,
body:not(.private-management-mode) #floatingCartCount {
  background: #c9a24a !important;
  color: #0b0b0b !important;
  border-color: #0b0b0b !important;
}
/* Limpieza final del encabezado público: solo iconos y menor altura. */
.public-brand-copy p,
.public-brand-copy::after,
.public-social-link span {
  display: none !important;
}

.topbar.public-catalog-header {
  padding-top: 10px !important;
  padding-bottom: 9px !important;
}

.public-brand-shell {
  gap: 8px !important;
}

.public-catalog-brand.brand {
  gap: 5px !important;
}

.public-social-links.top-actions {
  gap: clamp(18px, 6vw, 42px) !important;
}

.public-social-link {
  min-width: 44px !important;
  gap: 0 !important;
}

@media (min-width: 901px) {
  .topbar.public-catalog-header {
    padding-top: 12px !important;
    padding-bottom: 10px !important;
  }

  .public-brand-shell {
    gap: 9px !important;
  }

  .public-brand-mark.brand-mark {
    width: 72px !important;
    height: 72px !important;
  }
}

@media (max-width: 520px) {
  .topbar.public-catalog-header {
    padding-top: 8px !important;
    padding-bottom: 7px !important;
  }

  .public-brand-shell {
    gap: 7px !important;
  }

  .public-catalog-brand.brand {
    gap: 4px !important;
  }

  .public-social-links.top-actions {
    gap: clamp(18px, 9vw, 34px) !important;
  }
}

/* Ajuste final del header publico con logo aprobado */
.topbar.public-catalog-header {
  padding: 7px 12px 6px !important;
}

.public-brand-shell {
  gap: 6px !important;
  width: min(100%, 720px) !important;
}

.public-catalog-brand.brand {
  gap: 3px !important;
}

.public-brand-mark.brand-mark,
.public-brand-copy {
  display: none !important;
}

.public-brand-logo {
  display: block;
  width: min(430px, 92vw);
  max-height: 76px;
  object-fit: contain;
}

.public-brand-rubro {
  margin: 1px 0 0 !important;
  color: #c9a24a !important;
  font-size: clamp(0.66rem, 2.5vw, 0.86rem) !important;
  font-weight: 850 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.15 !important;
  text-align: center !important;
}

.public-social-links.top-actions {
  gap: clamp(14px, 5.5vw, 28px) !important;
  margin-top: 1px !important;
}

.public-social-link {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
}

.public-social-link svg {
  width: 30px !important;
  height: 30px !important;
}

.public-catalog-header + .minimum-banner {
  height: 30px !important;
  line-height: 30px !important;
  background: #c9a24a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-bottom: 1px solid rgba(11, 11, 11, 0.28) !important;
  box-shadow: none !important;
}

.public-catalog-header + .minimum-banner::before,
.public-catalog-header + .minimum-banner::after {
  content: none !important;
  display: none !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee {
  gap: 16px !important;
  animation-duration: 18s !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee span {
  color: #0b0b0b !important;
  font-size: 0.78rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.02em !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee span::before,
.public-catalog-header + .minimum-banner .minimum-marquee span::after {
  content: none !important;
  display: none !important;
}

.public-catalog-header + .minimum-banner .minimum-separator {
  color: #6f5519 !important;
  font-size: 0.78rem !important;
  padding: 0 2px !important;
}

@media (min-width: 901px) {
  .topbar.public-catalog-header {
    padding-top: 8px !important;
    padding-bottom: 7px !important;
  }

  .public-brand-logo {
    width: min(460px, 48vw);
    max-height: 84px;
  }

  .public-social-link {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
  }

  .public-social-link svg {
    width: 32px !important;
    height: 32px !important;
  }
}

@media (max-width: 520px) {
  .topbar.public-catalog-header {
    padding-top: 6px !important;
    padding-bottom: 5px !important;
  }

  .public-brand-shell {
    gap: 5px !important;
  }

  .public-brand-logo {
    width: min(340px, 91vw);
    max-height: 62px;
  }

  .public-brand-rubro {
    font-size: 0.64rem !important;
  }

  .public-social-links.top-actions {
    gap: clamp(13px, 7vw, 26px) !important;
  }

  .public-social-link {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
  }

  .public-social-link svg {
    width: 28px !important;
    height: 28px !important;
  }

  .public-catalog-header + .minimum-banner {
    height: 28px !important;
    line-height: 28px !important;
  }

  .public-catalog-header + .minimum-banner .minimum-marquee span {
    font-size: 0.7rem !important;
  }
}

/* Ajuste de continuidad del ticker final */
.public-catalog-header + .minimum-banner .minimum-marquee {
  padding-left: 0 !important;
}

@media (max-width: 520px) {
  .public-brand-logo {
    max-height: 70px;
  }
}
/* Header publico: logo protagonista y redes discretas */
.topbar.public-catalog-header {
  min-height: 0 !important;
  padding: 6px 8px 7px !important;
}

.public-brand-shell {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  gap: 0 !important;
}

.public-catalog-brand.brand {
  width: 100% !important;
  gap: 0 !important;
  justify-items: center !important;
}

.public-brand-logo {
  width: min(940px, calc(100vw - 18px)) !important;
  max-width: calc(100vw - 18px) !important;
  max-height: none !important;
  height: auto !important;
  object-fit: contain !important;
}

.public-brand-rubro {
  display: none !important;
}

.public-social-links.top-actions {
  position: absolute !important;
  top: 5px !important;
  right: 7px !important;
  width: auto !important;
  margin: 0 !important;
  gap: 6px !important;
  justify-content: flex-end !important;
  align-items: center !important;
  z-index: 2 !important;
}

.public-social-link {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.public-social-link svg {
  width: 22px !important;
  height: 22px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.public-social-whatsapp svg { color: #25d366 !important; }
.public-social-instagram svg { color: #e4408f !important; }
.public-social-facebook svg { color: #1877f2 !important; }

@media (min-width: 901px) {
  .topbar.public-catalog-header {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .public-brand-logo {
    width: min(980px, 72vw) !important;
    max-width: 980px !important;
  }

  .public-social-links.top-actions {
    top: 10px !important;
    right: 18px !important;
    gap: 8px !important;
  }

  .public-social-link,
  .public-social-link svg {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
  }
}

@media (max-width: 520px) {
  .topbar.public-catalog-header {
    padding: 5px 6px 6px !important;
  }

  .public-brand-logo {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
  }

  .public-social-links.top-actions {
    top: 5px !important;
    right: 7px !important;
    gap: 5px !important;
  }

  .public-social-link,
  .public-social-link svg {
    width: 19px !important;
    min-width: 19px !important;
    height: 19px !important;
  }
}
/* Correccion de encuadre mobile del logo del header */
.topbar.public-catalog-header,
.public-brand-shell,
.public-catalog-brand.brand {
  box-sizing: border-box !important;
  overflow: hidden !important;
}

@media (max-width: 520px) {
  .public-brand-shell,
  .public-catalog-brand.brand {
    max-width: 100% !important;
  }

  .public-brand-logo {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Forzar que el logo aprobado se vea completo en el header publico */
.public-catalog-brand.brand {
  display: grid !important;
  flex: none !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  max-width: 100% !important;
}

.public-catalog-brand.brand .public-brand-logo {
  display: block !important;
  flex: none !important;
  inline-size: min(940px, calc(100vw - 20px)) !important;
  width: min(940px, calc(100vw - 20px)) !important;
  max-inline-size: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (min-width: 901px) {
  .public-catalog-brand.brand .public-brand-logo {
    inline-size: min(980px, 72vw) !important;
    width: min(980px, 72vw) !important;
  }
}

@media (max-width: 520px) {
  .public-catalog-brand.brand .public-brand-logo {
    inline-size: calc(100vw - 22px) !important;
    width: calc(100vw - 22px) !important;
  }
}
/* Tope seguro para que el logo no se recorte en viewports moviles */
.public-catalog-brand.brand .public-brand-logo {
  inline-size: min(368px, calc(100vw - 22px)) !important;
  width: min(368px, calc(100vw - 22px)) !important;
}

@media (min-width: 901px) {
  .public-catalog-brand.brand .public-brand-logo {
    inline-size: min(980px, 72vw) !important;
    width: min(980px, 72vw) !important;
  }
}
/* Alinear el header publico al viewport real en mobile */
@media (max-width: 900px) {
  .public-brand-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .public-catalog-brand.brand .public-brand-logo {
    inline-size: calc(100vw - 22px) !important;
    width: calc(100vw - 22px) !important;
    max-inline-size: calc(100vw - 22px) !important;
    max-width: calc(100vw - 22px) !important;
  }
}
/* Calibracion final mobile: logo completo y protagonista */
@media (max-width: 900px) {
  .public-catalog-brand.brand .public-brand-logo {
    inline-size: min(330px, calc(100vw - 20px)) !important;
    width: min(330px, calc(100vw - 20px)) !important;
    max-inline-size: min(330px, calc(100vw - 20px)) !important;
    max-width: min(330px, calc(100vw - 20px)) !important;
  }
}
/* Posicion segura de redes en mobile */
@media (max-width: 520px) {
  .public-social-links.top-actions {
    left: min(calc(100vw - 75px), 312px) !important;
    right: auto !important;
    top: 7px !important;
  }
}
/* Ajuste final compacto del encabezado publico */
.topbar.public-catalog-header {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.public-catalog-brand.brand .public-brand-logo {
  inline-size: min(760px, 58vw) !important;
  width: min(760px, 58vw) !important;
  max-inline-size: min(760px, 58vw) !important;
  max-width: min(760px, 58vw) !important;
  height: auto !important;
}

.public-social-links.top-actions {
  top: 8px !important;
  right: 14px !important;
  gap: 6px !important;
}

.public-social-link,
.public-social-link svg {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
}

.public-catalog-header + .minimum-banner {
  height: 25px !important;
  line-height: 25px !important;
}

.public-catalog-header + .minimum-banner .minimum-marquee span,
.public-catalog-header + .minimum-banner .minimum-separator {
  font-size: 0.68rem !important;
}

@media (max-width: 900px) {
  .topbar.public-catalog-header {
    padding: 4px 6px !important;
  }

  .public-catalog-brand.brand .public-brand-logo {
    inline-size: min(286px, calc(100vw - 28px)) !important;
    width: min(286px, calc(100vw - 28px)) !important;
    max-inline-size: min(286px, calc(100vw - 28px)) !important;
    max-width: min(286px, calc(100vw - 28px)) !important;
  }

  .public-social-links.top-actions {
    top: 6px !important;
    left: auto !important;
    right: 8px !important;
    gap: 5px !important;
  }

  .public-social-link,
  .public-social-link svg {
    width: 14px !important;
    min-width: 14px !important;
    height: 14px !important;
  }

  .public-catalog-header + .minimum-banner {
    height: 24px !important;
    line-height: 24px !important;
  }

  .public-catalog-header + .minimum-banner .minimum-marquee span,
  .public-catalog-header + .minimum-banner .minimum-separator {
    font-size: 0.64rem !important;
  }
}
/* Header Punto X Mayor: marco del logo como limite visual */
.topbar.public-catalog-header {
  background: #000 !important;
  padding: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.public-brand-shell,
.public-catalog-brand.brand {
  width: 100% !important;
  max-width: 100% !important;
  background: #000 !important;
  gap: 0 !important;
  overflow: hidden !important;
}

.public-catalog-brand.brand {
  aspect-ratio: 3.34 / 1 !important;
  position: relative !important;
}

.public-catalog-brand.brand .public-brand-logo {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  transform: translate(-50%, -50%) scale(1.04) !important;
  transform-origin: center !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #000 !important;
}

.public-social-links.top-actions {
  display: none !important;
}

@media (min-width: 901px) {
  .public-catalog-brand.brand {
    width: min(100vw, 1366px) !important;
  }
}

@media (max-width: 900px) {
  .topbar.public-catalog-header {
    padding: 0 !important;
  }

  .public-catalog-brand.brand {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .public-catalog-brand.brand .public-brand-logo {
    transform: translate(-50%, -50%) scale(1.04) !important;
  }
}

/* Footer publico y jerarquia de presentacion */
body:not(.private-management-mode) #catalogView .pack-sale-detail span:first-child {
  color: #0b0b0b !important;
  font-size: 0.82rem !important;
  font-weight: 950 !important;
}

.public-catalog-footer {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 28px 0 0;
  padding: 28px 16px 32px;
  background: #000;
  color: #fff;
  text-align: center;
  border-top: 2px solid #c9a24a;
}

.public-catalog-footer p {
  margin: 0;
  color: #f6f2e8;
  font-size: 0.94rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.public-footer-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.public-footer-social-link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(201, 162, 74, 0.68);
  border-radius: 999px;
  background: #fff;
  color: #0b0b0b;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.public-footer-social-link:hover,
.public-footer-social-link:focus-visible {
  transform: translateY(-1px);
  border-color: #f1cf73;
  outline: none;
}

.public-footer-social-link svg {
  width: 24px;
  height: 24px;
}

.public-footer-whatsapp { color: #25d366; }
.public-footer-instagram { color: #e4408f; }
.public-footer-facebook { color: #1877f2; }

.public-footer-address {
  display: grid;
  gap: 3px;
  margin: 2px 0 0;
  color: #f6f2e8;
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.public-footer-address span:first-child {
  color: #c9a24a;
}

@media (max-width: 640px) {
  .public-catalog-footer {
    gap: 12px;
    margin-top: 22px;
    padding: 24px 12px 28px;
  }

  .public-catalog-footer p {
    font-size: 0.86rem;
  }

  .public-footer-social-link {
    width: 42px;
    height: 42px;
  }

  .public-footer-social-link svg {
    width: 23px;
    height: 23px;
  }

  .public-footer-address {
    font-size: 0.8rem;
  }
}
/* Ajustes visuales Pedidos: nombres completos y badge */
.management-tab-with-badge {
  position: relative;
}

.orders-attention-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d71920;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.order-product-line,
.order-product-mobile-main {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

@media (min-width: 921px) {
  .compact-budget-items .order-product-read-row {
    align-items: start;
    min-height: 0;
  }
}

@media (max-width: 920px) {
  .order-product-mobile-main {
    display: grid !important;
    gap: 3px;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
  }

  .order-product-mobile-main small {
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .compact-budget-items .order-product-read-row {
    height: auto !important;
    min-height: 0 !important;
  }
}

/* Venta rapida local */
.quick-sale-view {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f6f3ec;
  border: 1px solid rgba(201, 162, 74, 0.38);
}

.quick-sale-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0b0b0b;
  color: #fff;
}

.quick-sale-kicker,
.quick-sale-header h3,
.quick-sale-header span {
  margin: 0;
}

.quick-sale-kicker {
  color: #c9a24a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-sale-header h3 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.quick-sale-search-panel,
.quick-sale-products,
.quick-sale-more-options,
.quick-sale-total-box,
.quick-sale-payment-panel,
.quick-sale-discount-panel {
  border: 1px solid #ded6c5;
  border-radius: 8px;
  background: #fff;
}

.quick-sale-search-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.quick-sale-search-label {
  display: grid;
  gap: 6px;
  color: #111;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.quick-sale-search-label input {
  min-height: 46px;
  border: 1px solid #0b0b0b;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 1rem;
}

.quick-sale-search-results {
  display: grid;
  gap: 8px;
}

.quick-sale-products {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.quick-sale-section-title h4 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.quick-sale-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4dece;
  border-radius: 8px;
  background: #fffaf0;
}

.quick-sale-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-sale-item-main strong {
  color: #111;
  font-size: 0.96rem;
  line-height: 1.22;
}

.quick-sale-item-main span,
.quick-sale-item-subtotal {
  color: #6b6250;
  font-size: 0.84rem;
  font-weight: 800;
}

.quick-sale-item-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.quick-sale-stepper {
  display: grid;
  grid-template-columns: 38px 56px 38px;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
}

.quick-sale-stepper .quantity-stepper-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
}

.quick-sale-stepper input {
  width: 56px;
  height: 38px;
  border: 0;
  border-left: 1px solid #d8d8d8;
  border-right: 1px solid #d8d8d8;
  text-align: center;
  font-weight: 950;
}

.quick-sale-remove-button {
  min-height: 38px;
}

.quick-sale-total-box {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.quick-sale-total-box span {
  color: #6b6250;
  font-size: 0.86rem;
  font-weight: 800;
}

.quick-sale-total-box strong {
  color: #0b0b0b;
  font-size: 1.28rem;
  font-weight: 950;
}

.quick-sale-payment-panel,
.quick-sale-discount-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.quick-sale-payment-panel h4,
.quick-sale-discount-panel h4,
.quick-sale-completed-header h3,
.quick-sale-completed-header p {
  margin: 0;
}

.quick-sale-payment-panel h4,
.quick-sale-discount-panel h4 {
  color: #111;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.quick-sale-payment-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-sale-payment-button {
  min-height: 42px;
  border: 1px solid #d8d0be;
  border-radius: 8px;
  background: #fffaf0;
  color: #111;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
}

.quick-sale-payment-button.is-selected {
  border-color: #0b0b0b;
  background: #0b0b0b;
  color: #fff;
  box-shadow: inset 0 -3px 0 #c9a24a;
}

.quick-sale-discount-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
}

.quick-sale-discount-row select,
.quick-sale-discount-row input {
  min-height: 42px;
  border: 1px solid #d8d0be;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 900;
}

.quick-sale-discount-row input {
  padding-inline: 10px;
}

.quick-sale-completed-header {
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 14px 12px;
  border-radius: 8px;
  background: #0b0b0b;
  color: #fff;
  text-align: center;
}

.quick-sale-completed-header h3 {
  color: #fff;
  font-size: 1.28rem;
  letter-spacing: 0.03em;
}

.quick-sale-completed-header strong {
  color: #c9a24a;
  font-size: 1rem;
}

.quick-sale-completed-item {
  background: #fff;
}

.quick-sale-more-options {
  padding: 0;
}

.quick-sale-more-options summary {
  padding: 11px 12px;
  color: #0b0b0b;
  font-size: 0.86rem;
  font-weight: 950;
  cursor: pointer;
}

.quick-sale-options-grid {
  display: grid;
  gap: 10px;
  padding: 0 10px 10px;
}

.quick-sale-options-grid fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #e4dece;
  border-radius: 8px;
}

.quick-sale-options-grid legend {
  padding: 0 4px;
  color: #6b6250;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.quick-sale-options-grid label {
  display: grid;
  gap: 4px;
  color: #111;
  font-size: 0.8rem;
  font-weight: 850;
}

.quick-sale-customer-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: center;
}

.quick-sale-customer-field input {
  min-width: 0;
}

.quick-sale-customer-field .small-button {
  width: 100%;
  min-height: 40px;
  padding-inline: 0;
}

.quick-sale-actions {
  display: grid;
  gap: 8px;
}

.quick-sale-paid-note {
  color: #6b6250;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.quick-sale-finish-button {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  font-size: 0.98rem;
  font-weight: 950;
}

.internal-sale-active #catalogView {
  padding-bottom: 92px;
}

body.internal-sale-detail-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.internal-sale-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 85;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.internal-sale-panel {
  width: min(720px, calc(100% - 18px));
  margin: 9px;
  border: 1px solid rgba(201, 162, 74, 0.75);
  border-radius: 12px 12px 0 0;
  background: #0b0b0b;
  color: #fff;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  pointer-events: auto;
}

.internal-sale-summary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 11px 14px;
  border: 0;
  background: #0b0b0b;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.internal-sale-summary span {
  display: grid;
  gap: 3px;
}

.internal-sale-summary b,
.internal-sale-detail-head h3,
.internal-sale-payment h4,
.internal-sale-discount-panel h4 {
  margin: 0;
  color: #c9a24a;
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.internal-sale-summary em {
  color: #fff;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 900;
}

.internal-sale-summary strong {
  color: #c9a24a;
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.internal-sale-detail {
  display: none;
  max-height: min(68vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  background: #f5f3ee;
  color: #111;
}

.internal-sale-panel.expanded .internal-sale-detail {
  display: grid;
  gap: 10px;
}

.internal-sale-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.internal-sale-items {
  display: grid;
  gap: 8px;
}

.internal-sale-item {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e1d8c5;
  border-radius: 8px;
  background: #fff;
}

.internal-sale-item strong {
  display: block;
  color: #111;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.25;
}

.internal-sale-item span,
.internal-sale-item em {
  display: block;
  margin-top: 3px;
  color: #6b6250;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.internal-sale-item-actions {
  display: grid;
  grid-template-columns: 38px 44px 38px minmax(76px, auto);
  align-items: center;
  gap: 6px;
}

.internal-sale-item-actions b {
  text-align: center;
  font-size: 0.95rem;
}

.internal-sale-totals {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 0.86rem;
  font-weight: 850;
}

.internal-sale-totals span,
.internal-sale-totals strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.internal-sale-totals strong {
  color: #0b0b0b;
  font-size: 1.05rem;
  font-weight: 950;
}

.internal-sale-payment,
.internal-sale-discount-panel,
.internal-sale-customer-options {
  border: 1px solid #e1d8c5;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.internal-sale-finish-button {
  width: 100%;
  min-height: 50px;
  justify-content: center;
  font-size: 0.96rem;
  font-weight: 950;
}

@media (min-width: 700px) {
  .internal-sale-active #catalogView {
    padding-bottom: 100px;
  }

  .internal-sale-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .internal-sale-panel {
    width: calc(100% - 12px);
    margin: 6px;
  }

  .internal-sale-summary {
    min-height: 62px;
    padding: 10px 12px;
  }

  .internal-sale-detail {
    max-height: 66vh;
    padding: 8px;
  }

  .internal-sale-item-actions {
    grid-template-columns: 38px 42px 38px minmax(72px, 1fr);
  }
}

@media (min-width: 760px) {
  .quick-sale-options-grid {
    grid-template-columns: 1fr;
  }

  .quick-sale-payment-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .quick-sale-view {
    gap: 10px;
    padding: 8px;
    margin-inline: -6px;
  }

  .quick-sale-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 10px;
  }

  .quick-sale-header .secondary-button {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 34px;
  }

  .quick-sale-search-panel,
  .quick-sale-products,
  .quick-sale-payment-panel,
  .quick-sale-discount-panel {
    padding: 8px;
  }

  .quick-sale-item {
    padding: 8px;
  }

  .quick-sale-item-controls {
    align-items: stretch;
  }

  .quick-sale-remove-button {
    padding-inline: 10px;
  }
}

@media (min-width: 901px) {
  body:not(.private-management-mode) .topbar.public-catalog-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  body:not(.private-management-mode) .public-brand-shell,
  body:not(.private-management-mode) .public-catalog-brand.brand {
    width: min(60vw, 820px) !important;
    max-width: min(60vw, 820px) !important;
  }
}

/* Visibilidad interna definitiva: el banner publico nunca aparece dentro de Gestion. */
html[data-private-management="true"] .topbar.public-catalog-header,
html[data-private-management="true"] .public-catalog-header,
html[data-private-management="true"] .public-catalog-header + .minimum-banner,
body.private-management-mode .topbar.public-catalog-header,
body.private-management-mode .public-catalog-header,
body.private-management-mode .public-catalog-header + .minimum-banner,
body.admin-catalog-preview .topbar.public-catalog-header,
body.admin-catalog-preview .public-catalog-header,
body.admin-catalog-preview .public-catalog-header + .minimum-banner {
  display: none !important;
}

