/* ==============================================
    ESTILOS ESPECÍFICOS DEL CATÁLOGO
============================================== */

body {
  background: #1a171c;
}

.site-header {
  width: 100%;
  padding: 20px 0;
  position: relative;
  z-index: 100;
  background: #1a171c;
}

.site-header {
  background: #1a171c;
  width: 100%;
  padding: 20px 0;
  position: relative;
  z-index: 100;
}

.section-header {
  display: flex;
  flex-wrap: wrap; 
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  width: 100%;
  gap: 20px;
}

/* ==============================================
    ESTILOS ESPECÍFICOS DEL CATÁLOGO
============================================= */

/* Contenedor principal del catálogo */
.catalog-page {
  background-color: #1a171c;
  min-height: 100vh;
  padding-top: 140px;
  overflow-x: hidden;
}

.catalog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: hidden;
}

/* Header del catálogo */
.catalog-header {
  margin-bottom: 60px;
}

.catalog-title {
  font-family: "Bebas Neue", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 68px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.catalog-subtitle {
  font-family: "Oswald", Helvetica;
  font-weight: 400;
  color: #66636b;
  font-size: 20px;
  line-height: 1.6;
}

/* Layout principal: Sidebar + Productos */
.catalog-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

/* ==============================================
           SIDEBAR DE FILTROS
           ============================================== */
.filters-sidebar {
  background-color: #2f2e31;
  border-radius: 20px;
  padding: 30px;
  height: fit-content;
  position: sticky;
  top: 140px;
}

.filters-title {
  font-family: "Bebas Neue", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 32px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #475764;
}

.filter-section {
  margin-bottom: 30px;
}

.filter-section-title {
  font-family: "Bebas Neue", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 15px;
}

/* Búsqueda */
.search-box {
  position: relative;
  margin-bottom: 30px;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  background-color: #1a171c;
  border: 2px solid #475764;
  border-radius: 10px;
  color: #ffffff;
  font-family: "Oswald", Helvetica;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #8dd4e6;
}

.search-input::placeholder {
  color: #66636b;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #66636b;
  font-size: 18px;
  pointer-events: none;
}

/* Filtros de categorías */
.category-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-filter {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.category-filter:hover {
  background-color: rgba(141, 212, 230, 0.1);
}

.category-filter input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #8dd4e6;
}

.category-filter label {
  font-family: "Oswald", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  flex: 1;
}

.category-count {
  color: #66636b;
  font-size: 16px;
  margin-left: auto;
}

/* Filtro de precio */
.price-range {
  margin-bottom: 15px;
}

.price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.price-input-group {
  position: relative;
}

.price-input-group span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #66636b;
  font-family: "Oswald", Helvetica;
}

.price-input {
  width: 100%;
  padding: 10px 10px 10px 30px;
  background-color: #1a171c;
  border: 2px solid #475764;
  border-radius: 8px;
  color: #ffffff;
  font-family: "Oswald", Helvetica;
  font-size: 16px;
}

.price-input:focus {
  outline: none;
  border-color: #8dd4e6;
}

.price-slider {
  width: 100%;
  height: 6px;
  background: #475764;
  border-radius: 5px;
  outline: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #8dd4e6;
  cursor: pointer;
  border-radius: 50%;
}

.price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #8dd4e6;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

/* Botones de acción del filtro */
.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.btn-apply-filters,
.btn-clear-filters {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-family: "Bebas Neue", Helvetica;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-apply-filters {
  background-color: #475764;
  color: #ffffff;
}

.btn-apply-filters:hover {
  background-color: #3a4a57;
  transform: translateY(-2px);
}

.btn-clear-filters {
  background-color: transparent;
  color: #66636b;
  border: 2px solid #475764;
}

.btn-clear-filters:hover {
  background-color: rgba(71, 87, 100, 0.2);
}

/* ==============================================
           ÁREA DE PRODUCTOS
           ============================================== */
.products-area {
  min-height: 500px;
}

/* Toolbar superior */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background-color: #2f2e31;
  border-radius: 15px;
}

.products-count {
  font-family: "Oswald", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 18px;
}

.products-count span {
  color: #8dd4e6;
  font-weight: 600;
}

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

.sort-label {
  font-family: "Oswald", Helvetica;
  color: #ffffff;
  font-size: 16px;
}

