:root {
  --ink: #171615;
  --charcoal: #24211f;
  --charcoal-soft: #34302b;
  --cream: #f6f0e2;
  --paper: #fffbf1;
  --gold: #d7b469;
  --gold-deep: #9f7933;
  --leaf: #31551f;
  --leaf-bright: #6d8b31;
  --silver: #9c9a91;
  --line: rgba(36, 33, 31, 0.14);
  --shadow: 0 24px 60px rgba(23, 22, 21, 0.18);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

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

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  border: 1px solid rgba(215, 180, 105, 0.45);
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.brand span {
  color: var(--gold);
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar__note {
  color: rgba(246, 240, 226, 0.78);
  font-size: 0.9rem;
  margin: 0;
  text-align: right;
}

.topbar--public {
  position: fixed;
  width: 100%;
}

.topbar__actions {
  align-items: center;
  display: flex;
  gap: 14px;
}

.nav {
  align-items: center;
  display: flex;
  gap: clamp(14px, 3vw, 30px);
}

.nav a {
  color: rgba(246, 240, 226, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.nav a:hover {
  color: var(--gold);
}

.menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(246, 240, 226, 0.36);
  border-radius: 7px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 4px;
  height: 40px;
  justify-content: center;
  width: 44px;
}

.menu-toggle span {
  background: var(--gold);
  display: block;
  height: 2px;
  transition:
    opacity 0.18s,
    transform 0.18s;
  width: 18px;
}

.is-menu-open .menu-toggle span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.is-menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.is-menu-open .menu-toggle span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  background:
    linear-gradient(90deg, rgba(23, 22, 21, 0.92), rgba(23, 22, 21, 0.62)),
    url("../Imagenes/Cover/Cover.png") center / cover;
  color: var(--paper);
  min-height: 56vh;
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 56px) 34px;
}

.hero--catalog {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(23, 22, 21, 0.82), rgba(23, 22, 21, 0.2)),
    url("../Imagenes/Cover/Cover.png") center / cover;
  display: flex;
  min-height: 92vh;
  padding-top: 120px;
}

.hero__content {
  max-width: 780px;
}

.eyebrow {
  color: var(--gold-deep);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  line-height: 0.92;
  margin-bottom: 18px;
  max-width: 760px;
}

.hero p {
  color: rgba(255, 251, 241, 0.82);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.55;
  max-width: 620px;
}

.hero__rule {
  background: var(--gold);
  height: 2px;
  margin-top: clamp(30px, 5vw, 52px);
  width: min(260px, 60vw);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  align-items: center;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--ink);
}

.btn-secondary,
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(246, 240, 226, 0.46);
  color: var(--paper);
}

.btn-ghost {
  min-height: 36px;
}

.section {
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px);
}

.section--intro {
  background: var(--ink);
  color: var(--paper);
}

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

.intro-grid article {
  background: rgba(255, 251, 241, 0.06);
  min-height: 160px;
  padding: clamp(18px, 3vw, 30px);
}

