:root {
  --vino: #7b0909;
  --vino-oscuro: #4f0303;
  --dorado: #c7892b;
  --dorado-claro: #e8b76b;
  --crema: #fff8f1;
  --blanco: #ffffff;
  --tinta: #111111;
  --gris: #555555;
  --linea: rgba(123, 9, 9, 0.14);
  --sombra: 0 14px 34px rgba(80, 20, 20, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #fffaf5 0%, #ffffff 46%, #fff7f2 100%);
  color: var(--tinta);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.skip-link {
  background: var(--vino);
  color: var(--blanco);
  left: 14px;
  padding: 10px 14px;
  position: absolute;
  top: -60px;
  z-index: 1000;
}

.skip-link:focus {
  top: 14px;
}

.top-bar {
  background: linear-gradient(90deg, var(--vino-oscuro), var(--vino), var(--vino-oscuro));
  color: var(--blanco);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 8px 15px;
  text-align: center;
  text-transform: uppercase;
}

.navbar {
  align-items: center;
  background: var(--blanco);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 10px 5%;
  position: relative;
  z-index: 20;
}

.logo img {
  height: auto;
  max-height: 110px;
  object-fit: contain;
  width: 260px;
}

.nav-menu {
  align-items: center;
  display: flex;
  gap: 24px;
  list-style: none;
  text-transform: uppercase;
}

.nav-menu a {
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 900;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--vino);
}

.nav-info {
  color: #222222;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 6px;
  line-height: 1.3;
  text-align: right;
}

.nav-info a {
  color: var(--vino);
  font-size: 18px;
  font-weight: 900;
}

.catalog-hero {
  background:
    linear-gradient(90deg, rgba(255, 250, 245, 0.98), rgba(255, 248, 241, 0.9)),
    url("./foto 1 Portada.jpg") center/cover;
  min-height: 330px;
  padding: 70px 5%;
}

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

.eyebrow,
.section-label {
  color: var(--dorado);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.catalog-hero h1,
.section-heading h2 {
  color: #101927;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
  text-transform: uppercase;
}

.catalog-hero h1 {
  font-size: clamp(36px, 5vw, 68px);
  margin-bottom: 18px;
}

.catalog-hero p:last-child {
  color: #202020;
  font-size: 18px;
  line-height: 1.7;
  max-width: 690px;
}

.catalog-shell {
  margin: 0 auto;
  max-width: 1450px;
  padding: 54px 5% 72px;
}

.section-heading {
  margin-bottom: 24px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 42px);
}

.filters {
  align-items: end;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(199, 137, 43, 0.24);
  box-shadow: var(--sombra);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  padding: 18px;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.filters span {
  color: var(--vino);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.filters select,
.filters input {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 7px;
  color: #242424;
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.filters select:focus,
.filters input:focus,
.btn:focus,
.product-media:focus,
.lightbox-close:focus {
  outline: 3px solid rgba(199, 137, 43, 0.38);
  outline-offset: 2px;
}

.catalog-status {
  align-items: center;
  color: var(--gris);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  margin: 18px 0 22px;
}

#resultCount {
  color: var(--vino);
  font-weight: 900;
}

#loadMessage {
  max-width: 680px;
}

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

.product-card {
  background: var(--blanco);
  border: 1px solid rgba(123, 9, 9, 0.12);
  box-shadow: 0 10px 26px rgba(80, 20, 20, 0.1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.product-media {
  aspect-ratio: 4 / 5;
  background: var(--crema);
  border: 0;
  cursor: pointer;
  display: block;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.product-media img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
  width: 100%;
}

.product-card:hover .product-media img {
  transform: scale(1.035);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 17px;
}

.product-body h3 {
  color: #171717;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.2;
}

.product-meta {
  color: var(--gris);
  display: grid;
  gap: 5px;
  font-size: 13px;
  line-height: 1.35;
}

.product-code {
  color: var(--vino);
  font-weight: 900;
}

.product-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: auto;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.5px;
  min-height: 44px;
  padding: 0 16px;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(180deg, var(--vino), var(--vino-oscuro));
  box-shadow: 0 8px 18px rgba(123, 9, 9, 0.22);
  color: var(--blanco);
}

.btn.secondary {
  background: var(--blanco);
  border-color: var(--dorado);
  color: var(--vino);
}

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

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.is-hidden {
  display: none !important;
}

.empty-state {
  background: var(--blanco);
  border: 1px solid rgba(199, 137, 43, 0.24);
  color: var(--gris);
  grid-column: 1 / -1;
  padding: 26px;
  text-align: center;
}

.lightbox {
  align-items: center;
  background: rgba(17, 17, 17, 0.78);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2000;
}

.lightbox.active {
  display: flex;
}

.lightbox-panel {
  background: var(--blanco);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  max-height: 92vh;
  max-width: 980px;
  overflow: auto;
  position: relative;
  width: min(100%, 980px);
}

.lightbox-panel picture {
  background: #150808;
  display: block;
}

.lightbox-panel img {
  height: min(68vh, 780px);
  object-fit: contain;
  width: 100%;
}

.lightbox-close {
  align-items: center;
  background: var(--blanco);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  color: var(--vino);
  cursor: pointer;
  display: flex;
  font-size: 32px;
  font-weight: 400;
  height: 44px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
  z-index: 2;
}

.lightbox-details {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.lightbox-details h2 {
  color: #101927;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.2;
}

.lightbox-details p {
  color: var(--vino);
  font-weight: 900;
}

.footer {
  background: linear-gradient(180deg, var(--vino-oscuro), #2e0101);
  color: var(--blanco);
  padding: 34px 5% 18px;
}

.footer-main {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1200px;
}

.footer-logo {
  height: auto;
  max-width: 220px;
}

.footer h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  margin-bottom: 8px;
}

.footer p {
  line-height: 1.6;
}

.dibusai-credit {
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-self: end;
}

.dibusai-credit img {
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  margin: 24px auto 0;
  max-width: 1200px;
  padding-top: 14px;
  text-align: center;
}

body.lightbox-open {
  overflow: hidden;
}

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

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

@media (max-width: 850px) {
  .navbar {
    align-items: center;
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .nav-menu {
    flex-wrap: wrap;
    gap: 14px 20px;
    justify-content: center;
  }

  .nav-info {
    text-align: center;
  }

  .catalog-hero {
    min-height: 280px;
    padding: 52px 5%;
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

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

  .footer-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .dibusai-credit {
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .top-bar {
    font-size: 12px;
  }

  .logo img {
    width: min(240px, 82vw);
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 14px;
  }

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

  .catalog-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-details h2 {
    font-size: 22px;
  }
}
