/* ── Skip-nav link for keyboard/screen-reader accessibility ── */
.skip-to-main:focus {
  background: #0d6efd;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  position: fixed;
  top: 0.5rem;
  z-index: 99999;
  border-radius: 0.25rem;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.product-media {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.product-media__frame {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #f4f6f5;
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.product-media--detail .product-media__frame {
  border-radius: 0.75rem;
}

.product-media--compact .product-media__frame {
  aspect-ratio: 4 / 3;
}

.product-media__asset,
.product-media__fallback,
.product-media__empty img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.product-media--compact .product-media__asset {
  object-fit: cover;
}

.product-media__empty img {
  height: 40%;
  opacity: 0.55;
  width: 40%;
}

.product-media__frame.skeleton::before {
  animation: product-media-shimmer 1.35s infinite;
  background: linear-gradient(90deg, #eef1ef 25%, #fafbfa 50%, #eef1ef 75%);
  background-size: 200% 100%;
  content: "";
  inset: 0;
  position: absolute;
}

.product-media__frame.skeleton .product-media__asset {
  opacity: 0;
}

.product-media__control {
  background: rgba(0, 0, 0, 0.42);
  border-radius: 50%;
  bottom: auto;
  height: 2.5rem;
  opacity: 0.85;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
}

.product-media__control.carousel-control-prev { left: 0.75rem; }
.product-media__control.carousel-control-next { right: 0.75rem; }

.product-media__thumbnails {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.15rem;
}

.product-media__thumbnail {
  align-items: center;
  aspect-ratio: 1;
  background: #f4f6f5;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  color: #198754;
  display: flex;
  flex: 0 0 4.5rem;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.product-media__thumbnail.active {
  border-color: #80c408;
}

.product-media__thumbnail img {
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  width: 100%;
}

@keyframes product-media-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 767.98px) {
  .product-media--detail .product-media__frame {
    aspect-ratio: 4 / 3;
  }

  .product-media__control {
    height: 2.25rem;
    width: 2.25rem;
  }
}
