/* wc_specialcategories — front office: special categories list, home page sections, flash sale cards, banners and countdowns */

.wc-special-categories {
  margin: 1.5rem 0;
}

.wc-special-categories__item {
  margin-bottom: 1.5rem;
}

.wc-special-categories-home__section {
  margin: 2rem 0;
}

.wc-special-categories-home__section .wc-special-categories {
  margin-top: 0;
}

.wc-special-categories-home__title {
  margin-bottom: 1rem;
}

.wc-flash-sale-card {
  position: relative;
  text-align: center;
}

.wc-flash-sale-card__image {
  position: relative;
  display: block;
  overflow: hidden;
}

.wc-flash-sale-card__image img {
  width: 100%;
  height: auto;
  display: block;
}

.wc-flash-sale-card__flag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: #d9232d;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.wc-flash-sale-card__title {
  margin: 0.75rem 0 0.5rem;
}

.wc-flash-sale-card--ended .wc-flash-sale-card__image img {
  filter: grayscale(1);
  opacity: 0.7;
}

/* ------------------------------------------------------------------ Special product page
   The flag joins the theme product flags on the cover (black pill of the design); the countdown
   sits right above the price with the hook styling. */

.product-flag.wc-flash-sale {
  background: #000;
  border-radius: 2rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wc-flash-sale-product-countdown {
  --wc-fs-accent: #a11c44;
  margin-bottom: 0.5rem;
}

.wc-flash-sale-product-countdown .wc-flash-sale-countdown {
  color: var(--wc-fs-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wc-flash-sale-countdown {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.wc-flash-sale-countdown__timer {
  display: inline-flex;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.wc-flash-sale-countdown__unit b {
  font-size: 1.1em;
}

.wc-flash-sale-countdown__unit small {
  margin-left: 0.1em;
}

.wc-flash-sale-countdown--ended .wc-flash-sale-countdown__timer,
.wc-flash-sale-countdown--running .wc-flash-sale-countdown__timer {
  /* A running sale shows the remaining-time phrase only; the unit timer serves upcoming sales */
  display: none;
}

.wc-flash-sale-countdown__icon {
  display: none;
  align-self: center;
}

.wc-flash-sale-countdown--running .wc-flash-sale-countdown__icon {
  display: inline-block;
}

/* ------------------------------------------------------------------ Flash sale banner (special list display)
   One full-width banner per sale: random background image of the type pool (position/repeat/size options),
   subject image on the left, flag / title / description / countdown on the right, overlapping call to action.
   Sizing comes from the type row through custom properties (category block max width/height, CSS lengths). */

.wc-special-categories__item--special {
  margin-bottom: 2.5rem;
}

/* The iqitelementor "Custom" widget paints its box black at runtime (demo hint behavior, inline style
   set by its JS). Neutral whenever it hosts this module's hook output — !important beats the inline style. */
.elementor-widget-widget-custom:has(.wc-special-categories) {
  background: transparent !important;
}

.wc-flash-sale-banner {
  --wc-fs-accent: #a11c44;
  --wc-fs-dark: #3a1128;
  --wc-fs-paper: #f1ece3;
  position: relative;
  display: flex;
  align-items: center;
  max-width: var(--wc-fs-max-width, 1770px);
  max-height: var(--wc-fs-max-height, none);
  min-height: 20rem;
  margin: 2.5rem auto 1.5rem;
  padding: 1.5rem 3rem;
  background-color: var(--wc-fs-paper);
  background-image: var(--wc-fs-bg, none);
  background-position: var(--wc-fs-bg-position, top);
  background-repeat: var(--wc-fs-bg-repeat, no-repeat);
  background-size: var(--wc-fs-bg-size, auto);
}

.wc-flash-sale-banner__subject {
  flex: 0 1 40%;
  display: flex;
  justify-content: center;
  align-self: flex-end;
  /* Subject margins from the global subject options (CSS lengths, negative = overflow the block) */
  margin: var(--wc-fs-subject-mt, 0px) var(--wc-fs-subject-mr, 0px) var(--wc-fs-subject-mb, 0px) var(--wc-fs-subject-ml, 0px);
}

.wc-flash-sale-banner__subject img {
  max-width: 100%;
  height: auto;
}

/* Subject position (global subject option); left is the default row layout */
.wc-flash-sale-banner--subject-right {
  flex-direction: row-reverse;
}

.wc-flash-sale-banner--subject-top {
  flex-direction: column;
}

.wc-flash-sale-banner--subject-bottom {
  flex-direction: column-reverse;
}

.wc-flash-sale-banner--subject-center {
  flex-direction: column;
}

.wc-flash-sale-banner--subject-top .wc-flash-sale-banner__subject,
.wc-flash-sale-banner--subject-bottom .wc-flash-sale-banner__subject,
.wc-flash-sale-banner--subject-center .wc-flash-sale-banner__subject {
  align-self: center;
}

.wc-flash-sale-banner--subject-center .wc-flash-sale-banner__content {
  align-self: center;
}

.wc-flash-sale-banner__content {
  flex: 1 1 55%;
  padding: 1rem 2rem 2rem;
  text-align: center;
}

.wc-flash-sale-banner__flag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 1.4rem;
  background: #000;
  border-radius: 2rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wc-flash-sale-banner__title {
  margin: 0 0 0.75rem;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wc-flash-sale-banner__title,
.wc-flash-sale-banner__title a {
  /* !important: the warehouse theme colors every a:link:not(.nav-link):not(.btn), beating any single class.
     The plain selector covers the link-less title of the category page variant. */
  color: var(--wc-fs-accent) !important;
}

.wc-flash-sale-banner__description {
  max-width: 34rem;
  margin: 0 auto 1.25rem;
  color: #3b3b3b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.wc-flash-sale-banner .wc-flash-sale-countdown {
  color: var(--wc-fs-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wc-flash-sale-banner__cta {
  position: absolute;
  bottom: -1.3rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 2.2rem;
  background: var(--wc-fs-accent);
  border: 2px solid var(--wc-fs-accent);
  border-radius: 2rem;
  /* !important: the warehouse theme colors every a:link:not(.nav-link):not(.btn), beating any single class */
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wc-flash-sale-banner__cta:hover,
.wc-flash-sale-banner__cta:focus {
  background: #fff;
  border-color: var(--wc-fs-accent);
  color: var(--wc-fs-accent) !important;
  text-decoration: none;
}

/* Category page variant: no access link, the content keeps no clearance for the pop-out button.
   In place of the category header the banner spans the available width (the configured block max
   sizes stay the caps) and drops the list-context top margin. */
.wc-flash-sale-banner--no-cta {
  width: 100%;
  margin-top: 0;
}

.wc-flash-sale-banner--no-cta .wc-flash-sale-banner__content {
  padding-bottom: 1rem;
}

.wc-flash-sale-banner__cta-arrow {
  font-size: 0.7em;
  line-height: 1;
}

.wc-flash-sale-banner--ended {
  filter: grayscale(0.6);
}

@media (max-width: 767px) {
  .wc-flash-sale-banner {
    flex-direction: column;
    max-height: none;
    padding: 1.5rem 1rem 2.5rem;
  }

  .wc-flash-sale-banner__subject {
    align-self: center;
  }

  .wc-flash-sale-banner__subject img {
    margin-top: 0;
  }

  .wc-flash-sale-banner__title {
    font-size: 1.6rem;
  }
}
