/*
 * Vulcan Sports mini-cart overlay
 * Loaded after the compiled theme CSS so legacy drawer rules cannot override it.
 */

/*
 * The drawer is the add-to-cart confirmation. Hide only WooCommerce's matching
 * success notice before first paint; stock, payment, coupon and error notices
 * remain visible. main.js removes the same notice as a compatibility fallback.
 */
.woocommerce-message:has(a.wc-forward[href*="/cart"]) {
  display: none !important;
}

/* Centre the initial loading state without changing the product-list layout. */
html body #wrapper #mini-basket .mini-basket__body.mini-basket__body--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

html body #wrapper #mini-basket .mini-basket__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #686873;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
}

html body #wrapper #mini-basket .mini-basket__spinner {
  display: block;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 3px solid #ececf0;
  border-top-color: #fe5100;
  border-radius: 50%;
  animation: vulcan-basket-spin 800ms linear infinite;
}

@keyframes vulcan-basket-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  html body #wrapper #mini-basket .mini-basket__spinner {
    animation: none;
  }
}

html.mini-basket-open,
html.mini-basket-open body {
  overflow: hidden;
}

html.mini-basket-open body {
  padding-right: calc(var(--mini-basket-body-padding-right, 0px) + var(--mini-basket-scrollbar-width, 0px));
}

html.mini-basket-open #wrapper {
  position: static !important;
  -webkit-transform: none !important;
  transform: none !important;
}

html body #wrapper #mini-basket {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: 0 !important;
  background: rgba(18, 21, 28, 0.43) !important;
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none !important;
  transition: opacity 250ms ease, visibility 0s linear 250ms !important;
}

html body #wrapper #mini-basket .mini-basket__panel {
  display: flex;
  flex-direction: column;
  width: min(460px, 93vw);
  max-width: none;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #45434e;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 250ms ease;
  outline: 0;
}

html.mini-basket-open body #wrapper #mini-basket {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s !important;
}

html.mini-basket-open body #wrapper #mini-basket .mini-basket__panel {
  transform: translateX(0);
}

html body #wrapper #mini-basket .mini-basket__header {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 76px;
  padding: 1rem 1.5rem;
  margin: 0;
  background: #fff;
  border-bottom: 1px solid rgba(69, 67, 78, 0.12);
}

html body #wrapper #mini-basket .mini-basket__header h2 {
  margin: 0;
  color: #45434e;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

html body #wrapper #mini-basket .mini-basket__count {
  font-weight: 400;
}

html body #wrapper #mini-basket .mini-basket__header .mini-basket__close {
  position: static !important;
  inset: auto !important;
  display: inline-grid !important;
  flex: 0 0 44px;
  place-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #45434e !important;
  font: inherit;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1 !important;
  text-transform: none;
  transition: background-color 180ms ease, color 180ms ease;
}

html body #wrapper #mini-basket .mini-basket__header .mini-basket__close span {
  display: block !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
}

html body #wrapper #mini-basket .mini-basket__header .mini-basket__close:hover {
  background: rgba(69, 67, 78, 0.07) !important;
  color: #fe5100 !important;
}

html body #wrapper #mini-basket .mini-basket__header .mini-basket__close:focus-visible {
  outline: 2px solid #fe5100;
  outline-offset: 2px;
}

html body #wrapper #mini-basket .mini-basket__body {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html body #wrapper #mini-basket .woocommerce-mini-cart {
  display: block;
  padding: 0 1.5rem;
  margin: 0;
  list-style: none;
}

html body #wrapper #mini-basket .woocommerce-mini-cart-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 1.5rem 0;
  margin: 0;
  border-bottom: 1px solid rgba(69, 67, 78, 0.1);
}

/* WooCommerce clearfix pseudo-elements otherwise become intermittent grid items. */
html body #wrapper #mini-basket .woocommerce-mini-cart-item::before,
html body #wrapper #mini-basket .woocommerce-mini-cart-item::after {
  display: none !important;
  content: none !important;
}

html body #wrapper #mini-basket .mini-basket__image,
html body #wrapper #mini-basket .mini-basket__image a {
  display: block;
  width: 104px !important;
  height: 142px !important;
  overflow: hidden;
  background: #fff;
}

html body #wrapper #mini-basket .mini-basket__image {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

html body #wrapper #mini-basket .mini-basket__image img {
  display: block;
  float: none !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 142px !important;
  margin: 0;
  border-radius: 5px;
  background: #fff;
  aspect-ratio: auto;
  object-fit: contain;
}

html body #wrapper #mini-basket .mini-basket__details {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: auto;
  flex-direction: column;
}

html body #wrapper #mini-basket .mini-basket__item-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

html body #wrapper #mini-basket .mini-basket__product-name {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}

