/**
 * Dealspouch-Style Deals Engine Styles
 * Version: 1.0.2
 */

:root {
  --wb-primary: #1e3a8a;
  --wb-accent-orange: #ff9900;
  --wb-accent-orange-hover: #e68a00;
  --wb-accent-blue: #2563eb;
  --wb-accent-green: #059669;
  --wb-red: #dc2626;
  --wb-border: #e2e8f0;
  --wb-border-dark: #cbd5e1;
  --wb-bg-card: #ffffff;
  --wb-text-dark: #0f172a;
  --wb-text-muted: #64748b;
  --wb-text-light: #94a3b8;
  --wb-radius: 10px;
}

.wb-deals-wrapper {
  margin: 20px 0 40px 0;
  width: 100%;
}

/* Category Filter Bar (Dealspouch Style) */
.wb-category-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.wb-category-bar::-webkit-scrollbar { display: none; }
.wb-cat-btn {
  padding: 6px 14px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid var(--wb-border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wb-cat-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.wb-cat-btn.active {
  background: #eff6ff;
  color: var(--wb-primary);
  border-color: #bfdbfe;
  font-weight: 700;
}

/* Dense 3-4 Column Grid */
.wb-grid-dense {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

/* Compact Deal Card (Dealspouch Clone) */
.wb-deal-card-compact {
  background: var(--wb-bg-card);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.wb-deal-card-compact:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -3px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}
.wb-deal-card-compact.wb-expired {
  opacity: 0.65;
  filter: grayscale(0.4);
}

/* Badges */
.wb-card-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.wb-disc-badge {
  background: var(--wb-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}
.wb-store-tag {
  font-size: 10px;
  font-weight: 700;
  color: #9a3412;
  background: #ffedd5;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Image Wrap */
.wb-img-wrap {
  width: 100%;
  height: 165px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.wb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.wb-deal-card-compact:hover .wb-img-wrap img {
  transform: scale(1.06);
}
.wb-prime-chip {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: #ffffff;
  border: 1px solid var(--wb-border);
  font-size: 9.5px;
  font-weight: 800;
  color: #0284c7;
  padding: 1px 6px;
  border-radius: 3px;
}

/* Product Info */
.wb-cat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--wb-text-light);
  margin-bottom: 4px;
  letter-spacing: 0.4px;
}
.wb-prod-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.wb-prod-title a {
  text-decoration: none;
  color: var(--wb-text-dark);
}
.wb-prod-title a:hover {
  color: var(--wb-accent-blue);
}

/* Rating */
.wb-rating-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  margin-bottom: 10px;
}
.wb-star { color: #f59e0b; font-size: 12px; }
.wb-score { font-weight: 700; color: #1e293b; }
.wb-revs { color: var(--wb-text-light); font-size: 10.5px; }

/* Pricing */
.wb-pricing-block {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--wb-border);
  margin-bottom: 10px;
}
.wb-pricing-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.wb-deal-price {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}
.wb-mrp-price {
  font-size: 12px;
  color: var(--wb-text-light);
  text-decoration: line-through;
}
.wb-savings-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #15803d;
  margin-top: 1px;
}

/* Coupon */
.wb-coupon-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0fdf4;
  border: 1px dashed #86efac;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* CTA */
.wb-btn-amazon-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--wb-accent-orange);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  transition: all 0.15s ease;
}
.wb-btn-amazon-cta:hover {
  background: var(--wb-accent-orange-hover);
  box-shadow: 0 2px 8px rgba(255,153,0,0.4);
  color: #111827;
}
.wb-btn-expired {
  width: 100%;
  padding: 10px;
  background: #e2e8f0;
  color: #64748b;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: not-allowed;
}

/* Meta Footer */
.wb-meta-strip {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--wb-text-light);
  margin-top: 6px;
}
.wb-status-live { color: #059669; font-weight: 700; }
.wb-status-expired { color: #dc2626; font-weight: 700; }

@media (max-width: 640px) {
  .wb-grid-dense {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