.intro-grid span {
  color: var(--gold);
  display: block;
  font-size: clamp(2.8rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 0.9;
  margin-bottom: 22px;
}

.intro-grid h2 {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  margin-bottom: 10px;
}

.intro-grid p {
  color: rgba(255, 251, 241, 0.72);
  line-height: 1.5;
  margin-bottom: 0;
}

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

.metric {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric span {
  color: var(--charcoal-soft);
  display: block;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.metric strong {
  color: var(--leaf);
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.section__heading {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section__heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0;
}

.section__heading p {
  color: var(--charcoal-soft);
  line-height: 1.5;
  margin: 0;
  max-width: 520px;
}

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

.catalog--public {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product__media {
  aspect-ratio: 4 / 5;
  background: var(--charcoal);
  position: relative;
}

.product__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product__code {
  background: rgba(23, 22, 21, 0.9);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 780;
  left: 12px;
  letter-spacing: 0.08em;
  padding: 7px 9px;
  position: absolute;
  top: 12px;
}

.product__number {
  background: var(--gold);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  padding: 7px 9px;
  position: absolute;
  right: 12px;
  top: 12px;
}

.product__body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.product h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.product p:not(.eyebrow) {
  color: var(--charcoal-soft);
  margin-bottom: 0;
}

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

.price-grid div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

dt {
  color: var(--charcoal-soft);
  font-size: 0.78rem;
}

dd {
  font-weight: 760;
  margin: 3px 0 0;
}

.product--public {
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: none;
}

.product--public .product__body {
  grid-template-rows: 1fr auto auto;
  min-height: 220px;
}

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

.public-price span {
  color: var(--charcoal-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.public-price strong {
  color: var(--leaf);
  font-size: 1.24rem;
}

.product-buy {
  align-items: center;
  background: var(--leaf);
  border-radius: 7px;
  color: var(--paper);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.15s;
  width: 100%;
}

.product-buy:hover {
  background: var(--leaf-bright);
  transform: translateY(-1px);
}

.btn-pdf {
  align-items: center;
  background: var(--charcoal);
  border: 0;
  border-radius: 7px;
  color: var(--gold);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
}

.btn-pdf:hover {
  background: var(--leaf);
  color: var(--paper);
}

.pdf-action {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.print-catalog {
  display: none;
}

.whatsapp-float {
  align-items: center;
  background: transparent;
  border: 0;
  bottom: 22px;
  display: inline-flex;
  height: 62px;
  justify-content: center;
  position: fixed;
  right: 22px;
  text-decoration: none;
  transition: transform 0.15s;
  width: 62px;
  z-index: 20;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
}

.whatsapp-float img {
  filter: drop-shadow(0 12px 22px rgba(23, 22, 21, 0.24));
  height: 62px;
  object-fit: contain;
  width: 62px;
}

.public-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.public-controls input {
  background: var(--paper);
  border: 1px solid rgba(36, 33, 31, 0.22);
  border-radius: 7px;
  color: var(--ink);
  flex: 1;
  font-family: inherit;
  font-size: 0.94rem;
  height: 44px;
  min-width: 240px;
  padding: 0 14px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: transparent;
  border: 1px solid rgba(36, 33, 31, 0.2);
  border-radius: 999px;
  color: var(--charcoal);
  cursor: pointer;
  font-family: inherit;
  font-weight: 760;
  min-height: 36px;
  padding: 0 14px;
}

.chip.is-active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--gold);
}

.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--charcoal-soft);
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  text-align: center;
}

.table-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.table-controls input[type="search"],
.table-controls select {
  background: var(--paper);
  border: 1px solid rgba(36, 33, 31, 0.22);
  border-radius: 7px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  height: 40px;
  padding: 0 14px;
  transition: border-color 0.15s;
}

.table-controls input[type="search"]:focus,
.table-controls select:focus {
  border-color: var(--gold-deep);
  outline: none;
}

.table-controls input[type="search"] {
  flex: 1;
  min-width: 200px;
}

.table-controls select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2324211f'/%3E%3C/svg%3E");
  background-position: right 13px center;
  background-repeat: no-repeat;
  cursor: pointer;
  min-width: 150px;
  padding-right: 36px;
}

.btn-export {
  align-items: center;
  background: var(--leaf);
  border: none;
  border-radius: 7px;
  color: var(--paper);
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 7px;
  height: 40px;
  letter-spacing: 0.03em;
  padding: 0 18px;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-export:hover {
  background: var(--leaf-bright);
}

.table-pagination {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 16px;
}

.table-pagination button {
  background: var(--charcoal);
  border: none;
  border-radius: 6px;
  color: var(--gold);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 9px 20px;
  transition: opacity 0.15s;
}

.table-pagination button:disabled {
  cursor: default;
  opacity: 0.3;
}

.table-pagination span {
  color: var(--charcoal-soft);
  font-size: 0.88rem;
}

.public-pagination {
  margin-top: 24px;
}

.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 1060px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--charcoal);
  color: var(--gold);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--charcoal-soft);
  font-size: 0.88rem;
}

.formula {
  background: var(--leaf);
  color: var(--paper);
}

.formula .section__heading p,
.formula .eyebrow {
  color: rgba(255, 251, 241, 0.76);
}

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

.formula__steps article {
  border: 1px solid rgba(246, 240, 226, 0.24);
  border-radius: 8px;
  padding: 18px;
}

.formula__steps span {
  color: var(--gold);
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.formula__steps p {
  color: rgba(255, 251, 241, 0.84);
  line-height: 1.5;
  margin-bottom: 0;
}

.buy-strip {
  align-items: center;
  background: var(--charcoal);
  color: var(--paper);
  display: grid;
  gap: 20px;
  grid-template-columns: 1.1fr 1fr auto;
}

.buy-strip h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  margin-bottom: 0;
}

.buy-strip p:not(.eyebrow) {
  color: rgba(255, 251, 241, 0.76);
  line-height: 1.5;
  margin-bottom: 0;
}

.login-screen {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(23, 22, 21, 0.88), rgba(23, 22, 21, 0.6)),
    url("../Imagenes/Cover/Cover.png") center / cover;
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: rgba(255, 251, 241, 0.94);
  border: 1px solid rgba(215, 180, 105, 0.35);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: clamp(22px, 5vw, 34px);
  width: 100%;
}

