/* ─────────────────────────────────────────────────────────────────────────
   FBT Widget — Frequently Bought Together
   WebPilot Tienda · Diana · 02/03/2026
   Dark-theme adapted to match WebPilot Tienda (--bg0:#0B1120, --brand:#00D4FF)
   ───────────────────────────────────────────────────────────────────────── */

/* ─── SECTION WRAPPER ─── */
#fbt-container {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 24px 56px;
}

.fbt-section {
  /* inherits full width from container */
}

/* ─── TITLE ─── */
.fbt-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.93);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ─── CARDS WRAPPER ─── */
.fbt-cards-wrapper {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 16px;
}

/* ─── SINGLE CARD ─── */
.fbt-card {
  flex: 1;
  min-width: 0;
  max-width: calc(33.33% - 11px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.fbt-card:hover {
  border-color: rgba(0, 212, 255, 0.40);
  transform: translateY(-2px);
}

/* ─── IMAGE ─── */
.fbt-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.06);
  display: block;
}

/* ─── ICON PLACEHOLDER (cuando no hay imagen real) ─── */
.fbt-card-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.07);
  border: 1px solid rgba(0, 212, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
}

/* ─── CARD BODY ─── */
.fbt-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.fbt-card-name {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.93);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin: 0;
}

.fbt-card-price {
  font-size: 15px;
  font-weight: 700;
  color: #00D4FF;
  margin: 0;
}

.fbt-card-btn {
  width: 100%;
  background: #00D4FF;
  color: #0B1120;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: auto;
  font-family: inherit;
  line-height: 1;
}

.fbt-card-btn:hover {
  background: #00A8CC;
  transform: translateY(-1px);
}

.fbt-card-btn.in-cart {
  background: rgba(0, 212, 255, 0.15);
  color: #00D4FF;
  border: 1.5px solid rgba(0, 212, 255, 0.4);
}

.fbt-card-btn.in-cart:hover {
  background: rgba(0, 212, 255, 0.25);
}

/* ─── TOTAL BAR ─── */
.fbt-total {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.fbt-total > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  margin-right: auto;
}

.fbt-total-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #00D4FF;
}

.fbt-add-all {
  background: #00D4FF;
  color: #0B1120;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
  white-space: nowrap;
}

.fbt-add-all:hover {
  background: #00A8CC;
  transform: translateY(-1px);
}

/* ─── SKELETON LOADING ─── */
@keyframes fbt-shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}

.fbt-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 1600px 100%;
  animation: fbt-shimmer 1.6s infinite linear;
}

.fbt-skeleton-card {
  flex: 1;
  min-width: 0;
  max-width: calc(33.33% - 11px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fbt-skel-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}

.fbt-skel-line {
  border-radius: 4px;
  height: 14px;
}

.fbt-skel-line.wide   { width: 80%; }
.fbt-skel-line.medium { width: 60%; }
.fbt-skel-line.short  { width: 45%; height: 18px; }
.fbt-skel-line.btn    { width: 100%; height: 36px; border-radius: 8px; margin-top: 4px; }

/* ─── DIVIDER LABEL ─── */
.fbt-section-divider {
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  #fbt-container {
    padding: 0 16px 40px;
    margin-top: 32px;
  }

  .fbt-cards-wrapper {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.30) transparent;
    padding-bottom: 8px;
    /* fade hint at right edge */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }

  .fbt-card,
  .fbt-skeleton-card {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: 200px;
  }

  .fbt-total {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .fbt-total > span {
    margin-right: 0;
  }

  .fbt-add-all {
    width: 100%;
    text-align: center;
  }
}
