@import url("main.css");


/*--------------------------------------------------------------
# Catalog Layout
--------------------------------------------------------------*/
.catalog {
  padding: 60px 0;
  min-height: 70vh; /* Previene saltos bruscos cuando hay pocos/cero productos */
  overflow: visible !important; /* Fix crucial para que position: sticky funcione */
}

.section-bg {
  background-color: #f8f9fa;
}

/*--------------------------------------------------------------
# Filters Sidebar
--------------------------------------------------------------*/
@media (min-width: 768px) {
  .catalog-sidebar {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 120px;
    align-self: flex-start;
    height: auto;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  
  /* Esconder la barra de desplazamiento para un look más limpio */
  .catalog-sidebar::-webkit-scrollbar {
    width: 6px;
  }
  .catalog-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(13, 76, 146, 0.2);
    border-radius: 10px;
  }
}
.filter-box {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.filter-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 25px;
  border-bottom: 2px solid #f1f3f5;
  padding-bottom: 10px;
}

.filter-group {
  margin-bottom: 25px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 15px;
}

.filter-options .form-check {
  margin-bottom: 8px;
}

.filter-options .form-check-label {
  font-size: 0.9rem;
  color: #495057;
  cursor: pointer;
  transition: color 0.3s ease;
}

.filter-options .form-check-input:checked ~ .form-check-label {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-options .form-check-input {
  cursor: pointer;
}

/*--------------------------------------------------------------
# Product Cards
--------------------------------------------------------------*/
.product-card {
  text-align: center;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0px 5px 25px rgba(13, 76, 146, 0.08);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 15px 35px rgba(13, 76, 146, 0.12);
}

.product-img-wrapper {
  position: relative;
  padding-top: 100%; /* Ratio 1:1 */
  overflow: hidden;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.4s ease;
}

.glightbox-product {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 76, 146, 0.5); /* Bolplan primary color with opacity */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.zoom-overlay i {
  color: #fff;
  font-size: 2.5rem;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .zoom-overlay {
  opacity: 1;
}

.product-card:hover .zoom-overlay i {
  transform: scale(1);
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.08);
}

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-brand-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
}

.product-brand {
  font-size: 0.75rem;
  color: #868e96;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-linea {
  font-size: 0.7rem;
  color: var(--color-primary);
  background-color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 15px;
  line-height: 1.4;
}

.product-meta {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 0;
  margin-top: auto;
}

/*--------------------------------------------------------------
# Animations
--------------------------------------------------------------*/
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-item-anim {
  animation: fadeIn 0.5s ease forwards;
}

/* Stagger anim delays */
.product-item-anim:nth-child(1) { animation-delay: 0.05s; }
.product-item-anim:nth-child(2) { animation-delay: 0.1s; }
.product-item-anim:nth-child(3) { animation-delay: 0.15s; }
.product-item-anim:nth-child(4) { animation-delay: 0.2s; }
.product-item-anim:nth-child(5) { animation-delay: 0.25s; }
.product-item-anim:nth-child(6) { animation-delay: 0.3s; }

/*--------------------------------------------------------------
# Mobile Filters Offcanvas
--------------------------------------------------------------*/
.mobile-filter-btn-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1040; /* Just below Bootstrap modals (1050) */
}

.btn-mobile-filter {
  border-radius: 50px;
  padding: 10px 30px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  letter-spacing: 0.5px;
}

@media (max-width: 767.98px) {
  /* On mobile, remove the box-shadow and padding from the internal filter-box since the offcanvas body handles it */
  .filter-box {
    box-shadow: none !important;
    padding: 20px !important;
    border-radius: 0;
  }
}
