/**
 * Deals Board Styles
 *
 * Layered on top of plugins.css.
 *
 * @package WPFolks
 */

body.page-template-page-deals .plugins-hero,
body.single-wpfolks_deal      .plugins-hero {
  padding: 56px 0;
}
body.page-template-page-deals .plugins-hero-top,
body.single-wpfolks_deal      .plugins-hero-top {
  margin-bottom: 0;
}

/* Card */
.deal-card-v2 { gap: 12px; }
.deal-card-v2 .psc-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}
.deal-card-v2 .psc-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

/* Discount tag — sits in the icon slot of the plugin card.
   Uses the brand blue gradient (the old coral/orange tones didn't match
   anywhere else on the site). Inner hairline keeps it legible on light
   and dark card backgrounds, and a shine sweep runs when the parent
   card is hovered so the badge feels "live" without constant motion. */
.deal-discount-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 12px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
  color: #fff;
  border-radius: 12px;
  font-weight: 800;
  font-size: 17px;
  text-align: center;
  line-height: 1.05;
  flex-shrink: 0;
  letter-spacing: -0.3px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.28),
    0 4px 12px rgba(33, 69, 230, 0.25);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

/* Shine sweep — absolutely positioned stripe that slides left→right. */
.deal-discount-tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
}

.card:hover .deal-discount-tag {
  transform: translateY(-1px) scale(1.04);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.4),
    0 8px 20px rgba(33, 69, 230, 0.35);
}

.card:hover .deal-discount-tag::after {
  animation: deal-discount-shine 0.9s ease-out;
}

@keyframes deal-discount-shine {
  from { left: -100%; }
  to   { left: 160%; }
}

/* Respect users who opt out of motion. */
@media (prefers-reduced-motion: reduce) {
  .deal-discount-tag,
  .card:hover .deal-discount-tag {
    transform: none;
    transition: none;
  }
  .card:hover .deal-discount-tag::after {
    animation: none;
  }
}

/* Deal of the Week banner — sits above the grid, uses the brand gradient
   with an inner hairline so it reads as a distinct "hero" strip without
   relying on an off-palette accent. */
.deal-of-the-week {
  position: relative;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
  color: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.18),
    0 6px 20px rgba(33, 69, 230, 0.25);
}

.deal-of-the-week::after {
  content: '';
  position: absolute;
  top: 0;
  left: -30%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-20deg);
  animation: dotw-shine 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes dotw-shine {
  0%, 70% { left: -30%; }
  100%    { left: 130%; }
}

.dotw-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}

.dotw-title {
  margin: 0 0 4px;
  font-size: 22px;
  color: #fff;
}

.dotw-title a {
  color: #fff;
  text-decoration: none;
}

.dotw-meta {
  font-size: 14px;
  opacity: 0.92;
}

.dotw-meta code {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.dotw-cta {
  background: #fff;
  color: var(--brand-primary);
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.dotw-cta:hover {
  color: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .deal-of-the-week::after { animation: none; }
  .dotw-cta, .dotw-cta:hover { transform: none; transition: none; }
}

.deal-meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.deal-expires-soon { color: #d63638; font-weight: 600; }
.deal-expired      { opacity: 0.6; }

.deal-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
}
.deal-badge--featured { background: rgba(33,69,230,0.10); color: #2145e6; }
.deal-badge--verified { background: rgba(0,163,42,0.12);  color: #00832a; }
.deal-badge--dotw     { background: linear-gradient(135deg, #ff5e62, #ff9966); color: #fff; }
.deal-badge--expired  { background: rgba(214,54,56,0.10); color: #d63638; }

/* === Detail page === */
.deal-detail-hero { background: var(--color-dark); color: var(--color-white); padding: 40px 0; }
.deal-detail-hero .container { max-width: 900px; }
.deal-detail-hero h1 { font-size: 32px; margin: 8px 0 12px; line-height: 1.2; }
.deal-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}
.deal-detail-meta .pill {
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
}

.deal-detail-body { max-width: 900px; margin: 0 auto; padding: 32px 24px 80px; }
.deal-description { font-size: 16px; line-height: 1.7; color: var(--color-text); margin-bottom: 24px; }

.deal-action {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255,94,98,0.06), rgba(255,153,102,0.06));
  border: 1px solid rgba(255,94,98,0.18);
  border-radius: 12px;
  margin-bottom: 24px;
}
.deal-coupon-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.deal-coupon-code {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--color-white);
  border: 1px dashed var(--color-border);
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text);
}
.deal-coupon-code.copied { background: rgba(0,163,42,0.12); border-style: solid; }

.deal-detail-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
  font-size: 14px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}