.sort-select {
  padding: 10px 35px 10px 15px;
  background-color: #1a171c;
  border: 2px solid #475764;
  border-radius: 10px;
  color: #ffffff;
  font-family: "Oswald", Helvetica;
  font-size: 16px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.sort-select:focus {
  outline: none;
  border-color: #8dd4e6;
}

.view-toggle {
  display: flex;
  gap: 5px;
  margin-left: 20px;
}

.view-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a171c;
  border: 2px solid #475764;
  border-radius: 8px;
  color: #66636b;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-btn:hover,
.view-btn.active {
  background-color: #475764;
  color: #ffffff;
  border-color: #8dd4e6;
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

/* Vista en lista */
.products-grid.list-view {
  grid-template-columns: 1fr;
}

/* Tarjeta de producto */
.product-card {
  background-color: #2f2e31;
  border-radius: 20px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(141, 212, 230, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(141, 212, 230, 0.2);
}

.product-card:hover::before {
  opacity: 1;
}

/* Vista en lista */
.products-grid.list-view .product-card {
  flex-direction: row;
  text-align: left;
  padding: 30px;
  gap: 30px;
}

/* Badge de destacado */
.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #8dd4e6;
  color: #1a171c;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: "Bebas Neue", Helvetica;
  font-size: 14px;
  font-weight: 600;
  z-index: 2;
}

/* Imagen del producto */
.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  border-radius: 10px;
  margin-top: 30px;
  background: #1a171c;
}


/* Información del producto */
.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.product-category {
  font-family: "Oswald", Helvetica;
  font-weight: 400;
  color: #66636b;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-name {
  font-family: "Bebas Neue", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.2;
  margin: 5px 0;
}

.product-description {
  font-family: "Oswald", Helvetica;
  font-weight: 400;
  color: #66636b;
  font-size: 16px;
  line-height: 1.5;
  display: none;
}

.products-grid.list-view .product-description {
  display: block;
  margin: 10px 0;
}

.product-price {
  font-family: "Oswald", Helvetica;
  font-weight: 600;
  color: #8dd4e6;
  font-size: 24px;
  margin-top: 10px;
}

.product-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.products-grid.list-view .product-actions {
  justify-content: flex-start;
}

.btn-add-cart,
.btn-view-details {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-family: "Bebas Neue", Helvetica;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-add-cart {
  background-color: #475764;
  color: #ffffff;
}

.btn-add-cart:hover {
  background-color: #3a4a57;
  transform: translateY(-2px);
}

.btn-view-details {
  background-color: transparent;
  color: #8dd4e6;
  border: 2px solid #475764;
}

.btn-view-details:hover {
  background-color: rgba(141, 212, 230, 0.1);
  border-color: #8dd4e6;
}

.products-grid.list-view .btn-add-cart,
.products-grid.list-view .btn-view-details {
  flex: 0 0 auto;
  padding: 12px 30px;
}

/* Stock badge */
.stock-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: "Oswald", Helvetica;
  font-size: 14px;
  font-weight: 600;
  z-index: 2;
}

.stock-badge.in-stock {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.stock-badge.low-stock {
  background-color: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

.stock-badge.out-of-stock {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* ==============================================
           PAGINACIÓN
           ============================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination-btn,
.pagination-number {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2f2e31;
  border: 2px solid #475764;
  border-radius: 10px;
  color: #ffffff;
  font-family: "Bebas Neue", Helvetica;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-number:hover {
  background-color: #475764;
  border-color: #8dd4e6;
}

.pagination-number.active {
  background-color: #8dd4e6;
  border-color: #8dd4e6;
  color: #1a171c;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-btn:disabled:hover {
  background-color: #2f2e31;
  border-color: #475764;
}

/* Estado vacío */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state i {
  font-size: 80px;
  color: #475764;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-family: "Bebas Neue", Helvetica;
  font-weight: 400;
  color: #ffffff;
  font-size: 36px;
  margin-bottom: 15px;
}

.empty-state p {
  font-family: "Oswald", Helvetica;
  font-weight: 400;
  color: #66636b;
  font-size: 18px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 23, 28, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  border: 4px solid #475764;
  border-top: 4px solid #8dd4e6;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


/* Filters toggle button — hidden on desktop, shown on tablet/mobile */
.filters-toggle-btn {
  display: none;
}

.filters-close-btn {
  display: none;
}

.filters-backdrop {
  display: none;
}
/* ==============================================
           RESPONSIVE DESIGN
           ============================================== */
@media (max-width: 1200px) {
  .catalog-content {
    grid-template-columns: 280px 1fr;
    gap: 30px;
  }

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

@media (max-width: 992px) {
  .catalog-page {
    padding-top: 100px;
  }

  .catalog-title {
    font-size: 48px;
  }

  .catalog-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .filters-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #2f2e31;
    color: #fff;
    border: 1px solid #475764;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Oswald", Helvetica;
    font-size: 16px;
    margin-bottom: 16px;
  }

  .filters-toggle-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
  }

  .filters-toggle-btn.active i {
    transform: rotate(180deg);
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -110%;
    width: 300px;
    height: 100vh;
    z-index: 500;
    padding: 30px 25px;
    overflow-y: auto;
    transition: left 0.3s ease;
    border-radius: 0;
  }

  .filters-sidebar.active {
    left: 0;
  }

  .filters-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 499;
    backdrop-filter: blur(2px);
  }

  .filters-backdrop.active {
    display: block;
  }

  .filters-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid #475764;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
    margin-bottom: 16px;
  }

  body.filters-open {
    overflow: hidden;
  }

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

  .products-toolbar {
    flex-wrap: wrap;
    gap: 15px;
  }

  .view-toggle {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .catalog-title {
    font-size: 36px;
  }

  .catalog-subtitle {
    font-size: 18px;
  }

  .filters-sidebar {
    padding: 20px;
  }

  .filters-title {
    font-size: 28px;
  }

  .filter-section-title {
    font-size: 20px;
  }

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

  .product-card {
    padding: 20px;
  }

  .product-name {
    font-size: 24px;
  }

  .product-price {
    font-size: 20px;
  }

  .products-toolbar {
    padding: 15px;
  }

  .products-sort {
    flex-wrap: wrap;
    width: 100%;
  }

  .sort-select {
    flex: 1;
  }

  .products-grid.list-view .product-card {
    flex-direction: column;
    text-align: center;
  }

  .products-grid.list-view .product-image {
    width: 100%;
    height: 220px;
    margin-bottom: 20px;
  }

  .products-grid.list-view .product-actions {
    justify-content: center;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .catalog-page {
    padding-top: 80px;
  }

  .catalog-header {
    margin-bottom: 40px;
  }

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

  .product-actions {
    flex-direction: column;
  }

  .filter-actions {
    flex-direction: column;
  }

  .pagination {
    gap: 5px;
  }

  .pagination-btn,
  .pagination-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* Badge de favoritos en header */
.favorites-badge,
.favorites-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0 5px;
}