.login-card img {
  border: 1px solid rgba(36, 33, 31, 0.16);
  height: 58px;
  object-fit: cover;
  width: 58px;
}

.login-card h1 {
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 0.98;
  margin-bottom: 4px;
}

.login-card label {
  color: var(--charcoal-soft);
  display: grid;
  font-size: 0.86rem;
  font-weight: 760;
  gap: 7px;
}

.login-card input {
  background: white;
  border: 1px solid rgba(36, 33, 31, 0.2);
  border-radius: 7px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  height: 44px;
  padding: 0 12px;
}

.login-card__error {
  color: #9d2f1c;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
}

@media (max-width: 900px) {
  .summary,
  .catalog,
  .formula__steps,
  .intro-grid,
  .buy-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section__heading {
    align-items: start;
    display: grid;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: start;
    display: grid;
  }

  .topbar--public {
    align-items: center;
    grid-template-columns: 1fr auto;
    position: sticky;
  }

  .topbar__actions {
    align-items: start;
    display: grid;
  }

  .menu-toggle {
    display: flex;
  }

  .topbar--public .nav {
    background: rgba(23, 22, 21, 0.96);
    border-top: 1px solid rgba(246, 240, 226, 0.14);
    display: none;
    gap: 0;
    grid-column: 1 / -1;
    margin: 2px -18px -14px;
    padding: 8px 18px 14px;
  }

  .is-menu-open .topbar--public .nav {
    display: grid;
  }

  .topbar--public .nav a {
    border-bottom: 1px solid rgba(246, 240, 226, 0.12);
    padding: 14px 0;
  }

  .topbar--public .nav a:last-child {
    border-bottom: 0;
  }

  .topbar__note {
    text-align: left;
  }

  .summary,
  .catalog,
  .formula__steps,
  .intro-grid,
  .buy-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 38vh;
    padding: 30px 18px 24px;
  }

  .hero--catalog {
    min-height: 74vh;
    padding-top: 42px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .hero__rule {
    margin-top: 22px;
  }

  .table-wrap {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  tr {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  td {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 11px 14px;
    white-space: normal;
  }

  td::before {
    color: var(--charcoal-soft);
    content: attr(data-label);
    flex: 0 0 42%;
    font-size: 0.76rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  td:first-child {
    background: var(--charcoal);
    color: var(--gold);
    font-weight: 800;
  }

  td:first-child::before {
    color: rgba(246, 240, 226, 0.72);
  }
}

@media print {
  @page {
    margin: 12mm;
    size: letter;
  }

  body {
    background: #f6f0e2;
    color: #171615;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .shell {
    display: none !important;
  }

  .whatsapp-float {
    display: none !important;
  }

  .print-catalog {
    background:
      linear-gradient(180deg, #f6f0e2 0%, #fffbf1 42%, #f6f0e2 100%);
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    min-height: 100vh;
    padding: 0 0 10mm;
  }

  .print-header {
    align-items: center;
    background: #171615;
    border-bottom: 5px solid #d7b469;
    color: #fffbf1;
    display: flex;
    gap: 16px;
    margin: -12mm -12mm 18px;
    padding: 14mm 14mm 9mm 18mm;
  }

  .print-header img {
    border: 1px solid rgba(215, 180, 105, 0.7);
    height: 58px;
    object-fit: cover;
    width: 58px;
  }

  .print-header p,
  .print-header h1,
  .print-header span {
    margin: 0;
  }

  .print-header p,
  .print-header span {
    color: #d7b469;
    font-family: Arial, sans-serif;
    font-size: 9pt;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .print-header h1 {
    color: #fffbf1;
    font-size: 24pt;
    line-height: 1;
  }

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

  .print-product {
    break-inside: avoid;
    background: #fffbf1;
    border: 1px solid #d7b469;
    display: grid;
    gap: 10px;
    grid-template-columns: 94px 1fr;
    min-height: 126px;
    padding: 8px;
  }

  .print-product img {
    aspect-ratio: 4 / 5;
    height: 118px;
    object-fit: cover;
    width: 94px;
  }

  .print-product span {
    color: #31551f;
    display: block;
    font-family: Arial, sans-serif;
    font-size: 8pt;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .print-product h2 {
    color: #171615;
    font-size: 13pt;
    line-height: 1.12;
    margin: 0 0 5px;
  }

  .print-product p {
    color: #56514a;
    font-family: Arial, sans-serif;
    font-size: 9pt;
    line-height: 1.25;
    margin: 0 0 8px;
  }

  .print-product strong {
    background: #31551f;
    color: #fffbf1;
    display: block;
    font-family: Arial, sans-serif;
    font-size: 12pt;
    padding: 5px 7px;
    width: fit-content;
  }
}
