html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    /* Modern font */
    background-color: #f8fafc;
    /* Slate 50 */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.card-premium {
    background-color: white;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    /* Darker backdrop */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.modal-content-image {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Gallery Styles */
.gallery-container {
    position: relative;
    width: 100%;
    height: 20rem;
    /* Taller images */
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
    z-index: 0;
}

/* Skeleton shimmer while image loads */
.gallery-slide:not(.img-loaded) {
    background-color: #e5e7eb;
    background-image: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.gallery-slide.img-loaded {
    background-color: transparent;
    animation: none;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gallery-slide.animate-ready {
    transition: opacity 0.5s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
    /* Habilitar clicks en slide activo */
    z-index: 10;
}

.gallery-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-dot.active {
    background-color: white;
    transform: scale(1.2);
    width: 1.5rem;
    /* Elongated active dot */
}

.gallery-dot.dot-video {
    background-color: rgba(168, 85, 247, 0.6);
}

.gallery-dot.dot-video.active {
    background-color: rgb(168, 85, 247);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.chip-selected {
    background-color: #4f46e5;
    /* Indigo 600 */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}

.chip-default {
    background-color: white;
    color: #4b5563;
    /* Gray 600 */
    border: 1px solid #e5e7eb;
    /* Gray 200 */
}

.chip-default:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

/* Loading Overlay Styles */
#loading-overlay {
    position: fixed;
    inset: 0;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #E5E7EB;
    border-bottom-color: #4f46e5;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#catalogo-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

#catalogo-content.ready {
    opacity: 1;
}

/* Ecommerce Single Product View Styles */
.single-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .single-product-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    padding: 0.5rem 1rem;
    background-color: #f9fafb;
    color: #4b5563;
    font-weight: bold;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.quantity-input {
    width: 3rem;
    text-align: center;
    border-left: 2px solid #e5e7eb;
    border-right: 2px solid #e5e7eb;
    padding: 0.5rem 0;
    font-weight: 700;
    color: #111827;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Thumbnails Gallery inside Modals */
.product-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    /* Ensures the whole image is visible */
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: white;
    /* Changed from light gray to white for better framing */
    padding: 2px;
    /* Inner padding creates a space between image and active border */
}

.product-gallery-thumb.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

/* Neon Breathing Effect for Product Titles */
@keyframes neon-breathe {

    0%,
    100% {
        text-shadow: 0 0 4px var(--theme-primary-neon, rgba(79, 70, 229, 0.6));
    }

    50% {
        text-shadow: 0 0 10px var(--theme-primary-neon, rgba(79, 70, 229, 0.8)),
            0 0 20px var(--theme-primary-neon, rgba(79, 70, 229, 0.5));
    }
}

.text-neon-title {
    color: #111827;
    animation: neon-breathe 4s ease-in-out infinite;
    display: inline-block;
    width: 100%;
}