/* ===== Page Header ===== */
.page-header {
  position: relative;
  padding: 10rem 0 6rem;
  margin-top: 80px;
  background: linear-gradient(135deg, rgb(52, 71, 149) 0%, rgb(123, 121, 177) 50%, rgb(229, 179, 91) 100%);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat bottom;
  background-size: cover;
}

.page-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(52, 71, 149, 0.85) 0%, rgba(229, 179, 91, 0.75) 100%), url("../images/catalogo_header.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header .container {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.page-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.page-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Filter Section ===== */
.filter-section {
  padding: 3rem 0;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-light);
}

.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 1rem;
  background: white;
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(229, 179, 91, 0.1);
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(229, 179, 91, 0.3);
}

/* ===== Catalog Products ===== */
.catalog-products {
  padding: 4rem 0;
  min-height: 60vh;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer;
  opacity: 0;
  animation: fadeInScale 0.5s ease forwards;
}

.product-card:nth-child(1) {
  animation-delay: 0.05s;
}
.product-card:nth-child(2) {
  animation-delay: 0.1s;
}
.product-card:nth-child(3) {
  animation-delay: 0.15s;
}
.product-card:nth-child(4) {
  animation-delay: 0.2s;
}
.product-card:nth-child(5) {
  animation-delay: 0.25s;
}
.product-card:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(250, 163, 50, 0.76));
  transition: var(--transition-normal);
}

.product-card:hover .product-image::before {
  opacity: 0.9;
}

.product-icon {
  position: relative;
  z-index: 2;
  font-size: 5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-secondary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-info {
  padding: 1.5rem;
}

.product-category-tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.product-name {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.product-description {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.product-btn {
  background: var(--gradient-primary);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 179, 91, 0.3);
}

/* ===== No Results ===== */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.no-results svg {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.no-results p {
  font-size: 1.1rem;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
}

.modal-close:hover {
  background: var(--secondary-color);
  color: white;
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

.modal-product-image {
  height: 300px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.modal-product-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(229, 179, 91, 0.7), rgba(185, 114, 101, 0.5));
}

.modal-product-icon {
  position: relative;
  z-index: 2;
  font-size: 8rem;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}

.modal-product-header {
  margin-bottom: 2rem;
}

.modal-product-name {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.modal-product-category {
  display: inline-block;
  background: var(--bg-light);
  color: var(--primary-color);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-product-description {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.modal-product-details {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.modal-product-details h4 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.modal-product-details ul {
  list-style: none;
  padding: 0;
}

.modal-product-details li {
  padding: 0.5rem 0;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-product-details li::before {
  content: "✓";
  color: var(--accent-color);
  font-weight: bold;
}

.modal-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.modal-product-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.modal-product-btn {
  background: var(--gradient-secondary);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px rgba(52, 71, 149, 0.3);
}

.modal-product-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(52, 71, 149, 0.4);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.5rem;
  }

  .page-subtitle {
    font-size: 1.1rem;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .filter-buttons {
    justify-content: center;
  }

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

  .modal-content {
    margin: 1rem;
  }

  .modal-product-footer {
    flex-direction: column;
    gap: 1.5rem;
  }

  .modal-product-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 8rem 0 4rem;
  }

  .filter-btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }

  .modal-product-price {
    font-size: 2rem;
  }
}
