/*
 * main.css — styles owned by this mirror (loaded after the theme CSS).
 * Only covers UI that Magento's JS used to render plus state classes toggled
 * by assets/js. Theme styling itself lives untouched in css/vendor/.
 *
 * Breakpoints follow the theme: 768px (tablet), 1024px (desktop).
 * Note: the theme sets html{font-size:62.5%}, so 1rem = 10px here.
 */
:root {
  --mirror-primary: #0053b3;
  --mirror-primary-dark: #003f88;
  --mirror-text: #020c1c;
  --mirror-muted: #364151;
  --mirror-surface: #fff;
  --mirror-overlay: rgba(1, 5, 11, 0.6);
  --mirror-success: #1e7e34;
  --mirror-error: #c62828;
  --mirror-info: #0053b3;
  --mirror-radius: 0.8rem;
  --mirror-shadow: 0 1.4rem 2.8rem rgba(0, 0, 0, 0.25);
  --mirror-z-overlay: 100000;
  --mirror-focus: 0 0 0 3px rgba(0, 83, 179, 0.45);
}

/* ---------- Global ---------- */
.mirror-scroll-lock,
.mirror-scroll-lock body {
  overflow: hidden;
}

:focus-visible {
  outline: none;
  box-shadow: var(--mirror-focus);
  border-radius: 2px;
}

/* ---------- Header states ---------- */
.block-search form.minisearch .overlay-search.is-open {
  display: block;
}

.page-header.mirror-header--scrolled {
  box-shadow: 0 2px 12px rgba(2, 12, 28, 0.06);
}

/* Desktop hover menus keep working; on touch the .active class (set by JS) opens them. */
@media (max-width: 1023px) {
  .header .category .items-container {
    display: none;
  }

  .header .category.active .items-container {
    display: block;
  }
}

/* ---------- Magento modals (review form, checkout login) ----------
 * Magento JS injected a separate .modals-overlay; the open modal itself
 * covers the viewport, so it carries the same dim colour instead. */
.modal-popup._show,
.modal-slide._show {
  background-color: rgba(51, 51, 51, 0.55);
}

/* ---------- Mirror modal (promo) ---------- */
.mirror-modal {
  position: fixed;
  inset: 0;
  z-index: var(--mirror-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem;
}

.mirror-modal[hidden] {
  display: none;
}

.mirror-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--mirror-overlay);
  animation: mirror-fade 0.25s ease;
}

.mirror-modal__dialog {
  position: relative;
  max-width: 54.4rem;
  width: 100%;
  max-height: calc(100vh - 3.2rem);
  overflow: auto;
  border-radius: var(--mirror-radius);
  animation: mirror-zoom 0.3s ease;
}

.mirror-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 1;
  width: 4.4rem;
  height: 4.4rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
  cursor: pointer;
}

.mirror-modal__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.mirror-modal__dialog--promo .bss-early15 {
  margin: 0;
}

.mirror-modal__dialog--promo .e15-code {
  cursor: copy;
}

/* ---------- Lightbox ---------- */
.mirror-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--mirror-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.mirror-lightbox[hidden] {
  display: none;
}

.mirror-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 11, 0.92);
}

.mirror-lightbox__figure {
  position: relative;
  margin: 0;
  max-width: min(90vw, 120rem);
  text-align: center;
  pointer-events: none;
}

.mirror-lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  pointer-events: auto;
}

.mirror-lightbox__caption,
.mirror-lightbox__counter {
  color: #fff;
  font-size: 1.4rem;
}

.mirror-lightbox__caption {
  margin-top: 1.2rem;
}

.mirror-lightbox__counter {
  position: absolute;
  top: 1.6rem;
  left: 1.6rem;
}

.mirror-lightbox__btn {
  position: absolute;
  width: 4.8rem;
  height: 4.8rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 3.2rem;
  line-height: 1;
  cursor: pointer;
}

.mirror-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mirror-lightbox__btn--close {
  top: 1.6rem;
  right: 1.6rem;
}

