/*
 * Renik Black Friday — storefront layer.
 *
 * One idea carries the look: the countdown is a commercial-kitchen timer (red LED digits in
 * steel-edged cells on true black). Everything else stays quiet. Corners are square to match
 * the store theme; the accent follows the theme's primary color unless one is set in the panel.
 * The same timer sits in the top bar, in the sticky order ticket and in the page strips, so
 * every page carries the campaign.
 * The typeface is the store's own.
 */
:root {
  --rcs-bf-black: #000;
  --rcs-bf-cell: #15171a;
  --rcs-bf-edge: #30343a;
  --rcs-bf-steel: #c9cdd2;
  --rcs-bf-steel-dim: #8d939b;
  --rcs-bf-accent: var(--wd-primary-color, #b31b1f);
  --rcs-bf-led: #ff4a3d;
}

/* ---------- Countdown ---------- */
.rcs-bf-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  direction: rtl;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rcs-bf-timer[hidden] { display: none; }
.rcs-bf-timer__lead {
  margin-inline-end: 5px;
  color: var(--rcs-bf-steel);
  font-size: .86em;
  white-space: nowrap;
}
.rcs-bf-timer__lead:empty { display: none; }
.rcs-bf-timer__cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.9em;
  padding: 5px 6px 4px;
  background: var(--rcs-bf-cell);
  border: 1px solid var(--rcs-bf-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
.rcs-bf-timer__cell b {
  color: var(--rcs-bf-led);
  font-size: 1.3em;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 0 9px rgba(255, 74, 61, .5);
  animation: rcs-bf-ignite .5s ease-out both;
}
.rcs-bf-timer__cell:nth-child(3) b { animation-delay: .08s; }
.rcs-bf-timer__cell:nth-child(4) b { animation-delay: .16s; }
.rcs-bf-timer__cell:nth-child(5) b { animation-delay: .24s; }
.rcs-bf-timer__cell i {
  margin-top: 3px;
  color: var(--rcs-bf-steel-dim);
  font-size: .66em;
  font-style: normal;
  line-height: 1.2;
}
@keyframes rcs-bf-ignite {
  from { opacity: .2; text-shadow: none; }
  to { opacity: 1; }
}

/* ---------- Top bar ---------- */
.rcs-bf-bar {
  position: relative;
  z-index: 5;
  background: var(--rcs-bf-black);
  border-bottom: 1px solid var(--rcs-bf-edge);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}
.rcs-bf-bar__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  max-width: 1222px;
  margin: 0 auto;
  padding: 8px 15px;
}
.rcs-bf-bar__msg {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.rcs-bf-bar a.rcs-bf-bar__cta {
  padding: 5px 14px;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.rcs-bf-bar a.rcs-bf-bar__cta:hover,
.rcs-bf-bar a.rcs-bf-bar__cta:focus-visible {
  background: #fff;
  color: #000;
}
.rcs-bf-bar a.rcs-bf-bar__cta:focus-visible,
.rcs-bf-hero a.rcs-bf-hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Percent chip beside a price ---------- */
.rcs-bf-chip {
  display: inline-block;
  margin-inline-start: .45em;
  padding: .14em .5em .1em .66em;
  background: var(--rcs-bf-accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, .36em 50%);
  color: #fff;
  font-size: .76em;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}
.rcs-bf-deal .onsale,
.rcs-bf-deal .product-label.onsale {
  background: var(--rcs-bf-black);
  color: #fff;
}

/* ---------- Product page deal box ---------- */
.rcs-bf-deal-box {
  display: grid;
  gap: 11px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: var(--rcs-bf-black);
  border-inline-start: 4px solid var(--rcs-bf-accent);
  color: #fff;
}
.rcs-bf-deal-box__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
}
.rcs-bf-deal-box__label {
  font-size: 1.05em;
  font-weight: 800;
}
.rcs-bf-deal-box__save { color: var(--rcs-bf-steel); }
.rcs-bf-deal-box .woocommerce-Price-amount {
  color: #fff;
  font-weight: 700;
}
.rcs-bf-stock__track,
.rcs-bf-tier__track {
  height: 7px;
  background: #2a2d31;
}
.rcs-bf-stock__track span,
.rcs-bf-tier__track span {
  display: block;
  height: 100%;
  background: var(--rcs-bf-led);
  transition: width .4s ease;
}
.rcs-bf-deal-box p.rcs-bf-stock__text,
.rcs-bf-deal-box p.rcs-bf-deal-box__note {
  margin: 6px 0 0;
  color: var(--rcs-bf-steel);
  font-size: .86em;
}

/* ---------- Cart ---------- */
.rcs-bf-tier {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--rcs-bf-black);
  color: #fff;
}
.rcs-bf-tier p.rcs-bf-tier__msg {
  margin: 0 0 10px;
  color: #fff;
  font-weight: 700;
}
.rcs-bf-tier .woocommerce-Price-amount { color: #fff; }
.rcs-bf-tier ol.rcs-bf-tier__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 10px 0 0;
  padding: 0;
  color: var(--rcs-bf-steel-dim);
  font-size: .85em;
  list-style: none;
}
.rcs-bf-tier__steps li { margin: 0; }
.rcs-bf-tier__steps li .woocommerce-Price-amount { color: inherit; }
.rcs-bf-tier__steps li.is-reached { color: #fff; }
.rcs-bf-tier__steps b { color: var(--rcs-bf-led); }
.rcs-bf-tier p.rcs-bf-tier__note {
  margin: 8px 0 0;
  color: var(--rcs-bf-steel-dim);
  font-size: .78em;
}
tr.rcs-bf-savings th,
tr.rcs-bf-savings td,
tr.rcs-bf-savings td .woocommerce-Price-amount {
  color: var(--rcs-bf-accent);
  font-weight: 700;
}
.rcs-bf td.product-price ins { text-decoration: none; }
.rcs-bf td.product-price del { opacity: .6; }

/* ---------- Hero ---------- */
.rcs-bf-hero {
  margin: 0 0 28px;
  background: var(--rcs-bf-black);
  border-bottom: 3px solid var(--rcs-bf-accent);
  color: #fff;
}
.rcs-bf-hero__in {
  display: grid;
  gap: 18px;
  justify-items: start;
  max-width: 1222px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(18px, 5vw, 56px);
}
.rcs-bf-hero h2.rcs-bf-hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 7vw, 4.6rem);
  font-weight: 900;
  line-height: 1.12;
}
.rcs-bf-hero p.rcs-bf-hero__text {
  max-width: 46ch;
  margin: 0;
  color: var(--rcs-bf-steel);
  font-size: 1.05rem;
  line-height: 1.8;
}
.rcs-bf-timer--hero { font-size: clamp(1.15rem, 3.4vw, 2rem); gap: 8px; }
.rcs-bf-timer--hero .rcs-bf-timer__cell { min-width: 3.1em; padding: .34em .4em .28em; }
.rcs-bf-timer--hero .rcs-bf-timer__cell i { font-size: .42em; }
.rcs-bf-timer--hero .rcs-bf-timer__lead { font-size: .55em; }
.rcs-bf-hero a.rcs-bf-hero__cta {
  display: inline-block;
  padding: 12px 26px;
  background: var(--rcs-bf-accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.rcs-bf-hero a.rcs-bf-hero__cta:hover { background: #fff; color: #000; }

/* ---------- Sticky order ticket (every page) ----------
 * A kitchen order ticket printing out of the bottom edge of the screen: perforated top,
 * campaign name, live countdown. It opens upward into the callback form.
 */
.rcs-bf-sticky {
  position: fixed;
  bottom: 0;
  z-index: 390;
  width: 204px;
  max-width: calc(100vw - 24px);
  color: #fff;
  filter: drop-shadow(0 -2px 10px rgba(0, 0, 0, .3));
  font-size: 14px;
  line-height: 1.5;
}
.rcs-bf-sticky--right { right: 18px; }
.rcs-bf-sticky--left { left: 18px; }
.rcs-bf-sticky.is-open { width: 296px; }
.rcs-bf-sticky .rcs-bf-sticky__tab,
.rcs-bf-sticky__panel {
  -webkit-mask: radial-gradient(circle at 50% 0, transparent 4px, #000 4.6px) top center / 12px 100% repeat-x;
  mask: radial-gradient(circle at 50% 0, transparent 4px, #000 4.6px) top center / 12px 100% repeat-x;
}
.rcs-bf-sticky .rcs-bf-sticky__tab {
  display: grid;
  gap: 6px;
  justify-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 16px 12px 10px;
  background: var(--rcs-bf-black);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  transition: transform .18s ease;
}
.rcs-bf-sticky .rcs-bf-sticky__tab:hover,
.rcs-bf-sticky .rcs-bf-sticky__tab:focus-visible {
  background: var(--rcs-bf-black);
  color: #fff;
  transform: translateY(-4px);
}
.rcs-bf-sticky .rcs-bf-sticky__tab:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.rcs-bf-sticky.is-open .rcs-bf-sticky__tab {
  -webkit-mask: none;
  mask: none;
  padding-top: 10px;
  border-top: 1px dashed var(--rcs-bf-edge);
  transform: none;
}
.rcs-bf-sticky__name { font-size: 15px; font-weight: 800; }
.rcs-bf-sticky__ask { color: var(--rcs-bf-steel); font-size: 13px; font-weight: 700; }
.rcs-bf-sticky__ask::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-end: 7px;
  background: var(--rcs-bf-led);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--rcs-bf-led);
  content: "";
  vertical-align: middle;
}
.rcs-bf-timer--mini { gap: 3px; font-size: 12px; }
.rcs-bf-timer--mini .rcs-bf-timer__cell { min-width: 2.5em; padding: 3px 3px 2px; }
.rcs-bf-sticky .rcs-bf-timer__lead { display: none; }

.rcs-bf-sticky__panel {
  position: relative;
  box-sizing: border-box;
  padding: 22px 14px 12px;
  background: var(--rcs-bf-black);
}
.rcs-bf-sticky__panel[hidden] { display: none; }
.rcs-bf-sticky .rcs-bf-sticky__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 6px;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--rcs-bf-steel);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.rcs-bf-sticky .rcs-bf-sticky__close:hover,
.rcs-bf-sticky .rcs-bf-sticky__close:focus-visible { background: none; color: #fff; }
.rcs-bf-sticky p.rcs-bf-sticky__title {
  margin: 0 0 4px;
  padding-inline-end: 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.rcs-bf-sticky p.rcs-bf-sticky__text {
  margin: 0 0 12px;
  color: var(--rcs-bf-steel);
  font-size: 13px;
  line-height: 1.8;
}
.rcs-bf-lead { display: grid; gap: 9px; margin: 0; }
.rcs-bf-lead label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--rcs-bf-steel);
  font-size: 12px;
  font-weight: 400;
}
.rcs-bf-sticky .rcs-bf-lead input[type="text"],
.rcs-bf-sticky .rcs-bf-lead input[type="tel"] {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 9px 10px;
  background: var(--rcs-bf-cell);
  border: 1px solid var(--rcs-bf-edge);
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
}
.rcs-bf-sticky .rcs-bf-lead input:focus {
  border-color: var(--rcs-bf-led);
  outline: 1px solid var(--rcs-bf-led);
}
.rcs-bf-sticky .rcs-bf-lead input.rcs-bf-lead__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.rcs-bf-sticky .rcs-bf-lead__send {
  width: 100%;
  min-height: 0;
  margin: 2px 0 0;
  padding: 11px 12px;
  background: var(--rcs-bf-accent);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.rcs-bf-sticky .rcs-bf-lead__send:hover,
.rcs-bf-sticky .rcs-bf-lead__send:focus-visible { background: #fff; color: #000; }
.rcs-bf-sticky .rcs-bf-lead__send[disabled] { opacity: .6; cursor: default; }
.rcs-bf-sticky p.rcs-bf-lead__msg { margin: 0; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.7; }
.rcs-bf-sticky p.rcs-bf-lead__msg:empty { display: none; }
.rcs-bf-sticky p.rcs-bf-lead__msg.is-error { color: #ff9a90; }
.rcs-bf-sticky p.rcs-bf-lead__note { margin: 0; color: var(--rcs-bf-steel-dim); font-size: 11px; line-height: 1.7; }
.rcs-bf-lead.is-done label,
.rcs-bf-lead.is-done .rcs-bf-lead__send,
.rcs-bf-lead.is-done .rcs-bf-lead__note { display: none; }
.rcs-bf-sticky a.rcs-bf-sticky__link {
  display: inline-block;
  margin-top: 10px;
  color: var(--rcs-bf-steel);
  font-size: 13px;
  text-decoration: underline;
}
.rcs-bf-sticky a.rcs-bf-sticky__link:hover { color: #fff; }

/* ---------- Campaign strip (category, checkout, account, empty cart, thank-you) ---------- */
.rcs-bf-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--rcs-bf-black);
  border-inline-start: 4px solid var(--rcs-bf-accent);
  color: #fff;
  line-height: 1.6;
}
.rcs-bf-strip__label { color: #fff; font-weight: 800; }
.rcs-bf-strip__text { flex: 1 1 220px; color: var(--rcs-bf-steel); }
.rcs-bf-strip .woocommerce-Price-amount,
.rcs-bf-mini .woocommerce-Price-amount { color: #fff; font-weight: 700; }
.rcs-bf-strip a.rcs-bf-strip__cta {
  padding: 4px 12px;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.rcs-bf-strip a.rcs-bf-strip__cta:hover,
.rcs-bf-strip a.rcs-bf-strip__cta:focus-visible { background: #fff; color: #000; }
.rcs-bf-mini {
  margin: 0 0 12px;
  padding: 9px 12px;
  background: var(--rcs-bf-black);
  border-inline-start: 3px solid var(--rcs-bf-accent);
  color: var(--rcs-bf-steel);
  font-size: .9em;
  line-height: 1.8;
}

/* ---------- Campaign name on the image of discounted products ---------- */
.rcs-bf-touch .rcs-bf-deal .product-element-top,
.rcs-bf-touch ul.products li.rcs-bf-deal > a.woocommerce-LoopProduct-link { position: relative; }
.rcs-bf-touch ul.products li.rcs-bf-deal > a.woocommerce-LoopProduct-link { display: block; }
.rcs-bf-touch .rcs-bf-deal .product-element-top::after,
.rcs-bf-touch ul.products li.rcs-bf-deal > a.woocommerce-LoopProduct-link::after,
.rcs-bf-touch div.product.rcs-bf-deal .woocommerce-product-gallery::after {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  z-index: 2;
  padding: 3px 10px 2px;
  background: var(--rcs-bf-black);
  border-top: 2px solid var(--rcs-bf-led);
  color: #fff;
  content: var(--rcs-bf-label, "بلک‌فرایدی");
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  pointer-events: none;
}
.rcs-bf-touch ul.products li.rcs-bf-deal > a.woocommerce-LoopProduct-link::after { top: 0; bottom: auto; }

/* ---------- Black buy button on discounted products ---------- */
.rcs-bf-btn .rcs-bf-deal {
  --btn-accented-bgcolor: #000;
  --btn-accented-bgcolor-hover: var(--rcs-bf-accent);
  --btn-accented-color: #fff;
  --btn-accented-color-hover: #fff;
}
.rcs-bf-btn .rcs-bf-deal .single_add_to_cart_button {
  background-color: #000;
  box-shadow: inset 0 -3px 0 var(--rcs-bf-led);
  color: #fff;
}
.rcs-bf-btn .rcs-bf-deal .single_add_to_cart_button:hover { background-color: var(--rcs-bf-accent); color: #fff; }

/* A cached page that outlived the campaign hides its own campaign elements. */
.rcs-bf-over .rcs-bf-bar,
.rcs-bf-over .rcs-bf-chip,
.rcs-bf-over .rcs-bf-deal-box,
.rcs-bf-over .rcs-bf-hero,
.rcs-bf-over .rcs-bf-sticky,
.rcs-bf-over .rcs-bf-strip,
.rcs-bf-over .rcs-bf-mini,
.rcs-bf-over .rcs-bf-deal .product-element-top::after,
.rcs-bf-over div.product.rcs-bf-deal .woocommerce-product-gallery::after { display: none; }

@media (max-width: 600px) {
  .rcs-bf-bar__in { gap: 6px 12px; padding: 7px 10px; }
  .rcs-bf-bar__msg { flex: 1 1 100%; font-size: 14px; text-align: center; }
  /* Two rows on a phone: the message, then timer and button side by side. */
  .rcs-bf-bar .rcs-bf-timer__lead { display: none; }
  .rcs-bf-bar .rcs-bf-timer__cell { min-width: 2.4em; padding: 4px 4px 3px; }
  .rcs-bf-bar a.rcs-bf-bar__cta { padding: 4px 10px; font-size: 13px; }
}
@media (max-width: 1024px) {
  /* The theme's bottom toolbar on phones and tablets: the ticket sits on top of it. */
  .sticky-toolbar-on .rcs-bf-sticky { bottom: calc(55px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) {
  .rcs-bf-sticky { width: 168px; }
  .rcs-bf-sticky--right { right: 10px; }
  .rcs-bf-sticky--left { left: 10px; }
  .rcs-bf-sticky.is-open { right: 10px; left: 10px; width: auto; max-width: none; }
  .rcs-bf-sticky .rcs-bf-sticky__tab { padding: 14px 8px 8px; }
  .rcs-bf-sticky .rcs-bf-timer__cell:nth-child(5) { display: none; }
}
@media print {
  .rcs-bf-bar, .rcs-bf-sticky { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rcs-bf-sticky .rcs-bf-sticky__tab { transition: none; }
  .rcs-bf-timer__cell b { animation: none; }
  .rcs-bf-stock__track span,
  .rcs-bf-tier__track span { transition: none; }
}
