/* Estilos para la página de productos */

.products-hero {
  background-color: var(--bg-color);
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.products-hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0.1), transparent 70%);
  z-index: 0;
  transform: rotate(-15deg);
}

.products-hero::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 40%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0.05), transparent 70%);
  z-index: 0;
  transform: rotate(20deg);
}

.products-hero-content {
  position: relative;
  z-index: 1;
}

.products-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.products-hero p {
  font-size: 1.2rem;
  color: #aaa;
  max-width: 700px;
  margin: 0 auto;
}

/* Products section */
.products-section {
  padding: 4rem 0;
  background-color: var(--bg-color);
}

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

/* Sidebar */
.products-sidebar {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 25px;
  position: sticky;
  top: 20px;
  height: fit-content;
  border: 1px solid var(--card-border);
}

.filter-section {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 20px;
}

.filter-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.filter-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  display: none;
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #555;
  border-radius: 3px;
  margin-right: 10px;
  position: relative;
  transition: all 0.2s;
}

.filter-option input[type="checkbox"]:checked + .filter-checkbox {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.filter-option input[type="checkbox"]:checked + .filter-checkbox::after {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
}

.filter-text {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.filter-option:hover .filter-text {
  color: var(--text-color);
}

/* Price filter */
.price-filter {
  padding: 10px 0;
}

.price-filter input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 5px;
  background: #333;
  border-radius: 5px;
  outline: none;
  margin-bottom: 15px;
}

.price-filter input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
}

.price-filter input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.price-range-values {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.reset-filters-btn {
  width: 100%;
  padding: 10px;
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.reset-filters-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Products content */
.products-content {
  width: 100%;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--card-border);
}

.products-count {
  color: var(--text-secondary);
}

.products-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-sort label {
  color: var(--text-secondary);
}

.products-sort select {
  padding: 8px 12px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  color: var(--text-color);
  cursor: pointer;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.product-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  border: 1px solid var(--card-border);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.badge {
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge.discount {
  background-color: var(--primary-color);
  color: white;
}

.badge.featured {
  background-color: #ffc107;
  color: #000;
}

.product-thumb {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s;
}

.product-card:hover .product-thumb img {
  transform: scale(1.05);
}

.product-actions {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  transition: bottom 0.3s;
}

.product-card:hover .product-actions {
  bottom: 0;
}

.btn-action {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-action i {
  color: #333;
  font-size: 0.9rem;
}

.btn-action:hover {
  background-color: var(--primary-color);
}

.btn-action:hover i {
  color: white;
}

.btn-action.add-to-wishlist.active {
  background-color: var(--primary-color);
}

.btn-action.add-to-wishlist.active i {
  color: white;
}

.product-info {
  padding: 15px;
}

.product-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.product-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.product-title a:hover {
  color: var(--primary-color);
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.current-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

.old-price {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-rating i {
  color: #ffc107;
  font-size: 0.9rem;
}

.rating-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s;
}

.pagination a.next {
  width: auto;
  padding: 0 15px;
}

.pagination a.next i {
  margin-left: 5px;
}

.pagination a.active,
.pagination a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* No products message */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Quick view modal */
.product-quick-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.product-quick-view-image {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.product-quick-view-image img {
  width: 100%;
  height: auto;
  display: block;
}

.product-quick-view-content h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.product-description {
  margin: 20px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.product-meta {
  margin-bottom: 20px;
}

.product-meta p {
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.in-stock {
  color: #4caf50;
  font-weight: 500;
}

.quantity-selector {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.quantity-btn {
  width: 35px;
  height: 35px;
  background-color: #333;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-selector input {
  width: 50px;
  height: 35px;
  text-align: center;
  border: 1px solid #333;
  background-color: var(--card-bg);
  color: var(--text-color);
  margin: 0;
}

.product-actions {
  display: flex;
  align-items: center;
  margin-top: 25px;
}

.add-to-cart-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 15px;
}

.btn-wishlist {
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-wishlist i {
  color: var(--text-secondary);
  transition: color 0.3s;
}

.btn-wishlist:hover,
.btn-wishlist.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-wishlist:hover i,
.btn-wishlist.active i {
  color: white;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.show {
  display: block;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-container {
  background-color: var(--card-bg);
  border-radius: 10px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .products-sidebar {
    position: static;
    margin-bottom: 30px;
  }

  .product-quick-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .products-hero h1 {
    font-size: 2.5rem;
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 576px) {
  .products-hero h1 {
    font-size: 2rem;
  }

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

  .pagination a {
    width: 35px;
    height: 35px;
  }
}

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