/* MEHVRAA shared product slider — storefront product page + admin preview */
.mc-carousel { --mc-wine: #831843; --mc-ink: #1f1720; --mc-bg: #fff5f7; width: 100%; min-width: 0; position: relative; container-type: inline-size; container-name: mc; }
.mc-viewport { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 1.25rem; background: var(--mc-bg); touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }
.mc-viewport:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--mc-wine); }
.mc-track { display: flex; height: 100%; will-change: transform; transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1); }
.mc-slide { flex: 0 0 100%; height: 100%; margin: 0; overflow: hidden; }
.mc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; pointer-events: none; }
.is-multi .mc-viewport { cursor: grab; }
.is-multi .mc-viewport:active { cursor: grabbing; }

.mc-arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.86); color: var(--mc-ink); box-shadow: 0 4px 16px rgba(31, 23, 32, 0.14); cursor: pointer; opacity: 0; transition: opacity 200ms ease, background 150ms ease, transform 150ms ease; backdrop-filter: blur(6px); }
.mc-arrow-prev { left: 12px; }
.mc-arrow-next { right: 12px; }
.mc-arrow:hover { background: #fff; }
.mc-arrow:active { transform: scale(0.94); }
.mc-arrow:focus-visible { opacity: 1; outline: 2px solid var(--mc-wine); outline-offset: 2px; }
.mc-carousel:hover .mc-arrow, .mc-carousel:focus-within .mc-arrow { opacity: 1; }
@media (hover: none) { .mc-arrow { opacity: 1; width: 38px; height: 38px; } }

.mc-counter { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: rgba(31, 23, 32, 0.6); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); }
.mc-progress { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 3px; z-index: 2; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.55); }
.mc-progress span { display: block; height: 100%; border-radius: inherit; background: var(--mc-wine); transform: scaleX(0); transform-origin: left center; }
.is-stopped .mc-progress { opacity: 0; }

.mc-dots { display: none; justify-content: center; gap: 4px; padding-top: 10px; }
.mc-dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.mc-dot::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: rgba(131, 24, 67, 0.25); transition: width 250ms ease, background 250ms ease; }
.mc-dot[aria-current="true"]::before { width: 20px; background: var(--mc-wine); }
.mc-dot:focus-visible { outline: 2px solid var(--mc-wine); outline-offset: 1px; border-radius: 6px; }

.mc-thumbs { display: flex; gap: 10px; padding: 12px 2px 4px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.mc-thumb { flex: 0 0 auto; width: 68px; aspect-ratio: 4 / 5; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--mc-bg); cursor: pointer; opacity: 0.6; scroll-snap-align: center; transition: opacity 200ms ease, border-color 200ms ease, transform 150ms ease; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-thumb:hover { opacity: 0.9; }
.mc-thumb[aria-current="true"] { opacity: 1; border-color: var(--mc-wine); }
.mc-thumb:focus-visible { outline: 2px solid var(--mc-wine); outline-offset: 2px; }

/* Dots instead of thumbnails when the slider itself is narrow (phones, admin phone preview) */
@container mc (max-width: 440px) {
  .mc-thumbs { display: none; }
  .mc-dots { display: flex; }
  .mc-viewport { border-radius: 1rem; }
}

.mc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  .mc-track, .mc-arrow, .mc-dot::before, .mc-thumb { transition: none !important; }
  .mc-progress { display: none; }
}
