/* Inline SVG icons (Phosphor subset via sprite) */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
  vertical-align: -0.125em;
}

.icon use {
  pointer-events: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Hide fullscreen search before main.css loads (prevents FOUC above topbar) */
.search-box {
  position: fixed !important;
  inset: 0;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 10050;
}

.search-box.active {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Product / category image loading skeleton */
.product-card__thumb.is-loading,
.product-details__thumb.is-loading,
.product-thumb-loading.is-loading,
.brand-collection.is-loading {
  position: relative;
  background: #f0f0f0;
}

.product-card__thumb.is-loading img,
.product-details__thumb.is-loading img,
.product-thumb-loading.is-loading img,
.brand-collection.is-loading img {
  opacity: 0;
}

.product-card__thumb img,
.product-details__thumb img,
.product-thumb-loading img,
.brand-collection img {
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.product-img-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.product-card__thumb.is-loading .product-img-loader,
.product-details__thumb.is-loading .product-img-loader,
.product-thumb-loading.is-loading .product-img-loader,
.brand-collection.is-loading .product-img-loader {
  display: flex;
}

.product-img-loader::after {
  content: "";
  width: 28px;
  height: 28px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--main-600, #4d7375);
  border-radius: 50%;
  animation: product-img-spin 0.7s linear infinite;
}

@keyframes product-img-spin {
  to {
    transform: rotate(360deg);
  }
}