html body #wrapper #mini-basket .mini-basket__product-name a {
  color: #45434e;
  text-decoration: none;
}

html body #wrapper #mini-basket .mini-basket__product-name a:hover {
  color: #fe5100;
}

html body #wrapper #mini-basket a.remove_from_cart_button {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 0.15rem 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #696771;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html body #wrapper #mini-basket a.remove_from_cart_button:hover {
  background: transparent;
  color: #fe5100;
}

html body #wrapper #mini-basket .variation {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  column-gap: 0.35rem;
  row-gap: 0.2rem;
  padding: 0;
  margin: 0.6rem 0 0;
  color: #696771;
  font-size: 0.84rem;
  line-height: 1.35;
}

html body #wrapper #mini-basket .variation dt,
html body #wrapper #mini-basket .variation dd,
html body #wrapper #mini-basket .variation p {
  display: block !important;
  grid-column: 1 / -1;
  float: none !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

html body #wrapper #mini-basket .variation dd {
  text-align: left;
}

html body #wrapper #mini-basket .variation dt {
  font-weight: 500;
}

html body #wrapper #mini-basket .mini-basket__item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.9rem;
}

html body #wrapper #mini-basket .quantity {
  color: #696771;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

html body #wrapper #mini-basket .mini-basket__price {
  color: #45434e;
  font-weight: 600;
}

html body #wrapper #mini-basket .mini-basket__empty {
  display: grid;
  min-height: 240px;
  padding: 3rem 1.5rem;
  place-items: center;
  text-align: center;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__empty-message {
  margin: 0;
  color: #696771;
  font-size: 1rem;
}

html body #wrapper #mini-basket .mini-basket__summary {
  flex: 0 0 auto;
  padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid rgba(69, 67, 78, 0.12);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.045);
}

html body #wrapper #mini-basket .mini-basket__summary .woocommerce-mini-cart__total {
  position: static;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  margin: 0;
  color: #45434e;
  background: transparent;
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__total strong {
  font-weight: 500;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__total .woocommerce-Price-amount {
  font-weight: 700;
}

html body #wrapper #mini-basket .mini-basket__tax-note {
  padding: 0;
  margin: 0.15rem 0 1rem;
  color: #777580;
  font-size: 0.78rem;
  line-height: 1.4;
}

html body #wrapper #mini-basket .mini-basket__summary .woocommerce-mini-cart__buttons {
  position: static !important;
  inset: auto !important;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 !important;
  margin: 1rem 0 0 !important;
  background: transparent !important;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__buttons .checkout.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.25rem;
  border: 2px solid #fe5100;
  border-radius: 999px;
  background: #fe5100;
  color: #fff;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__buttons .checkout.btn:hover {
  border-color: #f04c00;
  background: #f04c00;
  color: #fff;
  transform: translateY(-1px);
}

html body #wrapper #mini-basket .woocommerce-mini-cart__buttons .checkout.btn:focus-visible {
  outline: 2px solid #45434e;
  outline-offset: 3px;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__buttons .mini-basket__view-cart.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.25rem;
  border: 2px solid #fe5100;
  border-radius: 999px;
  background: #fff;
  color: #fe5100;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

html body #wrapper #mini-basket .woocommerce-mini-cart__buttons .mini-basket__view-cart.btn:hover {
  border-color: #fe5100;
  background: #fe5100;
  color: #fff;
  transform: translateY(-1px);
}

html body #wrapper #mini-basket .woocommerce-mini-cart__buttons .mini-basket__view-cart.btn:focus-visible {
  outline: 2px solid #45434e;
  outline-offset: 3px;
}

@media screen and (max-width: 520px) {
  /* Increase prices only; quantity and supporting labels retain their sizing. */
  html body #wrapper #mini-basket .woocommerce-Price-amount {
    font-size: calc(1em + 1px) !important;
  }

  html body #wrapper #mini-basket .mini-basket__header,
  html body #wrapper #mini-basket .woocommerce-mini-cart,
  html body #wrapper #mini-basket .mini-basket__summary {
    padding-right: 1.1rem;
    padding-left: 1.1rem;
  }

  html body #wrapper #mini-basket .woocommerce-mini-cart-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.85rem;
  }

  html body #wrapper #mini-basket .mini-basket__image,
  html body #wrapper #mini-basket .mini-basket__image a {
    width: 88px !important;
    height: 120px !important;
  }

  html body #wrapper #mini-basket .mini-basket__image img {
    width: 100% !important;
    height: 100% !important;
    max-height: 120px !important;
  }

}

@media screen and (max-width: 360px) {
  html body #wrapper #mini-basket .mini-basket__panel {
    width: 100vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body #wrapper #mini-basket,
  html body #wrapper #mini-basket .mini-basket__panel {
    transition-duration: 1ms !important;
  }
}