.mirror-lightbox__btn--prev,
.mirror-lightbox__btn--next {
  top: 50%;
  transform: translateY(-50%);
}

.mirror-lightbox__btn--prev {
  left: 1.6rem;
}

.mirror-lightbox__btn--next {
  right: 1.6rem;
}

/* ---------- Carousels ---------- */
[data-carousel] .owl-stage-outer {
  overflow: hidden;
  touch-action: pan-y;
}

[data-carousel] .owl-stage {
  display: flex;
}

[data-carousel] .owl-dot {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

[data-carousel] .owl-prev,
[data-carousel] .owl-next {
  cursor: pointer;
}

[data-carousel] .owl-prev.disabled,
[data-carousel] .owl-next.disabled {
  opacity: 0.4;
}

/* ---------- Product ---------- */
.mirror-price-flash {
  animation: mirror-flash 0.6s ease;
}

.dropdown-container .dropdown-btn[aria-expanded='true']::after {
  transform: rotate(180deg);
}

/* Mock minicart content */
.mirror-minicart {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.mirror-minicart__item {
  display: grid;
  grid-template-columns: 6.4rem 1fr auto;
  gap: 1.2rem;
  align-items: start;
  padding: 1.2rem 0;
  border-bottom: 1px solid #edf2f9;
}

.mirror-minicart__item img {
  width: 6.4rem;
  height: 6.4rem;
  object-fit: cover;
  border-radius: 0.4rem;
}

.mirror-minicart__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 1.3rem;
  color: var(--mirror-muted);
}

.mirror-minicart__info strong {
  color: var(--mirror-text);
  font-size: 1.4rem;
}

.mirror-minicart__remove {
  width: 4.4rem;
  height: 4.4rem;
  border: 0;
  background: none;
  font-size: 2rem;
  color: var(--mirror-muted);
  cursor: pointer;
}

.mirror-minicart__subtotal {
  display: flex;
  justify-content: space-between;
  margin: 1.6rem 0;
  font-weight: 700;
}

.mirror-minicart__checkout {
  display: block;
  text-align: center;
}

/* ---------- Section nav ---------- */
.mirror-nav-spacer {
  height: 0;
}

/* ---------- Release notes ---------- */
#dataNote.mirror-collapsed {
  max-height: 25rem;
  overflow: hidden;
}

/* ---------- Cookie consent ---------- */
#bss-consent.is-visible {
  display: block;
  bottom: 1.6rem;
  left: 1.6rem;
  background: var(--mirror-text);
  color: #fff;
}

@media (max-width: 767px) {
  #bss-consent.is-visible {
    right: 1.6rem;
    max-width: none;
  }
}

/* ---------- Forms ---------- */
.mirror-field-error {
  margin-top: 0.6rem;
  color: var(--mirror-error);
  font-size: 1.3rem;
}

/* ---------- Toasts ---------- */
.mirror-toasts {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  left: 1.6rem;
  z-index: calc(var(--mirror-z-overlay) + 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  pointer-events: none;
}

@media (min-width: 768px) {
  .mirror-toasts {
    left: auto;
    align-items: flex-end;
  }
}

.mirror-toast {
  max-width: 38.4rem;
  padding: 1.2rem 1.6rem;
  border-left: 4px solid var(--mirror-success);
  border-radius: var(--mirror-radius);
  background: var(--mirror-surface);
  box-shadow: var(--mirror-shadow);
  color: var(--mirror-text);
  font-size: 1.4rem;
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mirror-toast.is-visible {
  opacity: 1;
  transform: none;
}

.mirror-toast--error {
  border-left-color: var(--mirror-error);
}

.mirror-toast--info {
  border-left-color: var(--mirror-info);
}

/* ---------- Animations ---------- */
@keyframes mirror-fade {
  from { opacity: 0; }
}

@keyframes mirror-zoom {
  from { opacity: 0; transform: scale(0.94); }
}

@keyframes mirror-flash {
  50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}
