/**
 * Storefront feature styles — see inc/shop-features.php.
 *
 * Hand-maintained plain CSS (not part of the gulp/SCSS build), enqueued with
 * filemtime versioning alongside `main`. Uses the theme's existing :root custom
 * properties so it tracks the active brand colour.
 *
 * 1. Sticky add-to-cart bar
 * 2. Free-shipping progress bar
 * 3. Recently viewed carousel
 * 4. Order status timeline
 */

/* ---------------------------------------------------------------------------
 * 1. Sticky add-to-cart bar
 * ------------------------------------------------------------------------ */

.sarir-sticky-atc {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 90;
  background: var(--pureWhite);
  border-top: 1px solid var(--panelBorder, #e3e8ea);
  box-shadow: 0 -6px 24px -12px rgba(23, 43, 42, .35);
  transform: translateY(110%);
  transition: transform .28s ease;
  padding: 10px 0;
}

.sarir-sticky-atc.is-visible {
  transform: translateY(0);
}

.sarir-sticky-atc[hidden] {
  display: block; /* keep it in flow for the transition; visibility handled by transform */
}

.sarir-sticky-atc__inner {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sarir-sticky-atc__media {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--backgroundColor);
  display: none;
}

.sarir-sticky-atc__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sarir-sticky-atc__info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sarir-sticky-atc__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primaryTextColor);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sarir-sticky-atc__price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primaryColor);
}

.sarir-sticky-atc__price del {
  color: var(--secondaryTextColor);
  font-weight: 500;
  margin-inline-end: 6px;
}

.sarir-sticky-atc__price ins {
  text-decoration: none;
}

.sarir-sticky-atc__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--primaryColor);
  color: var(--primaryTextBtn);
  fill: var(--primaryTextBtn);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background .2s;
}

.sarir-sticky-atc__btn:hover {
  background: var(--primaryColorHover);
  color: var(--primaryTextBtn);
}

