:root {
  --Mts-regular: "Monstserrat-Regularr", sans-serif;
  --Rb-regular: "Roboto-Regular", sans-serif;
  --Fj-regular: "Fjalla-one", sans-serif;
  --bg-azul: #00002a;
  --bg-black: #111;
  --bg-purple-main: #9300e8;
  --bg-morado-claro: #9669f0;
  --bg-color-red: #f23f40;
}
/* CSS con indentación SASS - Mirana Shop */

.shop {
  .container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
  }

  .left {
    width: 280px;
    flex-shrink: 0;
    position: relative;

    /* DESKTOP: Ocultar sidebar por defecto, mostrar con botón */
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: white;
    z-index: 40;
    transition: transform 0.3s ease;

    &.active {
      transform: translateX(0);
    }

    aside.filters-sidebar {
      background: #ffffff;
      border: 1px solid #e5e7eb;
      border-radius: 0 12px 12px 0;
      overflow: hidden;
      width: 320px;
      height: 100vh;
      overflow-y: auto;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
      transition: transform 0.3s ease;
    }
  }
}

/* Botón flotante de filtros - VISIBLE EN DESKTOP Y MÓVIL */
.filters-toggle-btn {
  position: fixed;
  bottom: 12px;
  left: 1px;
  transform: translateY(-50%);
  background: #3742fa;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(55, 66, 250, 0.3);
  transition: all 0.3s ease;
  /* CAMBIADO: Ahora visible en desktop también */

  &:hover {
    background: #2f3542;
    transform: translateY(-50%) scale(1.05);
  }

  svg {
    width: 18px;
    height: 18px;
  }

  .active-filters-count {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
  }
}

/* Overlay para móvil */
.filters-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 39;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

  &.active {
    opacity: 1;
    visibility: visible;
  }
}

.productos-all {
  flex: 1;
  min-height: 600px;
  width: 100%; /* NUEVO: Ocupa todo el ancho cuando no hay sidebar */
  margin-left: 0; /* NUEVO: Sin margen izquierdo */
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;

  h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
  }

  .filters-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .clear-filters-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;

    &:hover {
      background: #c82333;
    }
  }

  .close-filters-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    /* CAMBIADO: Visible en desktop también */

    &:hover {
      background: #f1f3f4;
      color: #333;
    }
  }
}

.filter-section {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.filter-checkbox input {
  margin-right: 8px;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  display: none;
}

.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Grid de productos personalizado */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* Tarjeta de producto personalizada */
.product-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Imagen del producto */
.product-image {
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  a{
    display: block;
  }
}

.product-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

/* Badges del producto */
.product-badges {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}

.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.sale-badge {
  background: #ff4757;
  color: white;
}

.preorder-badge {
  background: #3742fa;
  color: white;
}

.sold-out-badge {
  background: #747d8c;
  color: white;
}

/* Botón de favoritos */
.favorite-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
}

.favorite-btn:hover {
  background: #ff4757;
  color: white;
  transform: scale(1.1);
}

/* Información del producto */
.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-title {
  margin: 0 0 15px 0;

  font-size: 16px;
  font-weight: 300;
  line-height: 1.4;
  height: 45px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-title a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}



/* Precios */
.product-price {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.original-price {
  color: #95a5a6;
  text-decoration: line-through;
  font-size: 14px;
  font-weight: 300;

}

.sale-price,
.current-price {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 700;
  font-weight: 300;
}

.sale-price {
  color: #ff4757;
}

/* Botón agregar al carrito */
.add-to-cart-btn {
    display: flex;
    justify-content: center;
  width: 100%;
  padding: 14px;
  /* background: linear-gradient(135deg, #3742fa 0%, #5352ed 100%); */
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  .button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
    background-color: #f23f40;
    color: white;
    transition: all 0.3s ease-in-out;
  }
  &:hover {
    .button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
      background-color: var(--bg-black);
    }
  }
}

.add-to-cart-btn.preorder {
  background: linear-gradient(135deg, #3742fa 0%, #70a1ff 100%);
}

.add-to-cart-btn.disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

.add-to-cart-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Header de la tienda */
.shop-header {
  margin-bottom: 30px;
}

.shop-header .page-title {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e5e7eb;
}

.results-count span {
  color: #7f8c8d;
  font-size: 14px;
}

.shop-ordering select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  font-size: 14px;
}

.woocommerce nav.woocommerce-pagination{
    padding: 2rem 0;
    .page-numbers{
        display: flex;
        justify-content: center;
        border: none;
        gap: 1rem;
        li{
            border: none;
            .page-numbers{
                width: 40px;
                height: 40px;
                border-radius: 50%;
                border: 1px solid #000; 
                color: #000;
                background-color: #fff;
                display: flex;
                justify-content: center;
                align-items: center;
                &.current{
                    border: 1px solid transparent;
                    background-color: var(--bg-color-red);
                    color: #fff;
                }
            }
        }
    }
}
@media (max-width: 768px) {
  .shop-container {
    flex-direction: column;
  }

  .shop-sidebar {
    width: 100%;
    position: static;
    order: 2;
  }

  .shop-main {
    order: 1;
  }
}
