.tienda-wrap {
  --bg: #0d0d0d;
  --card: #161616;
  --text: #e8e0d0;
  --gold: #c9a227;
  --gold-hover: #e0b83a;
  --shadow-dark: #050505;
  --shadow-light: #1f1f1f;
  --price: #f0e6d2;

  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 2rem 1rem 2rem;
  scroll-margin-top: 160px;
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(ellipse 1000px 480px at 50% 0%, rgba(201, 162, 39, 0.30), transparent 65%),
    radial-gradient(ellipse 750px 500px at 5% 20%, rgba(63, 174, 111, 0.24), transparent 60%),
    radial-gradient(ellipse 750px 500px at 95% 60%, rgba(63, 174, 111, 0.20), transparent 60%),
    radial-gradient(ellipse at top, #1f1f1f 0%, transparent 60%),
    radial-gradient(ellipse at bottom, #0a0a0a 0%, transparent 50%);
}

.tienda-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffc178, #ff8a1e, transparent);
  box-shadow: 0 0 16px 2px rgba(255, 138, 30, 0.55);
}

/* Header con banner */
.header-container {
  display: flex;
  margin-bottom: 2.5rem;
}

.header-banner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.header-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow:
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
}

/* Filtros de categoría */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.filters-mascota {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.filters::before,
.filters::after {
  content: '';
  display: block;
  width: 100%;
  flex-basis: 100%;
  max-width: 1200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7fe0ab, #3fae6f, transparent);
  box-shadow: 0 0 16px 2px rgba(63, 174, 111, 0.55);
}

.filters::before {
  margin: 0 auto 2rem;
}

.filters::after {
  margin: 1.5rem auto 0;
}

.filter-btn {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(201, 162, 39, 0.02));
  border: 1px solid rgba(201, 162, 39, 0.25);
  color: #bbb;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-btn:hover {
  border-color: rgba(201, 162, 39, 0.55);
  color: var(--gold-hover);
  box-shadow:
    0 0 12px rgba(201, 162, 39, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.22), rgba(201, 162, 39, 0.08));
  border-color: #e0b83a;
  color: #fff3d6;
  box-shadow:
    0 0 14px rgba(201, 162, 39, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Grid de productos - Tarjetas compactas */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.products-grid::after {
  content: '';
  grid-column: 1 / -1;
  width: 100%;
  max-width: 500px;
  height: 2px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, #8fb8ff, #5c8fd6, transparent);
  box-shadow: 0 0 16px 2px rgba(92, 143, 214, 0.5);
}

.product-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    12px 12px 24px var(--shadow-dark),
    -12px -12px 24px var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow:
    16px 16px 32px var(--shadow-dark),
    -16px -16px 32px var(--shadow-light);
  border-color: var(--gold);
}

.product-category {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: rgba(13, 13, 13, 0.9);
  color: var(--gold);
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  letter-spacing: 0.5px;
  z-index: 10;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-image-wrap a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-image-wrap:hover img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.2rem 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.3px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.1rem;
  color: var(--price);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  color: #bbb;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.25s;
}

.product-card:hover .product-cta {
  color: var(--gold);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #555;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Modal desplegable */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content {
  background: var(--card);
  border-radius: 24px;
  box-shadow:
    24px 24px 48px var(--shadow-dark),
    -24px -24px 48px var(--shadow-light);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: slideUp 0.3s ease-out;
  border: 1px solid var(--gold);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(13, 13, 13, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gold);
  font-size: 1.8rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  border-radius: 50%;
  box-shadow:
    4px 4px 8px var(--shadow-dark),
    -4px -4px 8px var(--shadow-light);
  z-index: 5;
}

.modal-close:hover {
  background: var(--gold);
  color: #0d0d0d;
  border-color: var(--gold);
}

.modal-image-link {
  display: block;
  text-decoration: none;
}

.modal-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0a0a0a;
  border-radius: 18px;
  margin-bottom: 1.5rem;
  box-shadow:
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
  cursor: pointer;
  transition: transform 0.25s;
}

.modal-image:hover {
  transform: scale(1.02);
}

.modal-title {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.modal-category {
  display: inline-block;
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-price {
  font-size: 1.6rem;
  color: var(--price);
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 1.2rem;
}

.modal-description {
  color: #aaa;
  line-height: 1.7;
  margin-bottom: 1.8rem;
  font-size: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.btn-buy,
.btn-video {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 0.9rem 1.5rem;
  border-radius: 14px;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.4px;
  font-weight: 600;
  transition: all 0.25s;
  box-shadow:
    4px 4px 8px var(--shadow-dark),
    -4px -4px 8px var(--shadow-light);
  cursor: pointer;
  border: none;
}

.btn-buy {
  background: var(--gold);
  color: #0d0d0d;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
}

.btn-video {
  background: transparent;
  border: 1.5px solid #666;
  color: #bbb;
}

.btn-video:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

@media (max-width: 600px) {
  .tienda-wrap::before {
    width: 80%;
    max-width: 280px;
  }

  .header-container {
    margin-bottom: 2rem;
  }

  .filters::before {
    margin: 0 auto 1.25rem;
  }

  .filters::after {
    margin: 1rem auto 0;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }
  
  .modal-content {
    padding: 1.5rem;
    border-radius: 20px;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
}