/* ============================================
   BannerFlex Rollover – PrestaShop 8
   ============================================ */

.bf-section {
  margin: 20 0 30px;
}

.bf-grid {
  display: flex;
  gap: 16px;
}

/* Each card fills equal share */
.bf-card {
  position: relative;
  flex: 1 1 0;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  background: #111;
  min-height: 120px;
}

/* 1 banner: cap height so it doesn't look huge */
.bf-section[data-count="1"] .bf-card { max-height: 340px; }
.bf-section[data-count="2"] .bf-card { /* natural ratio */ }
.bf-section[data-count="3"] .bf-card { /* natural ratio */ }
.bf-section[data-count="4"] .bf-card { /* natural ratio */ }
.bf-section[data-count="5"] .bf-card { /* natural ratio */ }

.bf-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.45s ease;
}

/* Overlay hidden by default */
.bf-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 20px;
  box-sizing: border-box;
}

.bf-overlay-inner {
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 400px;
}

/* Hover */
.bf-card:hover .bf-img {
  transform: scale(1.04);
  opacity: 0.6;
}
.bf-card:hover .bf-overlay       { opacity: 1; }
.bf-card:hover .bf-overlay-inner { transform: translateY(0); }

/* Typography — scales down for more banners */
.bf-title {
  font-family: 'Georgia', serif;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.bf-section[data-count="1"] .bf-title { font-size: 1.8rem; }
.bf-section[data-count="2"] .bf-title { font-size: 1.5rem; }
.bf-section[data-count="3"] .bf-title { font-size: 1.2rem; }
.bf-section[data-count="4"] .bf-title { font-size: 1.0rem; }
.bf-section[data-count="5"] .bf-title { font-size: 0.9rem; }

.bf-text {
  color: rgba(255,255,255,0.88);
  line-height: 1.5;
  margin: 0 0 12px;
}

.bf-section[data-count="1"] .bf-text { font-size: 1.0rem; }
.bf-section[data-count="2"] .bf-text { font-size: 0.9rem; }
.bf-section[data-count="3"] .bf-text { font-size: 0.82rem; }
.bf-section[data-count="4"] .bf-text { font-size: 0.78rem; }
.bf-section[data-count="5"] .bf-text { font-size: 0.74rem; }

.bf-btn {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-bottom: 2px solid rgba(255,255,255,0.6);
  padding-bottom: 2px;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.bf-card:hover .bf-btn { border-color: #fff; }

/* Responsive */
@media (max-width: 768px) {
  .bf-grid { flex-wrap: wrap; }
  /* 1-2: full width; 3+: 2 per row */
  .bf-section[data-count="1"] .bf-card,
  .bf-section[data-count="2"] .bf-card { flex: 1 1 100%; }
  .bf-section[data-count="3"] .bf-card,
  .bf-section[data-count="4"] .bf-card,
  .bf-section[data-count="5"] .bf-card { flex: 1 1 calc(50% - 8px); }
}

@media (max-width: 480px) {
  .bf-grid { flex-direction: column; }
  .bf-card  { flex: 1 1 100% !important; }
}
