/* ============================================
   SAFANDY PRODUCT BUNDLES — Single Product Page
   ============================================ */

.sfb-section {
  padding: 40px 0;
  margin: 0;
  direction: rtl;
}

.sfb-section *,
.sfb-section *::before,
.sfb-section *::after {
  box-sizing: border-box;
}

/* Header */
.sfb-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 16px;
}

.sfb-title {
  font-family: 'Cairo', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #242424 !important;
  margin: 0 0 4px;
  line-height: 1.4;
}

.sfb-subtitle {
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: #999;
  margin: 0;
  font-weight: 500;
}

/* Grid */
.sfb-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px;
}

/* Card */
.sfb-card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1.5px solid #f0f0f0;
  padding: 20px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sfb-card:hover {
  border-color: rgba(246, 83, 0, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Featured card (full bundle) */
.sfb-card-featured {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1a10 60%, #1a1a1a 100%);
  border-color: transparent;
}

.sfb-card-featured:hover {
  border-color: rgba(246, 83, 0, 0.3);
  box-shadow: 0 4px 24px rgba(246, 83, 0, 0.15);
}

/* Force white text inside featured card */
.sfb-card-featured .sfb-card-name,
.sfb-card-featured .sfb-card-name a,
.sfb-card-featured .sfb-card-desc,
.sfb-card-featured .sfb-card-price,
.sfb-card-featured .sfb-card-price .woocommerce-Price-amount,
.sfb-card-featured .sfb-card-price .woocommerce-Price-currencySymbol {
  color: #FFFFFF !important;
}

.sfb-card-featured .sfb-card-desc {
  color: rgba(255, 255, 255, 0.55) !important;
}

.sfb-card-featured .sfb-card-price-old,
.sfb-card-featured .sfb-card-price-old .woocommerce-Price-amount,
.sfb-card-featured .sfb-card-price-old .woocommerce-Price-currencySymbol {
  color: rgba(255, 255, 255, 0.35) !important;
}

.sfb-card-featured .sfb-thumb {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.sfb-card-featured .sfb-thumb-current {
  border-color: #F65300;
}

/* Ribbon (best value) */
.sfb-card-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #F65300;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  z-index: 2;
}

/* Discount badge */
.sfb-card-discount {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #82B735;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  z-index: 2;
}

.sfb-card-featured .sfb-card-discount {
  background: #82B735;
}

/* Thumbnails row */
.sfb-card-thumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 4px;
}

.sfb-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  border: 2px solid #f0f0f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAFAFA;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.sfb-thumb img {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

/* Highlight current product in the bundle */
.sfb-thumb-current {
  border-color: #F65300;
  box-shadow: 0 0 0 2px rgba(246, 83, 0, 0.15);
}

/* Card body */
.sfb-card-body {
  margin-bottom: 14px;
}

.sfb-card-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #242424;
  margin: 0 0 4px;
  line-height: 1.5;
}

.sfb-card-name a {
  color: inherit !important;
  text-decoration: none;
}

.sfb-card-name a:hover {
  color: #F65300 !important;
}

.sfb-card-featured .sfb-card-name a:hover {
  color: #FF7A33 !important;
}

.sfb-card-desc {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer (price + CTA) */
.sfb-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sfb-card-pricing {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.sfb-card-price {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #F65300;
  line-height: 1;
}

.sfb-card-price .woocommerce-Price-amount,
.sfb-card-price .woocommerce-Price-currencySymbol {
  color: #F65300 !important;
}

.sfb-card-price-old {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: line-through;
}

.sfb-card-price-old,
.sfb-card-price-old .woocommerce-Price-amount,
.sfb-card-price-old .woocommerce-Price-currencySymbol {
  color: #bbb !important;
}

/* CTA Button */
.sfb-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F65300 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 20px !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1 !important;
  flex-shrink: 0;
}

.sfb-btn:hover {
  background: #FF7A33 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(246, 83, 0, 0.3);
}

.sfb-btn:active {
  transform: scale(0.97);
  box-shadow: none;
}

/* Featured card button — outlined style for contrast */
.sfb-card-featured .sfb-btn {
  background: #F65300 !important;
}

/* Hide WooCommerce "View cart" link */
.sfb-section .added_to_cart {
  display: none !important;
}

/* ===== RESPONSIVE ===== */

/* Tablet+ : side by side cards */
@media (min-width: 768px) {
  .sfb-grid {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .sfb-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 280px;
  }

  .sfb-card-featured {
    flex: 1 1 100%;
  }
}

/* Desktop: constrain width */
@media (min-width: 1024px) {
  .sfb-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 20px;
  }

  .sfb-card {
    flex: 1 1 calc(33.33% - 12px);
    min-width: 240px;
  }

  .sfb-card-featured {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
  }

  .sfb-card-featured .sfb-card-thumbs {
    margin-bottom: 0;
    flex-direction: column;
  }

  .sfb-card-featured .sfb-card-body {
    flex: 1;
    margin-bottom: 0;
  }

  .sfb-card-featured .sfb-card-footer {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
}

/* ===== VISIBILITY — override any Elementor/Woodmart hiding ===== */
.sfb-section,
.sfb-section *,
.sfb-card,
.sfb-grid,
.sfb-header {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
