/**
 * Flaash Bundles CSS
 * Design aligned with Flaash theme (dark bg, editorial feel, Degular/Inter typography).
 */

/* ==========================================================================
   Section container
   ========================================================================== */

.flaash-bundles {
  padding: 48px 0;
  background: #0e0e0e;
}

.flaash-bundles--product {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.flaash-bundles--cart {
  margin-top: 24px;
  padding: 32px 0;
  background: #141414;
  border-radius: 8px;
}

.flaash-bundles__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flaash-bundles__intro {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin: -12px 0 32px;
}

.flaash-bundles__empty {
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 48px 0;
  font-size: 1.1rem;
}

/* ==========================================================================
   Grid
   ========================================================================== */

.flaash-bundles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.flaash-bundles__grid--listing {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

/* ==========================================================================
   Bundle card
   ========================================================================== */

.flaash-bundle-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.flaash-bundle-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.flaash-bundle-card--oos {
  opacity: 0.5;
  pointer-events: none;
}

.flaash-bundle-card--compact {
  padding: 16px 20px;
}

.flaash-bundle-card__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0 0 16px;
  border-radius: 6px;
  background: #111;
}

/* --- Header --- */

.flaash-bundle-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.flaash-bundle-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.flaash-bundle-card__badge {
  flex-shrink: 0;
  background: #e63946;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.flaash-bundle-card__desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* --- Product list --- */

.flaash-bundle-card__products {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  flex: 1;
}

.flaash-bundle-card__products--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flaash-bundle-card__product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.flaash-bundle-card__products--inline .flaash-bundle-card__product {
  padding: 4px 0;
  border-bottom: none;
}

.flaash-bundle-card__product:last-child {
  border-bottom: none;
}

.flaash-bundle-card__product-img {
  border-radius: 4px;
  object-fit: cover;
  background: #111;
  flex-shrink: 0;
}

.flaash-bundle-card__product-info {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.flaash-bundle-card__product-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-decoration: none;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.flaash-bundle-card__product-name:hover {
  color: #fff;
  text-decoration: underline;
}

.flaash-bundle-card__product-qty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.flaash-bundle-card__product-attr {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  line-height: 1.25;
}

.flaash-bundle-card__product-price {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* --- Footer / pricing --- */

.flaash-bundle-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.flaash-bundle-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.flaash-bundle-card__old-price {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.95rem;
  text-decoration: line-through;
}

.flaash-bundle-card__price {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.flaash-bundle-card__btn {
  /* Uses Flaash button-primary base */
  flex-shrink: 0;
  font-size: 0.9rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.flaash-bundle-card__btn:active {
  transform: scale(0.97);
}

.flaash-bundle-card__btn.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.flaash-bundle-card__btn.is-success {
  background: #25b09b !important;
  border-color: #25b09b !important;
}

.flaash-bundle-card__oos {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-style: italic;
}

/* ==========================================================================
   Toast notification
   ========================================================================== */

.flaash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  max-width: 380px;
}

.flaash-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.flaash-toast--success {
  background: #1d1d1d;
  border-left: 4px solid #25b09b;
}

.flaash-toast--error {
  background: #1d1d1d;
  border-left: 4px solid #e63946;
}

.flaash-toast--info {
  background: #1d1d1d;
  border-left: 4px solid #25b9d7;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .flaash-bundles {
    padding: 32px 0;
  }

  .flaash-bundles__grid {
    grid-template-columns: 1fr;
  }

  .flaash-bundles__grid--listing {
    grid-template-columns: 1fr;
  }

  .flaash-bundle-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .flaash-bundle-card__btn {
    text-align: center;
  }

  .flaash-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
