/* Shared storefront accessibility and small-screen guardrails. Loaded after each theme stylesheet. */
.skip-link {
    position: fixed;
    z-index: 10000;
    inset-block-start: 0.5rem;
    inset-inline-start: 0.5rem;
    padding: 0.75rem 1rem;
    color: #111;
    background: #fff;
    border: 2px solid currentColor;
    border-radius: 0.35rem;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

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

@media (max-width: 640px) {
    .swiper,
    video,
    iframe {
        max-width: 100%;
    }

    input,
    select,
    textarea {
        max-width: 100%;
        font-size: max(1rem, 16px);
    }
}

#mobile-menu-toggle,
#search-toggle,
#cart-toggle,
#close-search {
    min-width: 44px;
    min-height: 44px;
}

@media (forced-colors: active) {
    :where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
        outline: 2px solid Highlight;
    }
}

/* Storefront Enhancements: Stock Badges, Skeleton Placeholders, and Layout Guardrails */
.badge-out-of-stock {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: rgba(220, 38, 38, 0.92);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 10;
    pointer-events: none;
}

.btn-out-of-stock {
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer-load 1.5s infinite;
}

@keyframes shimmer-load {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Aspect ratio stability for CLS reduction */
.product-card-img-wrap {
    position: relative;
    overflow: hidden;
    background-color: #f8fafc;
}

