/* Wines modal: catalog preview opened from the "Vinos" nav item, with
   category tabs and a product grid. Mirrors the gallery lightbox's
   self-contained styling approach (no Tailwind dependency, since this
   markup is injected at runtime). */

.wines-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 12, 0.88);
  padding: 24px;
}

.wines-modal-overlay[hidden] {
  display: none;
}

.wines-modal-panel {
  position: relative;
  width: 100%;
  max-width: 1080px;
  max-height: 88vh;
  overflow-y: auto;
  background: #f9f8f4;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: 48px 32px 40px;
}

@media (max-width: 640px) {
  .wines-modal-panel {
    padding: 56px 18px 32px;
    border-radius: 8px;
  }
}

.wines-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(84, 93, 92, 0.3);
  color: #545d5c;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.wines-modal-close:hover {
  border-color: #b98d58;
  color: #b98d58;
}

.wines-modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.wines-modal-eyebrow {
  font-family: 'Alata', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #b98d58;
  margin: 0 0 10px;
}

.wines-modal-title {
  font-family: 'Cormorant Infant', serif;
  font-weight: 500;
  font-size: 34px;
  color: #22261f;
  margin: 0 0 8px;
}

.wines-modal-subtitle {
  font-family: 'Cormorant Infant', serif;
  font-size: 17px;
  color: rgba(84, 93, 92, 0.85);
  margin: 0;
}

.wines-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.wines-modal-tab {
  font-family: 'Alata', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #545d5c;
  background: transparent;
  border: 1px solid rgba(84, 93, 92, 0.25);
  border-radius: 9999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.wines-modal-tab:hover {
  border-color: #b98d58;
  color: #b98d58;
}

.wines-modal-tab.is-active {
  background: #b98d58;
  border-color: #b98d58;
  color: #ffffff;
}

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

@media (min-width: 640px) {
  .wines-modal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .wines-modal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.wines-modal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 14px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wines-modal-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.wines-modal-card[hidden] {
  display: none;
}

.wines-modal-card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #f2f0ea;
}

.wines-modal-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wines-modal-card-name {
  font-family: 'Cormorant Infant', serif;
  font-size: 17px;
  line-height: 1.25;
  color: #22261f;
  margin: 0 0 6px;
}

.wines-modal-card-tag {
  font-family: 'Alata', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b98d58;
  margin: 0 0 8px;
}

.wines-modal-card-price {
  font-family: 'Alata', sans-serif;
  font-size: 13px;
  color: #545d5c;
  margin: 0;
}

.wines-modal-footer {
  text-align: center;
  margin-top: 36px;
}

.wines-modal-viewall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Alata', sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #b98d58;
  text-decoration: none;
}

.wines-modal-viewall:hover {
  text-decoration: underline;
}

.wines-modal-viewall svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.wines-modal-viewall:hover svg {
  transform: translateX(4px);
}
