/* ==========================================================================
   Sticky bottom cart bar — Anveshan-style
   ========================================================================== */

.xevora-cart-sticky {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1035;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.xevora-cart-sticky.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.xevora-cart-sticky__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 10px 10px 14px;
  border-radius: 999px;
  background: linear-gradient(160deg, #161310 0%, #0c0a07 100%);
  box-shadow: 0 14px 40px rgba(12, 10, 7, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xevora-cart-sticky__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.xevora-cart-sticky__thumbs {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.xevora-cart-sticky__thumb {
  display: block;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #1a1712;
  background: #fff;
}

.xevora-cart-sticky__thumb:first-child {
  margin-left: 0;
}

.xevora-cart-sticky__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xevora-cart-sticky__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--sans, "Jost", sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  border: 2px solid #1a1712;
}

.xevora-cart-sticky__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.xevora-cart-sticky__count {
  font-family: var(--sans, "Jost", sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

.xevora-cart-sticky__total {
  font-family: var(--sans, "Jost", sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
}

.xevora-cart-sticky__total .woocommerce-Price-amount {
  color: inherit;
}

.xevora-cart-sticky__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--brand, #15130f);
  color: #fff;
  font-family: var(--sans, "Jost", sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.xevora-cart-sticky__cta:hover,
.xevora-cart-sticky__cta:focus-visible {
  background: var(--brand-dark, #0b0a08);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.xevora-cart-sticky__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.xevora-cart-sticky__link-fallback {
  display: none;
}

/* Mobile: sit above bottom nav */
@media (max-width: 767px) {
  .xevora-cart-sticky {
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .xevora-cart-sticky__inner {
    max-width: none;
    padding: 8px 8px 8px 12px;
  }

  .xevora-cart-sticky__cta-label {
    display: none;
  }

  .xevora-cart-sticky__cta {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
  }

  .xevora-cart-sticky__cta-icon {
    margin: 0;
  }
}

/* Desktop: wider pill */
@media (min-width: 768px) {
  .xevora-cart-sticky {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(16px);
    width: min(560px, calc(100% - 32px));
  }

  .xevora-cart-sticky.is-visible {
    transform: translateX(-50%) translateY(0);
  }
}

body.has-cart-sticky {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.has-cart-sticky .xevora-whatsapp {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  body.has-cart-sticky .xevora-whatsapp {
    bottom: calc(138px + env(safe-area-inset-bottom, 0px));
  }

  body.has-cart-sticky.has-pdp-sticky .xevora-whatsapp {
    bottom: calc(138px + env(safe-area-inset-bottom, 0px));
  }
}

body.has-cart-sticky.has-pdp-sticky .xevora-cart-sticky {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body.has-cart-sticky.has-pdp-sticky .xevora-cart-sticky {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  body.has-cart-sticky .xevora-whatsapp {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

/* Hide default add-to-cart success banner on shop/catalog */
.xevora-shop .woocommerce-notices-wrapper .woocommerce-message,
.post-type-archive-product .woocommerce-notices-wrapper .woocommerce-message,
.tax-product_cat .woocommerce-notices-wrapper .woocommerce-message {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .xevora-cart-sticky {
    transition: none;
  }
}