.sarir-sticky-atc__btn.is-disabled {
  background: var(--panelSurfaceMuted, #f5f7f8);
  color: var(--danger);
  cursor: not-allowed;
  pointer-events: none;
}

.sarir-sticky-atc__btn svg {
  flex: 0 0 auto;
}

@media (min-width: 992px) {
  .sarir-sticky-atc__media {
    display: block;
  }
  .sarir-sticky-atc__title {
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  .sarir-sticky-atc__btn {
    min-width: 0;
    padding: 11px 16px;
  }
  .sarir-sticky-atc__btn span {
    white-space: nowrap;
  }
  /* Clear the theme's fixed mobile bottom nav (.mobile_tabbed_nav, 60px). */
  body.has-mobile-bottom-nav .sarir-sticky-atc {
    bottom: 60px;
  }
}

/* ---------------------------------------------------------------------------
 * 2. Free-shipping progress bar
 * ------------------------------------------------------------------------ */

.sarir-free-ship-bar {
  background: var(--primaryColorLight);
  border: 1px solid color-mix(in srgb, var(--primaryColor) 22%, #fff);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.sarir-free-ship-bar__text {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primaryTextColor);
}

.sarir-free-ship-bar__text i {
  color: var(--primaryColor);
  font-size: 16px;
  line-height: 1;
}

.sarir-free-ship-bar__text strong {
  color: var(--primaryColor);
  font-weight: 700;
}

.sarir-free-ship-bar .progress {
  height: 8px;
  border-radius: 50px;
  background: color-mix(in srgb, var(--primaryColor) 12%, #fff);
  overflow: hidden;
}

.sarir-free-ship-bar .progress-bar {
  height: 100%;
  background: var(--primaryColor);
  border-radius: 50px;
  transition: width .4s ease;
}

.sarir-free-ship-bar.is-complete {
  background: color-mix(in srgb, var(--success) 12%, #fff);
  border-color: color-mix(in srgb, var(--success) 30%, #fff);
}

.sarir-free-ship-bar.is-complete .sarir-free-ship-bar__text,
.sarir-free-ship-bar.is-complete .sarir-free-ship-bar__text i,
.sarir-free-ship-bar.is-complete .sarir-free-ship-bar__text strong {
  color: var(--success);
}

.sarir-free-ship-bar.is-complete .progress-bar {
  background: var(--success);
}

/* Tighter inside the mini-cart drawer. */
.mini_cart .sarir-free-ship-bar,
.widget_shopping_cart .sarir-free-ship-bar {
  margin: 0 0 12px;
}

/* ---------------------------------------------------------------------------
 * 3. Recently viewed carousel
 *    (.product_slider / .swiper_carousel styling is inherited from main.css)
 * ------------------------------------------------------------------------ */

.sarir-recent-viewed {
  clear: both;
}

.sarir-recent-viewed .product_slider__header {
  margin-bottom: 14px;
}

.sarir-recent-viewed .product_slider__header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--primaryTextColor);
}

.sarir-recent-viewed .swiper-slide {
  height: auto;
}

/* ---------------------------------------------------------------------------
 * 4. Order status timeline
 * ------------------------------------------------------------------------ */

.sarir-order-timeline {
  background: var(--panelSurface, #fff);
  border: 1px solid var(--panelBorder, #e3e8ea);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}

.sarir-order-timeline__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primaryTextColor);
}

.sarir-order-timeline__title i {
  color: var(--primaryColor);
  font-size: 17px;
  line-height: 1;
}

.sarir-order-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The rail: sits under the dots on the right (RTL). */
.sarir-order-timeline__list::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  inset-inline-start: 11px;
  width: 2px;
  background: var(--panelBorder, #e3e8ea);
}

.sarir-order-timeline__list--terminal::before {
  display: none;
}

.sarir-order-timeline__step {
  position: relative;
  padding-inline-start: 34px;
  padding-block: 8px;
  min-height: 24px;
}

.sarir-order-timeline__dot {
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pureWhite);
  border: 2px solid var(--panelBorder, #e3e8ea);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--secondaryTextColor);
  z-index: 1;
}

.sarir-order-timeline__label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--secondaryTextColor);
}

.sarir-order-timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--secondaryTextColor);
}

.sarir-order-timeline__meta > span {
  white-space: nowrap;
}

.sarir-order-timeline__track {
  margin-top: 8px;
  font-size: 12px !important;
  padding: 7px 12px !important;
}

/* Completed steps */
.sarir-order-timeline__step.is-done .sarir-order-timeline__dot {
  background: var(--primaryColor);
  border-color: var(--primaryColor);
  color: var(--primaryTextBtn);
}

.sarir-order-timeline__step.is-done .sarir-order-timeline__dot::after {
  content: "\2713"; /* check mark */
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.sarir-order-timeline__step.is-done .sarir-order-timeline__label {
  color: var(--primaryTextColor);
}

/* Current step */
.sarir-order-timeline__step.is-current .sarir-order-timeline__dot {
  background: var(--primaryColor);
  border-color: var(--primaryColor);
  color: var(--primaryTextBtn);
  box-shadow: 0 0 0 4px var(--primaryColorLight);
}

.sarir-order-timeline__step.is-current .sarir-order-timeline__label {
  color: var(--primaryTextColor);
  font-weight: 700;
}

/* Tone accents for the current node, matching the status badges. */
.sarir-order-timeline--warning .sarir-order-timeline__step.is-current .sarir-order-timeline__dot {
  background: var(--statusWarning);
  border-color: var(--statusWarning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--statusWarning) 18%, #fff);
}

.sarir-order-timeline--danger .sarir-order-timeline__step.is-current .sarir-order-timeline__dot,
.sarir-order-timeline__step.is-terminal .sarir-order-timeline__dot {
  background: var(--statusDanger);
  border-color: var(--statusDanger);
  color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--statusDanger) 18%, #fff);
}

.sarir-order-timeline__step.is-terminal .sarir-order-timeline__label {
  color: var(--statusDanger);
  font-weight: 700;
}
