* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  --header-bg-image: none;
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  background: #efefef;
}

.page {
  max-width: 1400px;
  margin: 24px auto;
  background: #fff;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.cover {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 32px 32px 26px;
  color: #fff;
  overflow: hidden; /* clave */

  background-image: url("./images/catalogo_PG-bkg.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto;
  /* background-color: #2f2f2f; */
}

.cover-left,
.cover-right {
  padding: 36px;
}

.cover-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.cover-right {
  display: flex;
  align-items: stretch;
}

.logo-wrap {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  width: 200px;
  height: 200px;
  border-radius: 18px;
  background: #111;
  color: #fff;
  font-size: 54px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border-radius: 22px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.cover h1,
.hero-box h2 {
  margin: 0 0 12px;
  line-height: 1.1;
}

.cover h1 {
  font-size: 56px;
}

.hero-box h2 {
  margin: 0 0 16px 0;
  font-size: 28px;
  line-height: 1.15;
  color: #de8829;
}

.cover-category-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.cover-category-list li a {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.cover-category-list li a:hover {
  color: #de8829;
}

.subtitle {
  font-size: 16px;
  line-height: 1.45;
  color: #cfcfcf;
}

.contact {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #128c7e;
}

.notes {
  font-size: 14px;
  line-height: 1.5;
  color: #de8829;
}

.catalog-grid {
  width: 100%;
  padding: 28px 20px 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  background: #fff;
}

.category-header,
.footer {
  grid-column: 1 / -1;
}

.category-header {
  margin-top: 8px;
  margin-bottom: 2px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
  scroll-margin-top: 24px;
}

.category-header h2 {
  margin: 0;
  font-size: 28px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 360px;
  height: 360px;
}

.image-wrap {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.image-wrap img {
  max-height: 180px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.img-ph {
  width: 100%;
  height: 100%;
  border: 1px dashed #cfcfcf;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
}

.info {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.subcat-inline {
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.1;
}

.info h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  min-height: 40px;
  max-height: 40px;
  overflow: hidden;
}

.prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  min-height: 108px;
}

.price-block {
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 12px;
}

.price-block .label {
  font-size: 10px;
  color: #555;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.price-block .value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}

.price-block.placeholder {
  visibility: hidden;
}

.minorista {
  background: #f4f4f4;
}

.majorista {
  background: #fff3f3;
}

.footer {
  border-top: 1px solid #e9e9e9;
  margin-top: 10px;
  padding: 18px 0 8px;
  font-size: 13px;
  color: #666;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

@media (max-width: 900px) {
  .cover {
    grid-template-columns: 1fr;
  }

  .cover-left,
  .cover-right {
    padding: 24px;
  }

  .catalog-grid {
    padding: 24px 16px 8px;
  }
}

@media (max-width: 768px) {
  .page {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .logo-wrap,
  .logo,
  .logo-fallback {
    width: 160px;
    height: 160px;
  }

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

  .image-wrap {
    height: 170px;
  }

  .info h4 {
    font-size: 14px;
    min-height: 38px;
    max-height: 38px;
  }

  .price-block {
    padding: 10px;
  }

  .price-block .label {
    font-size: 11px;
  }

  .price-block .value {
    font-size: 18px;
  }

  .category-header h2 {
    font-size: 24px;
  }

  .footer {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .catalog-grid {
    padding: 18px 12px 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cover-left,
  .cover-right {
    padding: 18px;
  }

  .hero-box {
    padding: 20px;
  }

  .logo-wrap,
  .logo,
  .logo-fallback {
    width: 140px;
    height: 140px;
  }

  .cover h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 14px;
  }

  .contact,
  .notes {
    font-size: 13px;
  }

  .image-wrap {
    height: 145px;
  }

  .info h4 {
    font-size: 13px;
    min-height: 34px;
    max-height: 34px;
  }

  .price-block .value {
    font-size: 16px;
  }
}

@media print {
  html,
  body {
    background: #fff;
  }

  body {
    margin: 0;
    padding: 0;
  }

  .page {
    box-shadow: none;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
  }

  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4mm;
    padding: 8mm;
    align-items: start;
  }

  .cover,
  .category-header,
  .card,
  .footer {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .logo-wrap,
  .logo,
  .logo-fallback {
    width: 200px;
    height: 200px;
  }

  .card {
    border-radius: 8px;
    font-size: 8.5pt;
    height: auto;
    min-height: 0;
  }

  .image-wrap {
    height: 46mm;
    padding: 4mm;
  }

  .info {
    gap: 2.5mm;
  }

  .info h4 {
    font-size: 10pt;
    min-height: auto;
    max-height: none;
  }

  .prices {
    min-height: auto;
  }

  .price-block {
    padding: 3mm;
  }

  .price-block .label {
    font-size: 7pt;
  }

  .price-block .value {
    font-size: 10pt;
  }

  .price-block.placeholder {
    display: none;
  }
}
