/* FERFAT - enhancements (no rompe funcionalidad) */

:root{
  --ferfat-shadow: 0 .5rem 1.2rem rgba(0,0,0,.08);
  --ferfat-shadow-hover: 0 .75rem 1.5rem rgba(0,0,0,.12);
  --ferfat-radius: 14px;
}

body{
  background: #f6f7f9;
}

.navbar{
  backdrop-filter: saturate(150%) blur(6px);
}

.ferfat-hero{
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--ferfat-radius);
  box-shadow: var(--ferfat-shadow);
}

.ferfat-card{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--ferfat-radius);
  box-shadow: var(--ferfat-shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  background: #fff;
}

.ferfat-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--ferfat-shadow-hover);
}

.ferfat-imgbox{
  height: 220px;
  padding: 10px;
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.ferfat-imgbox img{
  max-height: 200px;
  width: 100%;
  object-fit: contain;
}

.ferfat-badge{
  border-radius: 999px;
  padding: .35rem .6rem;
}

.ferfat-btn{
  border-radius: 12px;
}

/* ===== PROMOS estilo retail (OPCIÓN 2) ===== */
.ferfat-carousel{
  border-radius: var(--ferfat-radius);
  overflow: hidden;
  box-shadow: var(--ferfat-shadow);
  border: 1px solid rgba(0,0,0,.08);
  background: #f3f4f6;
}

.ferfat-carousel .carousel-item{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

/* Card del flyer centrada */
.ferfat-carousel img{
  height: 420px;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 .5rem 1.2rem rgba(0,0,0,.15);
}

@media (max-width: 576px){
  .ferfat-carousel img{
    height: 300px;
    max-width: 96%;
  }
  .ferfat-imgbox{ height: 200px; }
}

/* ===== HERO Y FILTROS FERFAT - VERSION ESTABLE ===== */

.ferfat-hero{
  background:#fff;
  border-radius:18px;
  padding:24px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.ferfat-filter-bar{
  display:grid;
  grid-template-columns: 2fr 1.4fr .7fr auto;
  gap:12px;
  align-items:end;
}

.filter-field label{
  display:block;
  font-size:.85rem;
  font-weight:600;
  color:#495057;
  margin-bottom:5px;
}

.filter-field .form-control,
.filter-field .form-select{
  height:46px;
  border-radius:10px;
}

.filter-actions{
  display:flex;
  gap:8px;
  align-items:end;
}

.filter-actions .btn{
  height:46px;
  border-radius:10px;
  font-weight:600;
  white-space:nowrap;
}

.filter-stock{
  grid-column:1 / -1;
  padding-top:2px;
}

.ferfat-category-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.category-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid #d8dde3;
  background:#fff;
  color:#343a40;
  text-decoration:none;
  font-size:.9rem;
  font-weight:600;
  transition:none !important;
}

.category-pill:hover{
  background:#f1f4f8;
  color:#0d6efd;
  border-color:#b9c6d6;
}

.category-pill.active{
  background:#0d6efd;
  border-color:#0d6efd;
  color:#fff;
}

/* Evitar titileo */
.card,
.card:hover,
.card img,
.carousel-item,
.carousel-item img{
  transform:none !important;
  animation:none !important;
}

@media(max-width:992px){
  .ferfat-filter-bar{
    grid-template-columns:1fr 1fr;
  }

  .filter-actions{
    grid-column:1 / -1;
  }
}

@media(max-width:576px){
  .ferfat-hero{
    padding:18px;
  }

  .ferfat-filter-bar{
    grid-template-columns:1fr;
  }

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

  .filter-actions .btn{
    width:100%;
  }
}

/* ===== FERFAT TOPBAR + NAV LOGO ===== */

.ferfat-topbar{
  background:#0d6efd;
  color:#fff;
  font-size:.88rem;
  padding:7px 0;
  position:relative;
  z-index:1040;
}

.ferfat-topbar a{
  color:#fff;
  font-weight:700;
  text-decoration:none;
}

.ferfat-topbar a:hover{
  text-decoration:underline;
}

.ferfat-mainnav{
  top:0;
  z-index:1030;
}

.ferfat-nav-logo{
  height:62px;
  width:auto;
  max-width:180px;
  object-fit:contain;
}

@media(max-width:768px){
  .ferfat-topbar{
    font-size:.78rem;
    text-align:center;
  }

  .ferfat-nav-logo{
    height:50px;
    max-width:150px;
  }
}
