/* Variables CSS */
:root {
    --primary-color: #6B46C1;
    --secondary-color: #8B5CF6;
    --accent-color: #A78BFA;
    --dark-bg: #1E1B4B;
    --light-bg: #F8FAFC;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

input,
textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Accesibilidad - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(107, 70, 193, 0.1), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

/* Partículas flotantes 3D */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-100px) rotateZ(180deg);
        opacity: 0.6;
    }
}

@keyframes floatReverse {

    0%,
    100% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(100px) rotateZ(-180deg);
        opacity: 0.6;
    }
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: float 15s infinite;
    will-change: transform, opacity;
}

.particle:nth-child(2n) {
    animation: floatReverse 20s infinite;
    width: 6px;
    height: 6px;
}

.particle:nth-child(3n) {
    animation-duration: 25s;
    width: 3px;
    height: 3px;
}

@media (max-width: 768px) {

    /* Reducir o desactivar partículas en móvil para mejor rendimiento */
    .floating-particles {
        display: none;
        /* Desactivar completamente en móvil */
    }

    .particle {
        animation-duration: 20s !important;
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
        will-change: auto !important;
        /* Remover will-change en móvil */
    }

    .particle:nth-child(2n) {
        animation-duration: 25s !important;
    }

    .particle:nth-child(3n) {
        animation-duration: 30s !important;
    }
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    z-index: 1000;
    padding: 0 0 0.5rem 0; /* separar la barra de categorías del contenido siguiente en PC */
    overflow: visible; /* asegurar que ningún efecto o sombra de categorías se recorte */
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .navbar {
        backdrop-filter: blur(10px) saturate(150%);
        -webkit-backdrop-filter: blur(10px) saturate(150%);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Indicador de estado del backend */
.backend-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin: 0 0.5rem;
}

/* Estado vacío elegante */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    position: relative;
    overflow: hidden;
    animation: popIn 450ms ease-out;
}

.empty-state::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(107,70,193,0.15));
    pointer-events: none;
}

.empty-icon {
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 6px 14px rgba(107, 70, 193, 0.35));
    animation: shimmer 1.8s ease-in-out infinite;
}

.empty-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.empty-desc {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
}

@keyframes popIn {
    0% { opacity: 0; transform: translateY(12px) scale(0.98); }
    60% { opacity: 1; transform: translateY(0) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    0%, 100% { filter: drop-shadow(0 6px 14px rgba(107, 70, 193, 0.35)); }
    50% { filter: drop-shadow(0 8px 18px rgba(167, 139, 250, 0.55)); }
}
.backend-status-badge.status-local { background: #6b7280; }
.backend-status-badge.status-config { background: #2563eb; }
.backend-status-badge.status-ok { background: #10b981; }
.backend-status-badge.status-error { background: #ef4444; }

@media (max-width: 768px) {
    .backend-status-badge { display: none; }
}

.category-filters-navbar {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.25rem;
    min-height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: rgba(107, 70, 193, 0.4) transparent;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* necesario para sticky dentro del contenedor scroll */
}

@media (min-width: 1024px) {
    .category-filters-navbar {
        max-width: 1400px;
    }
    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
}

.category-filters-navbar::-webkit-scrollbar {
    height: 4px;
}

.category-filters-navbar::-webkit-scrollbar-track {
    background: transparent;
}

.category-filters-navbar::-webkit-scrollbar-thumb {
    background: rgba(107, 70, 193, 0.4);
    border-radius: 10px;
}

.category-filters-navbar::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 70, 193, 0.6);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.logo-3d {
    perspective: 1500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.logo-icon-3d {
    font-size: 4rem;
    display: inline-block;
    animation: rotate3DExtreme 4s infinite cubic-bezier(0.68, -0.55, 0.265, 1.55), glowExtreme 2s ease-in-out infinite alternate;
    text-shadow:
        0 0 30px rgba(255, 255, 255, 1),
        0 0 60px rgba(167, 139, 250, 1),
        0 0 90px rgba(107, 70, 193, 0.8),
        0 0 120px rgba(138, 92, 246, 0.6);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1)) drop-shadow(0 0 60px rgba(167, 139, 250, 0.8));
    transform-style: preserve-3d;
    transition: all 0.3s;
}

.logo-icon-3d:hover {
    transform: scale(1.8) rotateZ(720deg) !important;
    animation-play-state: paused;
    text-shadow:
        0 0 60px rgba(255, 255, 255, 1),
        0 0 120px rgba(167, 139, 250, 1),
        0 0 180px rgba(107, 70, 193, 1);
}

.logo-icon-center {
    font-size: 2.5rem;
    display: inline-block;
    animation: rotate3DExtremeReverse 4s infinite cubic-bezier(0.68, -0.55, 0.265, 1.55), glowExtreme 2s ease-in-out infinite alternate;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 1),
        0 0 40px rgba(167, 139, 250, 1),
        0 0 60px rgba(107, 70, 193, 0.8),
        0 0 80px rgba(138, 92, 246, 0.6);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1)) drop-shadow(0 0 40px rgba(167, 139, 250, 0.8));
    transform-style: preserve-3d;
    transition: all 0.3s;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

@keyframes rotate3DExtreme {
    0% {
        transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1) rotateY(0deg);
    }

    25% {
        transform: rotateY(90deg) rotateX(15deg) rotateZ(-10deg) scale(1.4) rotateY(90deg);
    }

    50% {
        transform: rotateY(180deg) rotateX(0deg) rotateZ(0deg) scale(1) rotateY(180deg);
    }

    75% {
        transform: rotateY(270deg) rotateX(-15deg) rotateZ(10deg) scale(1.4) rotateY(270deg);
    }

    100% {
        transform: rotateY(360deg) rotateX(0deg) rotateZ(0deg) scale(1) rotateY(360deg);
    }
}

@keyframes rotate3DExtremeReverse {
    0% {
        transform: rotateY(360deg) rotateX(0deg) rotateZ(0deg) scale(1) rotateY(360deg);
    }

    25% {
        transform: rotateY(270deg) rotateX(-15deg) rotateZ(10deg) scale(1.4) rotateY(270deg);
    }

    50% {
        transform: rotateY(180deg) rotateX(0deg) rotateZ(0deg) scale(1) rotateY(180deg);
    }

    75% {
        transform: rotateY(90deg) rotateX(15deg) rotateZ(-10deg) scale(1.4) rotateY(90deg);
    }

    100% {
        transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1) rotateY(0deg);
    }
}

@keyframes glowExtreme {
    0% {
        text-shadow:
            0 0 30px rgba(255, 255, 255, 1),
            0 0 60px rgba(167, 139, 250, 1),
            0 0 90px rgba(107, 70, 193, 0.8);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    }

    100% {
        text-shadow:
            0 0 60px rgba(255, 255, 255, 1),
            0 0 120px rgba(167, 139, 250, 1),
            0 0 180px rgba(107, 70, 193, 1),
            0 0 240px rgba(138, 92, 246, 0.6);
        filter: drop-shadow(0 0 40px rgba(255, 255, 255, 1)) drop-shadow(0 0 80px rgba(167, 139, 250, 1));
    }
}

.logo-text {
    font-size: 2.5rem;
    text-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.5),
        6px 6px 15px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(167, 139, 250, 0.6),
        0 0 90px rgba(107, 70, 193, 0.4);
    font-weight: 900;
    letter-spacing: 5px;
    background: linear-gradient(135deg, #ffffff, #e0e7ff, #c7d2fe, #ffffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s ease-in-out infinite;
    transform: perspective(1500px) rotateX(15deg) rotateY(-5deg);
    transition: all 0.3s;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.logo-text:hover {
    transform: perspective(1500px) rotateX(0deg) rotateY(0deg) scale(1.15) !important;
    text-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.5),
        6px 6px 15px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(255, 255, 255, 1),
        0 0 100px rgba(167, 139, 250, 0.8),
        0 0 150px rgba(107, 70, 193, 0.6);
}

@keyframes textShine {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
    display: none;
}

.search-input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 250px;
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.2rem;
    padding: 0.5rem;
    transition: all 0.3s;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.cart-btn:hover {
    transform: perspective(1000px) rotateX(15deg) rotateY(15deg) scale(1.3);
}

.cart-icon {
    display: inline-block;
    transition: all 0.3s;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(167, 139, 250, 0.6);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.cart-btn:hover .cart-icon {
    transform: scale(1.4) rotateZ(-15deg) rotateY(20deg);
    text-shadow:
        0 0 20px rgba(255, 255, 255, 1),
        0 0 40px rgba(167, 139, 250, 0.8),
        0 0 60px rgba(107, 70, 193, 0.6);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 40px rgba(167, 139, 250, 0.6));
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.6);
    transition: all 0.3s;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(239, 68, 68, 0.6);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.8);
    }
}

.cart-btn:hover .cart-count {
    transform: scale(1.2);
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Drawer (Menú lateral) */
.drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.drawer.active {
    right: 0;
}

.drawer-content {
    padding: 2rem;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.drawer-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.drawer-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--light-bg);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.drawer-item:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

.drawer-icon {
    font-size: 1.2rem;
}

/* Hero Section - Carrusel 3D */
.hero-section {
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    position: relative;
    z-index: 1;
}

.carousel-container {
    perspective: 1800px;
    width: 100%;
    max-width: 1200px;
    position: relative;
    padding: 0.25rem 0;
    user-select: none;
    -webkit-user-select: none;
    /* Aislar rendering para evitar parpadeo en móvil */
    contain: layout style paint;
    isolation: isolate;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.carousel-3d {
    width: 100%;
    height: 450px;
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Reactivar animación para giro automático del carrusel */
    animation: rotateCarousel3D 45s infinite linear;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: center center;
}

@media (max-width: 768px) {
    .carousel-3d {
        animation: none;
        transform: none !important;
        transform-style: flat !important;
        will-change: auto !important;
    }

    .carousel-container {
        perspective: none !important;
    }

    .carousel-item {
        transform-style: flat !important;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .carousel-item img {
        transform-style: flat !important;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .carousel-item-info h3 {
        transform-style: flat !important;
    }

    /* Desactivar efectos hover complejos en móvil */
    .carousel-item:hover {
        transform: scale(1.05) !important;
        /* Simplificar transform en móvil */
        box-shadow: 0 10px 30px rgba(107, 70, 193, 0.3) !important;
    }

    .carousel-item:hover img {
        transform: scale(1.02) !important;
        /* Simplificar en móvil */
    }

    /* Optimizar efectos 3D en otros elementos para móvil */
    .product-card {
        transform-style: flat !important;
        perspective: none !important;
    }

    .product-card:hover {
        transform: translateY(-5px) scale(1.01) !important;
    }

    /* Reducir backdrop-filter en móvil (muy pesado) */
    .carousel-item-info {
        backdrop-filter: blur(5px) !important;
        /* Reducir blur en móvil */
        -webkit-backdrop-filter: blur(5px) !important;
    }

    /* Desactivar animaciones complejas del logo en móvil */
    .logo-icon-3d,
    .logo-icon-center {
        animation: none !important;
        transform: none !important;
        filter: none !important;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
    }

    .logo-text {
        animation: none !important;
        transform: none !important;
        filter: none !important;
    }

    /* Reducir text-shadow complejos en móvil */
    .logo-icon-3d:hover {
        transform: scale(1.2) !important;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8) !important;
    }

    .logo-text:hover {
        transform: scale(1.05) !important;
    }

    /* Reducir efectos de navbar en móvil */
    .navbar {
        backdrop-filter: blur(10px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    }

    /* Reducir box-shadow complejos en móvil */
    .product-card {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    }

    .product-card:hover {
        box-shadow: 0 8px 20px rgba(107, 70, 193, 0.2) !important;
    }

    /* Simplificar efectos de productos section */
    .products-section {
        backdrop-filter: blur(10px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    }

    /* Reducir animaciones de pulso y efectos complejos */
    .cart-btn {
        animation: none !important;
    }

    /* Simplificar transiciones en móvil */
    * {
        transition-duration: 0.2s !important;
        /* Reducir duración de transiciones */
    }

    /* Desactivar efectos hover complejos en móvil */
    .btn-add:hover,
    .btn-submit:hover,
    .btn-checkout:hover {
        transform: scale(1.02) !important;
        /* Simplificar transform */
    }

    /* Reducir efectos de sombra en elementos interactivos */
    .category-btn:hover {
        box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3) !important;
    }
}

@keyframes rotateCarousel3D {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}

.carousel-item {
    position: absolute;
    width: 280px;
    height: 380px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease;
    border: 3px solid transparent;
    background-image: linear-gradient(135deg, #f9fafb, #f3f4f6),
        linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transform-style: preserve-3d;
    pointer-events: auto;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    transform-origin: center center;
}

.carousel-item.fan-item {
    border: 5px solid transparent;
    border-radius: 25px;
}

.carousel-item:hover {
    /* Evitar cambios de transform en hover para no provocar parpadeo */
    transform: none !important;
    box-shadow: 0 35px 80px rgba(107, 70, 193, 0.5), 0 0 100px rgba(167, 139, 250, 0.3);
}

/* Zonas clickeables laterales - sin efectos visuales que causen parpadeo */

/* Fan Item - Mantener posición base pero permitir hover */
.carousel-item.fan-item:hover {
    z-index: 10 !important;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    transform: scaleX(1) rotateY(0deg) !important;
    transform-style: preserve-3d;
    min-width: 100%;
    min-height: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.carousel-item:hover img {
    /* Mantener sólo un leve zoom en la imagen sin modificar el contenedor */
    transform: scale(1.03) !important;
}

.carousel-item-info {
    padding: 1.5rem 1rem;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(107, 70, 193, 0.95), rgba(107, 70, 193, 0.8) 60%, transparent);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.carousel-item-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0;
    color: white;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    font-weight: 700;
    letter-spacing: 0.5px;
}


/* Products Section */
.products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 30px 30px 0 0;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .products-section {
        backdrop-filter: blur(10px) saturate(150%);
        -webkit-backdrop-filter: blur(10px) saturate(150%);
    }
}

/* Buscador de productos */
.products-search-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    /* Fijar buscador al scroll */
    position: sticky;
    top: 140px;
    z-index: 9;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.98), transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0 0.5rem 0;
    margin-bottom: 2rem;
}

.products-search-wrapper {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.products-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.products-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.products-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.3);
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow:
        2px 2px 0px rgba(0, 0, 0, 0.5),
        4px 4px 0px rgba(107, 70, 193, 0.3),
        6px 6px 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(167, 139, 250, 0.2);
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: 3px;
    transform: perspective(800px) rotateX(10deg);
    transform-style: preserve-3d;
    display: inline-block;
    transition: all 0.3s ease;
    /* Fijar título al scroll */
    position: sticky;
    top: 80px;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    margin: -3rem -1rem 2rem -1rem;
    border-radius: 0;
    /* Sobreescribir background solo cuando está sticky */
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.95), transparent);
    z-index: -1;
    border-radius: 0;
}

.section-title:hover {
    transform: perspective(800px) rotateX(0deg) scale(1.02);
    text-shadow:
        2px 2px 0px rgba(0, 0, 0, 0.5),
        4px 4px 0px rgba(107, 70, 193, 0.3),
        6px 6px 15px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(255, 255, 255, 0.5),
        0 0 100px rgba(167, 139, 250, 0.3);
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 0 0 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 70, 193, 0.5) transparent;
}

.category-filters::-webkit-scrollbar {
    height: 8px;
}

.category-filters::-webkit-scrollbar-track {
    background: transparent;
}

.category-filters::-webkit-scrollbar-thumb {
    background: rgba(107, 70, 193, 0.5);
    border-radius: 10px;
}

.category-filters::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 70, 193, 0.8);
}

.category-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px) saturate(180%);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1; /* asegurar que el contenido del botón quede por encima */
    transform-style: preserve-3d;
    flex-shrink: 0;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1; /* colocar el brillo detrás del texto */
    pointer-events: none; /* evitar interacción y solapamiento */
}

.category-btn:hover::before {
    width: 180px;
    height: 180px;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
    border-color: rgba(255, 255, 255, 0.35);
}

.category-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.9));
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
    transform: none;
    font-weight: 600;
}

/* Evitar que el primer y último botón queden pegados a los bordes del contenedor */
.category-filters-navbar .category-btn:first-child { margin-left: 0.35rem; }
.category-filters-navbar .category-btn:last-child { margin-right: 0.35rem; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    perspective: 1000px;
    transform-style: preserve-3d;
    border: 1px solid rgba(107, 70, 193, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 32px rgba(107, 70, 193, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(107, 70, 193, 0.2);
}

.product-card:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .product-card {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        touch-action: manipulation;
    }
    
    .product-card img {
        height: 160px;
        max-width: 100%;
        object-fit: cover;
        object-position: center;
    }

    .product-card:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 10px 20px rgba(107, 70, 193, 0.2);
    }

    /* Inputs con font-size mínimo para evitar zoom en iOS */
    .checkout-form input,
    .checkout-form textarea,
    .checkout-form select,
    .products-search-input,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
        /* Evita zoom automático en iOS */
    }

    /* Botones con tamaño mínimo táctil */
    .btn-add,
    .btn-submit,
    .btn-checkout,
    .category-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Mejorar scroll en móvil */
    .category-filters {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
    }

    /* Modal y checkout en tablets y móvil */
    .modal {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 95vh;
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        animation: slideUpMobile 0.3s ease-out;
    }

    /* Modal del carrito específicamente */
    #cartModal .modal-content {
        max-height: 95vh;
    }

    #cartModal .modal-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 2px solid #e5e7eb;
        padding: 1rem;
    }

    #cartModal .modal-header h2 {
        font-size: 1.2rem;
    }

    #cartModal .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
        padding: 1rem;
        padding-bottom: 2rem;
        /* Espacio extra al final para scroll */
    }

    #cartModal .modal-footer {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 2px solid #e5e7eb;
        padding: 1rem;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
        z-index: 10;
    }

    .checkout-content {
        max-height: 95vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .checkout-content .modal-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 2px solid #e5e7eb;
        padding: 1rem;
    }

    .checkout-content .modal-header h2 {
        font-size: 1.2rem;
    }

    .checkout-content .modal-body {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
        padding: 1rem;
        padding-bottom: 2rem;
        /* Espacio extra al final para scroll */
    }

    .checkout-form .form-group {
        margin-bottom: 1rem;
    }

    .checkout-content .modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 10;
    }
}

/* Animación de carga */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-card img {
    width: 100%;
    max-width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.9), rgba(229, 231, 235, 0.9));
    transition: all 0.3s ease, opacity 0.4s ease;
    display: block;
}

.product-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.02);
}

.product-card-info {
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.product-price::before {
    content: 'S/';
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

.btn-add {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
    letter-spacing: 0.01em;
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
    background: linear-gradient(135deg, #7C3AED, #9333EA);
}

.btn-add:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(107, 70, 193, 0.3);
}

.btn-add::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-add:hover::before {
    width: 300px;
    height: 300px;
}

.btn-add:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.6), 0 0 50px rgba(167, 139, 250, 0.4);
}

.btn-add:active {
    transform: scale(0.95);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4), 0 0 100px rgba(107, 70, 193, 0.3);
    animation: slideUp3D 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp3D {
    from {
        transform: translateY(100px) rotateX(20deg) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateY(0) rotateX(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.modal-header h2 {
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Carrito */
.cart-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(107, 70, 193, 0.2);
    transform-style: preserve-3d;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.cart-item-controls button {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(107, 70, 193, 0.3);
    position: relative;
    overflow: hidden;
}

.cart-item-controls button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.cart-item-controls button:hover::before {
    width: 100px;
    height: 100px;
}

.cart-item-controls button:hover {
    background: var(--primary-color);
    transform: scale(1.2) rotateZ(360deg);
    box-shadow: 0 8px 20px rgba(107, 70, 193, 0.5);
}

.cart-item-controls span {
    font-weight: bold;
}

.cart-item-price {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.25rem 0;
    text-decoration: none !important;
    /* Asegurar que no haya texto tachado */
}

.cart-item-price del,
.cart-item-price s,
.cart-item-price strike {
    display: none !important;
    /* Ocultar cualquier precio tachado */
}

.cart-total {
    margin-bottom: 1rem;
}

.cart-total h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.2),
        2px 2px 10px rgba(107, 70, 193, 0.3),
        0 0 20px rgba(167, 139, 250, 0.2);
    transform-style: preserve-3d;
}

.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.5);
    transform: perspective(1000px) rotateX(0deg);
}

.btn-checkout::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-checkout:hover::before {
    width: 500px;
    height: 500px;
}

.btn-checkout:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(107, 70, 193, 0.7), 0 0 100px rgba(167, 139, 250, 0.4);
}

.btn-checkout:active {
    transform: perspective(1000px) rotateX(0deg) scale(0.98);
}

/* Estilos móviles para el carrito */
@media (max-width: 768px) {
    .cart-item {
        padding: 0.75rem 0;
        gap: 0.75rem;
    }

    .cart-item img {
        width: 70px;
        height: 70px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .cart-item-info {
        min-width: 0;
        flex: 1;
    }

    .cart-item-info h4 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }

    .cart-item-price {
        font-size: 0.75rem !important;
        margin: 0.2rem 0;
        color: var(--text-secondary);
        text-decoration: none !important;
        line-height: 1.4;
        word-break: break-word;
    }

    .cart-item-controls {
        gap: 0.75rem;
        margin-top: 0.4rem;
    }

    .cart-item-controls button {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .cart-item-controls span {
        font-size: 0.9rem;
        min-width: 20px;
        text-align: center;
    }

    .cart-total {
        margin-bottom: 0.75rem;
    }

    .cart-total h3 {
        font-size: 1.1rem !important;
        line-height: 1.4;
        margin: 0;
        word-break: break-word;
    }

    .btn-checkout {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Estilos adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    .cart-item-price {
        font-size: 0.7rem !important;
        margin: 0.15rem 0;
    }

    .cart-total h3 {
        font-size: 1rem !important;
        font-weight: 700;
    }

    .cart-item-info h4 {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }

    /* Inputs con font-size mínimo para evitar zoom en iOS */
    .checkout-form input,
    .checkout-form textarea,
    .checkout-form select,
    .products-search-input,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
        /* Evita zoom automático en iOS */
        -webkit-appearance: none;
        -moz-appearance: textfield;
    }

    /* Botones con tamaño mínimo táctil (44x44px) */
    .btn-add,
    .btn-submit,
    .btn-checkout,
    .btn-cancel,
    .category-btn,
    .cart-item-controls button {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .btn-add {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Mejorar scroll horizontal en móvil */
    .category-filters {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        touch-action: pan-x;
    }

    /* Ajustar admin trigger para pantallas pequeñas */
    .admin-trigger {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }

    /* Modal en pantallas pequeñas */
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        max-width: 100%;
        width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Modal de checkout específicamente en móvil */
    #checkoutModal {
        padding: 0;
        align-items: flex-end;
    }

    #checkoutModal.active {
        animation: fadeIn 0.3s ease-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .checkout-content {
        max-height: 100vh;
        height: 100vh;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 0;
        animation: slideUpMobile 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        margin: 0;
        /* Modal a pantalla completa con header arriba */
    }

    .checkout-content .modal-header {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
        padding-top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
        z-index: 10;
        border-bottom: 2px solid rgba(107, 70, 193, 0.1);
        box-shadow: 0 2px 8px rgba(107, 70, 193, 0.1);
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        /* Header fijo arriba de la pantalla, elegante y centrado */
    }

    .checkout-content .modal-header h2 {
        font-size: 1.3rem;
        font-weight: 600;
        margin: 0;
        padding: 0;
        line-height: 1.4;
        color: var(--primary-color);
        text-shadow: 0 2px 4px rgba(107, 70, 193, 0.2);
        letter-spacing: 0.3px;
        text-align: center;
        flex: 1;
    }

    .checkout-content .modal-header .modal-close {
        padding: 0.15rem;
        font-size: 1rem;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .checkout-content .modal-body {
        flex: 1 1 auto;
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
        padding-top: calc(3rem + env(safe-area-inset-top, 0px));
        padding-bottom: 12rem;
        /* Espacio para el header fijo y espacio extra al final para scroll y botón */
        scroll-behavior: smooth;
        min-height: 0;
        max-height: 100%;
        /* Asegurar que el scroll funcione */
        position: relative;
        margin-top: 0;
    }

    .checkout-form {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .checkout-form .form-group {
        margin-bottom: 0;
        animation: fadeInUp 0.3s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mejorar selects en móvil para mejor accesibilidad */
    .checkout-form select {
        font-size: 1.1rem;
        padding: 1rem;
        min-height: 48px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b46c1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 12px;
        padding-right: 3rem;
        touch-action: manipulation;
    }

    .checkout-form input[type="text"],
    .checkout-form input[type="email"],
    .checkout-form input[type="tel"] {
        font-size: 1rem;
        padding: 1rem;
        min-height: 48px;
        touch-action: manipulation;
    }

    .checkout-form textarea {
        font-size: 1rem;
        padding: 1rem;
        min-height: 80px;
        resize: vertical;
        touch-action: manipulation;
    }

    /* Asegurar que los radio buttons se vean bien en móvil */
    .radio-group-3d {
        flex-direction: column;
        gap: 0.75rem;
    }

    .radio-option-3d {
        min-width: 100%;
        touch-action: manipulation;
    }

    /* Campos que aparecen dinámicamente */
    .checkout-form .form-group[style*="display: block"] {
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            max-height: 500px;
            transform: translateY(0);
        }
    }

    /* Footer del modal de checkout en móvil */
    .checkout-content .modal-footer,
    #checkoutModal .modal-footer {
        flex-shrink: 0;
        padding: 1rem;
        background: white;
        border-top: 2px solid #e5e7eb;
        position: sticky;
        bottom: 0;
        z-index: 10;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Botón de submit en móvil */
    .checkout-form .btn-submit {
        width: 100%;
        padding: 1.25rem;
        font-size: 1.1rem;
        min-height: 52px;
        touch-action: manipulation;
        box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
    }

    /* Asegurar que el formulario tenga espacio para el botón */
    .checkout-form {
        padding-bottom: 10rem;
        /* Espacio suficiente para que todos los campos sean visibles y el botón esté más abajo */
    }

    /* Más espacio antes del botón para que quede elegante */
    .checkout-form .form-actions {
        margin-top: 4rem;
        padding-top: 2rem;
    }

    /* Indicador visual de que hay más contenido */
    .checkout-content .modal-body::-webkit-scrollbar {
        width: 6px;
    }

    .checkout-content .modal-body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .checkout-content .modal-body::-webkit-scrollbar-thumb {
        background: #6b46c1;
        border-radius: 10px;
    }

    .checkout-content .modal-body::-webkit-scrollbar-thumb:hover {
        background: #553c9a;
    }

    /* Form actions en móvil */
    .checkout-form .form-actions {
        margin-top: 4rem;
        padding-top: 2rem;
        border-top: 2px solid #e5e7eb;
        position: relative;
        /* Cambiar de sticky a relative para que el scroll funcione */
        background: white;
        z-index: 5;
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
        /* Asegurar que el botón no bloquee el contenido y quede elegante */
    }

    /* Mejorar visibilidad de labels */
    .checkout-form label {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        display: block;
    }

    /* Help text */
    .form-help {
        display: block;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        color: #6b7280;
    }

    /* Mejorar táctil en product cards */
    .product-card {
        touch-action: manipulation;
    }

    /* Asegurar que los botones del carrito sean táctiles */
    .cart-item-controls button {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 1rem;
    }
}

/* Checkout Form */
.checkout-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.checkout-content .modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}

.checkout-form .form-group {
    margin-bottom: 1.5rem;
}

.checkout-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.05),
        0 0 10px rgba(107, 70, 193, 0.1);
    transform-style: preserve-3d;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
    transform-style: preserve-3d;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow:
        0 0 0 3px rgba(107, 70, 193, 0.1),
        0 4px 15px rgba(107, 70, 193, 0.2);
    transform: perspective(1000px) rotateX(2deg);
}

.checkout-form input:hover,
.checkout-form textarea:hover,
.checkout-form select:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(107, 70, 193, 0.1);
}

.form-actions {
    margin-top: 2rem;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.5);
    transform: perspective(1000px) rotateX(0deg);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 500px;
    height: 500px;
}

.btn-submit:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(107, 70, 193, 0.7), 0 0 100px rgba(167, 139, 250, 0.4);
}

.btn-submit:active {
    transform: perspective(1000px) rotateX(0deg) scale(0.98);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.shipping-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shipping-badge {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.shipping-badge strong {
    font-weight: 700;
}

/* Radio Buttons 3D */
.radio-group-3d {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option-3d {
    flex: 1;
    min-width: 200px;
    cursor: pointer;
    position: relative;
}

.radio-option-3d input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label-3d {
    display: block;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    transform: perspective(800px) rotateX(0deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.radio-label-3d:hover {
    transform: perspective(800px) rotateX(10deg) translateY(-5px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.3);
}

.radio-option-3d input[type="radio"]:checked+.radio-label-3d {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    transform: perspective(800px) rotateX(0deg) scale(1.05);
    box-shadow: 0 8px 30px rgba(107, 70, 193, 0.5), 0 0 50px rgba(167, 139, 250, 0.3);
}

/* Payment Info 3D */
.payment-info-3d {
    transform-style: preserve-3d;
}

.payment-info-3d label {
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(107, 70, 193, 0.2);
}

/* File Upload Preview */
.file-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(107, 70, 193, 0.05);
    border-radius: 10px;
    display: none;
    transform-style: preserve-3d;
}

.file-preview img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.checkout-form input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed rgba(107, 70, 193, 0.3);
    border-radius: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.checkout-form input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(107, 70, 193, 0.05);
}

.btn-cancel {
    width: 100%;
    background: #e5e7eb;
    color: var(--text-primary);
    border: none;
    padding: 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateX(0deg);
}

.btn-cancel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-cancel:hover::before {
    width: 500px;
    height: 500px;
}

.btn-cancel:hover {
    background: #d1d5db;
    transform: perspective(1000px) rotateX(5deg) translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-cancel:active {
    transform: perspective(1000px) rotateX(0deg) scale(0.98);
}

/* Admin Trigger */
.admin-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(107, 70, 193, 0.3);
    }

    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 40px rgba(107, 70, 193, 0.6);
    }
}

.admin-trigger:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.2) rotateZ(360deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(107, 70, 193, 0.8);
}

/* Admin Modal - Panel Container */
.admin-panel-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 2001;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.admin-panel-container.active {
    display: flex;
}

/* Admin Header Fijo */
.admin-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #6B46C1, #8B5CF6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.admin-header-content {
    max-width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-header h2 {
    color: white;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.admin-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
}

.admin-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.admin-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
}

/* Admin Main Container */
.admin-main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-sidebar-content {
    padding: 2rem 0;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    width: 100%;
}

.admin-menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.admin-menu-item.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.admin-menu-icon {
    font-size: 1.5rem;
}

.admin-menu-text {
    font-weight: 600;
}

/* Admin Content Area */
.admin-content-area {
    flex: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
}

.admin-view {
    display: none;
    animation: slideInView 0.3s ease;
}

@keyframes slideInView {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-view.active {
    display: block;
}

.admin-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-view-header h3 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Admin Content */
.admin-content {
    max-width: 900px;
}

.admin-form-container {
    padding: 1.5rem;
}

.admin-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-section h3 {
    color: var(--primary-color);
}

.btn-add-product {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(107, 70, 193, 0.4);
}

.btn-add-product::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-add-product:hover::before {
    width: 300px;
    height: 300px;
}

.btn-add-product:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.6), 0 0 50px rgba(167, 139, 250, 0.4);
}

.admin-products-list {
    display: grid;
    gap: 1rem;
}

.admin-product-card {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.1), rgba(139, 92, 246, 0.05));
    backdrop-filter: blur(20px) saturate(180%);
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    overflow: hidden;
}

.admin-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            rgba(139, 92, 246, 0) 0%,
            rgba(139, 92, 246, 0.5) 50%,
            rgba(139, 92, 246, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.admin-product-card:hover::before {
    opacity: 1;
}

.admin-product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(107, 70, 193, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 40px rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.4);
}

.admin-product-image {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 3px;
}

.admin-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-product-card:hover .admin-product-image img {
    transform: scale(1.08);
}

.admin-product-info {
    flex: 1;
    min-width: 0;
}

.admin-product-info h4 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.admin-product-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.admin-product-price {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0.5rem 0 0.5rem 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(107, 70, 193, 0.2));
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.admin-product-category {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0.5rem 0 0 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-product-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    align-self: stretch;
}

.btn-edit,
.btn-delete,
.btn-duplicate {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.btn-edit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
    color: white;
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-edit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-edit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-edit:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(29, 78, 216, 1));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-duplicate {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    color: white;
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-duplicate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-duplicate:hover::before {
    width: 300px;
    height: 300px;
}

.btn-duplicate:hover {
    background: linear-gradient(135deg, rgba(5, 150, 105, 1), rgba(4, 120, 87, 1));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    color: white;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-delete::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-delete:hover::before {
    width: 300px;
    height: 300px;
}

.btn-delete:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 1), rgba(185, 28, 28, 1));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.product-form-content {
    max-width: 600px;
}

/* Admin Search */
.admin-filters {
    width: 100%;
}

.admin-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.admin-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.admin-search-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

/* Upload Button */
.btn-upload {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-upload:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-upload:active {
    transform: translateY(0);
}

/* Image Preview Grid */
.image-preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
    min-height: 150px;
    background: rgba(107, 70, 193, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    background: rgba(107, 70, 193, 0.1);
    min-height: 150px;
    transition: opacity 0.3s ease;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
    opacity: 1 !important;
}

.image-preview-item img[src=""],
.image-preview-item img:not([src]) {
    background: rgba(107, 70, 193, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-item img[src=""]::after,
.image-preview-item img:not([src])::after {
    content: "📷";
    font-size: 2rem;
    opacity: 0.5;
}

.image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #EF4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.image-preview-remove:hover {
    background: #DC2626;
    transform: scale(1.1);
}

/* Product Form Inline */
#productFormInline {
    margin-bottom: 2rem;
}

#productFormInline>div {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.15), rgba(139, 92, 246, 0.15));
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow:
        0 20px 60px rgba(107, 70, 193, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#productFormInline>div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            #8B5CF6 0%,
            #A78BFA 25%,
            #C4B5FD 50%,
            #A78BFA 75%,
            #8B5CF6 100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#productFormInline h3 {
    background: linear-gradient(135deg, #FFFFFF, #E0E7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.5);
    letter-spacing: 0.5px;
    margin: 0;
}

/* Form Groups */
.product-form .form-group {
    margin-bottom: 1.8rem;
}

.product-form label {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.product-form input,
.product-form textarea,
.product-form select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-form input::placeholder,
.product-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.product-form input:focus,
.product-form textarea:focus,
.product-form select:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 4px rgba(167, 139, 250, 0.1),
        0 8px 25px rgba(107, 70, 193, 0.3),
        inset 0 2px 10px rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.product-form input:hover:not(:focus),
.product-form textarea:hover:not(:focus),
.product-form select:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.product-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.product-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.product-form select option {
    background: #1F2937;
    color: white;
    padding: 1rem;
}

.product-form small {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

#productFormInline #imagePreviewContainer {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    min-height: 150px;
}

#imagePreviewContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    min-height: 150px;
}

/* Action Buttons */
#productFormInline .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

#productFormInline .btn-submit {
    flex: 2;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    letter-spacing: 0.5px;
}

#productFormInline .btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#productFormInline .btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

#productFormInline .btn-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

#productFormInline .btn-submit:active {
    transform: translateY(-1px) scale(0.98);
}

#productFormInline .btn-cancel {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

#productFormInline .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#productFormInline .btn-cancel:active {
    transform: translateY(-1px);
}

/* Category Modal Inline */
#categoryModalInline {
    margin-bottom: 2rem;
}

#categoryModalInline>div {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.15), rgba(139, 92, 246, 0.15));
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow:
        0 20px 60px rgba(107, 70, 193, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#categoryModalInline>div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            #8B5CF6 0%,
            #A78BFA 25%,
            #C4B5FD 50%,
            #A78BFA 75%,
            #8B5CF6 100%);
    animation: shimmer 3s infinite;
}

#categoryModalInline h3 {
    background: linear-gradient(135deg, #FFFFFF, #E0E7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.5);
    letter-spacing: 0.5px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #productFormInline>div {
        padding: 1.5rem;
    }

    #productFormInline .form-actions {
        flex-direction: column;
    }

    #productFormInline .btn-submit,
    #productFormInline .btn-cancel {
        width: 100%;
    }

    #categoryModalInline>div {
        padding: 1.5rem;
    }
}

/* Admin Settings */
.admin-settings-content {
    max-width: 600px;
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.setting-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.setting-group input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.setting-group input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.setting-group small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Admin Analytics */
.admin-analytics-content {
    max-width: 900px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(107, 70, 193, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Orders */
.admin-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.order-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.2);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-number {
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
}

.order-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.preparando {
    background: #F59E0B;
    color: white;
}

.order-status.enviado {
    background: #10B981;
    color: white;
}

.order-status.entregado {
    background: #6366F1;
    color: white;
}

.order-details {
    color: rgba(255, 255, 255, 0.9);
}

.order-details p {
    margin: 0.5rem 0;
}

.order-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .navbar {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-icon-3d {
        font-size: 2.5rem;
    }

    .logo-text {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .search-container {
        display: none;
    }

    .drawer {
        width: 280px;
    }

    .cart-btn {
        font-size: 1.8rem;
    }

    .category-filters-navbar {
        padding: 0.3rem 0.5rem;
        gap: 0.4rem;
        justify-content: flex-start;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .category-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }

    .carousel-item {
        width: 200px;
        height: 250px;
    }

    .carousel-3d {
        height: 300px;
        animation: none;
    }

    .hero-section {
        overflow-x: hidden;
        /* Aislar el hero section para evitar que afecte al resto */
        contain: layout style paint;
        isolation: isolate;
    }

    .carousel-container {
        overflow: hidden;
        position: relative;
        height: 50vh;
        max-height: 400px;
        width: 100%;
        /* Optimizar para móvil - menos GPU acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: auto;
        /* Reducir will-change en móvil */
        contain: layout style paint;
        isolation: isolate;
    }

    .carousel-3d {
        position: relative;
        width: 100%;
        height: 100%;
        animation: none;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        /* Aislar rendering */
        contain: layout style paint;
        isolation: isolate;
        will-change: auto;
        /* Reducir will-change en móvil */
    }

    .carousel-item {
        min-width: 70%;
        max-width: 280px;
        width: 70%;
        height: 350px;
        border-radius: 25px;
        overflow: hidden;
        box-shadow:
            0 15px 35px rgba(107, 70, 193, 0.3),
            0 8px 20px rgba(0, 0, 0, 0.2);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.5);
        pointer-events: auto;
        /* Forzar GPU acceleration y aislar rendering */
        will-change: transform, opacity;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        contain: layout style paint;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .carousel-item[style*="opacity: 0"] {
        pointer-events: none;
    }

    .carousel-item:active {
        transform: translate(-50%, -50%) scale(0.96) translateZ(0) !important;
    }

    /* Optimizar transiciones para evitar parpadeo */
    .carousel-item {
        transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            opacity 1.5s ease !important;
    }

    .carousel-item img {
        width: 100%;
        height: 70%;
        object-fit: cover;
        padding: 0;
        transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        filter: brightness(1) contrast(1);
    }

    .carousel-item:hover img {
        transform: scale(1.05);
        filter: brightness(1.03) contrast(1.03);
    }

    .carousel-item-info {
        height: 30%;
        padding: 1rem;
        background: linear-gradient(to top, rgba(107, 70, 193, 0.95), rgba(139, 92, 246, 0.9));
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .carousel-item-info h3 {
        font-size: 0.95rem;
        line-height: 1.3;
        text-align: center;
        margin: 0;
        color: white;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        font-weight: 600;
        letter-spacing: 0.2px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }


    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-filters {
        gap: 0.5rem;
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }

    .category-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }

.product-card img {
    height: 180px;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}

/* Botón para ver imagen (overlay en tarjeta) */
.view-image-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    border: none;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 5;
}

.view-image-btn:hover {
    background: rgba(17, 24, 39, 0.9);
}

    .product-card-info {
        padding: 1rem;
    }

    .product-card h3 {
        font-size: 1rem;
    }

    .product-card p {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .admin-trigger {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Admin Panel Responsive */
    .admin-menu-toggle {
        display: flex;
    }

    .admin-header-content {
        padding: 0.75rem;
    }

    .admin-header h2 {
        font-size: 1.2rem;
        flex: 1;
        text-align: center;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 60px;
        bottom: 0;
        width: 280px;
        z-index: 200;
        transition: left 0.3s ease;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-content-area {
        padding: 1rem;
        width: 100%;
    }

    .admin-view-header {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-view-header h3 {
        font-size: 1.2rem;
    }

    .btn-add-product {
        width: 100%;
    }

    .admin-product-card {
        padding: 1rem;
    }

    .admin-product-image {
        width: 100px;
        height: 100px;
    }

    .admin-product-info h4 {
        font-size: 1rem;
    }

    .hero-section {
        min-height: 40vh;
        padding: 0 1rem;
    }

    .products-section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 2rem;
        padding: 0.75rem;
        top: 60px;
        background-color: rgba(99, 102, 241, 0.98);
    }

    .products-search-container {
        margin-bottom: 1.5rem;
        padding: 0.75rem 0.5rem 0.5rem 0.5rem;
        top: 120px;
    }

    .products-search-input {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .logo-icon-3d {
        font-size: 2rem;
    }

    .logo-text {
        display: none;
    }

    .cart-btn {
        font-size: 1.5rem;
    }

    .carousel-container {
        height: 45vh;
        max-height: 350px;
    }

    .carousel-item {
        min-width: 70%;
        max-width: 260px;
        width: 70%;
        height: 320px;
    }

    .carousel-item img {
        height: 70%;
        width: 100%;
        object-fit: cover;
        padding: 0;
    }

    .carousel-item-info {
        height: 30%;
        padding: 0.8rem;
    }

    .carousel-item-info h3 {
        font-size: 0.85rem;
    }

    .carousel-3d {
        gap: 1.2rem;
        padding: 0.8rem;
    }


    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }

    .product-card img {
        height: 140px;
        max-width: 100%;
        object-fit: cover;
        object-position: center;
    }

    .product-card-info {
        padding: 0.75rem;
    }

    .product-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .product-card p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .btn-add {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
        top: 50px;
        padding: 0.5rem;
        background-color: rgba(99, 102, 241, 0.98);
    }

    .products-section {
        padding: 1.5rem 0.5rem;
    }

    .products-search-container {
        margin-bottom: 1rem;
        padding: 0.5rem 0.25rem 0.5rem 0.25rem;
        top: 90px;
    }

    .products-search-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
    }

    /* Admin Panel Mobile Responsive */
    .admin-panel-container {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        left: -100%;
        width: 100%;
        max-width: 280px;
        height: 100%;
        top: 0;
        z-index: 2002;
        transition: left 0.3s ease;
        background: rgba(30, 27, 75, 0.98);
        backdrop-filter: blur(20px);
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-content-area {
        padding: 0.75rem;
        width: 100%;
    }

    /* Overlay para cerrar sidebar en móvil */
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 2001;
    }

    .admin-sidebar.active~.admin-sidebar-overlay,
    .admin-sidebar-overlay.active {
        display: block;
    }

    /* Mejorar botones del admin en móvil */
    .admin-menu-item,
    .btn-add-product {
        min-height: 44px;
        touch-action: manipulation;
        padding: 0.875rem 1rem;
    }

    /* Formularios admin en móvil */
    .admin-form-container input,
    .admin-form-container textarea,
    .admin-form-container select {
        font-size: 16px !important;
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Mejorar navbar en móvil */
    .nav-right {
        gap: 0.5rem;
    }

    .cart-btn {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .admin-product-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-product-image {
        width: 100%;
        height: 200px;
    }

    .admin-product-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .btn-edit,
    .btn-delete,
    .btn-duplicate {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .admin-product-info h4 {
        font-size: 1rem;
    }

    .admin-product-price {
        font-size: 1.2rem;
    }
}

/* Mejoras adicionales de responsividad */
@media (max-width: 375px) {
    .product-detail-image-wrapper {
        height: 460px;
        min-height: 460px;
        max-height: 460px;
        padding: 0.15rem;
    }

    .product-image-carousel-wrapper {
        position: relative;
        width: 100%;
    }

    .product-image-carousel {
        height: 100%;
    }

    .carousel-nav-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 1.8rem;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .product-detail-image {
        width: calc(100% - 0.3rem) !important;
        height: calc(100% - 0.3rem) !important;
    }

    .nav-container {
        padding: 0 0.45rem;
    }

    .logo-icon-3d {
        font-size: 2.2rem;
    }

    .cart-btn {
        font-size: 1.6rem;
    }
}

@media (min-width: 375px) and (max-width: 480px) {
    .product-detail-image-wrapper {
        height: 500px;
        min-height: 500px;
        max-height: 500px;
        padding: 0.15rem;
    }

    .product-image-carousel {
        height: 100%;
    }

    .product-detail-image {
        width: calc(100% - 0.3rem) !important;
        height: calc(100% - 0.3rem) !important;
    }
}

/* Footer */
.footer {
    margin-top: 4rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 1rem 1rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(167, 139, 250, 0.2);
    transform-style: preserve-3d;
    transform: perspective(600px) rotateX(10deg);
    display: inline-block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.footer-contact h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(255, 255, 255, 0.2);
    transform-style: preserve-3d;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Product Detail Modal */
.product-detail-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    transform: none !important;
    will-change: auto;
}

.product-detail-content .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-detail-content .modal-close:hover {
    background: rgba(107, 70, 193, 0.9);
    color: white;
    transform: scale(1.1) rotate(90deg);
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .modal {
        overflow-y: auto;
    }

    .modal-content {
        animation: slideUpMobile 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .product-detail-content {
        max-width: 95%;
        max-height: none;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .product-detail-image-wrapper {
        min-height: 350px;
        padding: 1rem;
        transform: none !important;
        position: static !important;
        border-radius: 15px;
    }

    .product-image-carousel {
        height: 350px;
        border-radius: 15px;
        touch-action: pan-x;
    }

    .product-image-slide {
        touch-action: none;
    }

    .product-detail-image {
        max-height: 350px;
        transform: none !important;
        width: 100%;
        object-fit: cover;
    }

    .carousel-dots {
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .carousel-dot {
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
        touch-action: manipulation;
    }

    .product-detail-header h2 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .product-detail-price {
        font-size: 2.2rem;
    }

    .btn-detail-buy {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .product-detail-content .modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 0;
        overflow-y: hidden;
        overflow-x: hidden;
    }

    .modal-content {
        animation: slideUpMobile 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-radius: 0;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
    }

    .product-detail-content {
        max-width: 100%;
        max-height: 100vh;
        padding: 0;
        overflow: hidden;
        box-sizing: border-box;
        background: #000;
    }

    .product-detail-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        width: 100%;
        height: 100vh;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
    }

    .product-detail-left {
        width: 100%;
        height: 100vh;
        overflow: hidden;
        position: relative;
    }

    .product-detail-right {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
        padding: 1.5rem 1.25rem 1.25rem 1.25rem;
        z-index: 100;
    }

    .product-detail-image-wrapper {
        height: 100vh;
        padding: 0;
        transform: none !important;
        position: relative !important;
        border-radius: 0;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        background: #000;
        margin: 0;
        transition: none !important;
        will-change: auto;
    }

    .product-detail-image-wrapper:hover {
        transform: none !important;
    }

    .product-image-carousel {
        height: 100%;
        width: 100%;
        border-radius: 0;
        touch-action: pan-x;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .product-image-slide {
        touch-action: none;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .product-image-slide.active {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        position: relative !important;
    }

    .product-detail-image {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        transform: none !important;
        border-radius: 0;
        display: block;
        margin: 0 auto;
        position: relative;
        padding: 0;
    }

    .product-image-slide.active .product-detail-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .carousel-dots {
        position: absolute;
        bottom: 160px;
        left: 50%;
        transform: translateX(-50%);
        gap: 0.6rem;
        padding: 0.75rem 1rem;
        justify-content: center;
        flex-wrap: nowrap;
        align-items: center;
        z-index: 200;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        border-radius: 25px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
        flex-shrink: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
        cursor: pointer;
        border: 2px solid transparent;
    }

    .carousel-dot.active {
        background: white;
        width: 24px;
        height: 6px;
        border-radius: 3px;
        border: 2px solid transparent;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    .carousel-dot:hover {
        background: rgba(255, 255, 255, 0.6);
    }

    .product-detail-header {
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        margin-bottom: 0.5rem;
    }

    .product-detail-header h2 {
        font-size: 1rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        margin-bottom: 0.4rem;
        color: white;
        font-weight: 600;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
        letter-spacing: 0;
    }

    .product-detail-category {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: rgba(255, 255, 255, 0.75);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.3rem;
        font-weight: 600;
    }

    .product-detail-price {
        font-size: 1.8rem;
        margin: 0.4rem 0;
        word-break: break-word;
        font-weight: 800;
        color: white;
        text-shadow: 0 3px 15px rgba(0, 0, 0, 0.7);
        letter-spacing: -0.01em;
    }

    .product-detail-description {
        display: none;
    }

    .product-detail-description p {
        margin: 0;
    }

    .product-variants {
        display: none;
    }

    .product-detail-actions {
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin-top: 1rem;
    }

    .btn-detail-buy {
        font-size: 1rem;
        padding: 1.1rem;
        width: 100%;
        border-radius: 15px;
        box-sizing: border-box;
        white-space: nowrap;
        font-weight: 700;
        letter-spacing: 0.5px;
        background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
        border: none;
        color: white;
        box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .btn-detail-buy::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .btn-detail-buy:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
    }

    .btn-detail-buy:active::before {
        left: 100%;
    }

    .product-detail-content .modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(15px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        position: fixed;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .product-detail-content .modal-close:hover {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Pantallas muy pequeñas (360px o menos) */
@media (max-width: 360px) {
    .product-detail-image-wrapper {
        height: 420px;
        min-height: 420px;
        max-height: 420px;
        padding: 0.15rem;
    }

    .product-image-carousel {
        height: 100%;
    }

    .product-detail-image {
        width: calc(100% - 0.3rem) !important;
        height: calc(100% - 0.3rem) !important;
    }

    .product-detail-header h2 {
        font-size: 1.25rem;
    }

    .product-detail-price {
        font-size: 1.7rem;
    }

    .btn-detail-buy {
        font-size: 0.98rem;
        padding: 0.95rem;
    }

    .variant-option {
        padding: 0.45rem 0.95rem;
        font-size: 0.75rem;
    }
}

/* Pantallas medianas (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .product-detail-content {
        padding: 0.75rem 1rem 1rem 1rem;
    }

    .product-detail-image-wrapper {
        min-height: 380px;
        padding: 1.5rem;
    }

    .product-image-carousel {
        height: 380px;
    }

    .product-detail-image {
        max-height: 380px !important;
    }

    .product-detail-header h2 {
        font-size: 1.5rem;
    }

    .product-detail-price {
        font-size: 2rem;
    }

    .variant-option {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .btn-detail-buy {
        font-size: 1.1rem;
        padding: 1.15rem;
    }
}

/* Orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .product-detail-image-wrapper {
        min-height: 250px;
        padding: 0.9rem;
    }

    .product-image-carousel {
        height: 250px;
    }

    .product-detail-image {
        max-height: 250px !important;
    }

    .product-detail-content {
        padding: 0.4rem 0.6rem 0.6rem 0.6rem;
    }

    .product-detail-container {
        gap: 0.4rem;
    }

    .product-detail-header h2 {
        font-size: 1.25rem;
    }

    .product-detail-price {
        font-size: 1.7rem;
    }

    .btn-detail-buy {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
}

/* Pantallas extra pequeñas (320px o menos) */
@media (max-width: 320px) {
    .product-detail-image-wrapper {
        height: 380px;
        min-height: 380px;
        max-height: 380px;
        padding: 0.15rem;
    }

    .product-image-carousel {
        height: 100%;
    }

    .product-detail-image {
        width: calc(100% - 0.3rem) !important;
        height: calc(100% - 0.3rem) !important;
    }

    .product-detail-header h2 {
        font-size: 1.2rem;
    }

    .product-detail-price {
        font-size: 1.6rem;
    }

    .variant-option {
        padding: 0.4rem 0.85rem;
        font-size: 0.72rem;
    }

    .btn-detail-buy {
        font-size: 0.95rem;
        padding: 0.9rem;
    }

    .nav-container {
        padding: 0 0.4rem;
    }

    .category-filters-navbar {
        padding: 0.25rem 0.4rem;
        gap: 0.35rem;
    }

    .category-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.8rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

/* Pantallas grandes (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-detail-content {
        max-width: 90%;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-detail-image-wrapper {
        min-height: 400px;
    }

    .product-image-carousel {
        height: 400px;
    }
}

/* Altura pequeña (para móviles en landscape o pantallas pequeñas) */
@media (max-height: 600px) and (max-width: 768px) {
    .product-detail-image-wrapper {
        min-height: 200px;
        padding: 0.75rem;
    }

    .product-image-carousel {
        height: 200px;
    }

    .product-detail-image {
        max-height: 200px !important;
    }

    .product-detail-content {
        padding: 0.3rem 0.5rem 0.5rem 0.5rem;
    }

    .product-detail-container {
        gap: 0.35rem;
    }

    .product-detail-header h2 {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    .product-detail-price {
        font-size: 1.6rem;
        margin: 0.3rem 0;
    }

    .product-variants {
        margin: 0.4rem 0;
    }

    .btn-detail-buy {
        padding: 0.8rem;
        font-size: 0.95rem;
        margin-top: 0.5rem;
    }
}

.product-detail-left {
    position: relative;
}

.product-detail-image-wrapper {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    min-height: 450px;
    overflow: hidden;
    transform: none !important;
    position: relative;
    will-change: auto;
}

.product-image-carousel-wrapper {
    position: relative;
    width: 100%;
}

.product-image-carousel {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    display: flex;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Botones de navegación del carrusel */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(107, 70, 193, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    touch-action: manipulation;
    min-width: 50px;
    min-height: 50px;
}

.carousel-nav-btn:hover {
    background: rgba(107, 70, 193, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.5);
}

.carousel-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.product-image-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.product-image-slide.active {
    opacity: 1;
    position: relative;
}

.product-detail-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 15px;
    transition: transform 0.3s;
}

.product-detail-image:hover {
    transform: scale(1.05);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    background: rgba(107, 70, 193, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: rgba(107, 70, 193, 0.6);
}

.product-detail-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-detail-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.1),
        2px 2px 10px rgba(107, 70, 193, 0.3),
        0 0 20px rgba(167, 139, 250, 0.2);
    transform-style: preserve-3d;
}

.product-detail-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.product-detail-price {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow:
        2px 2px 0px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(139, 92, 246, 0.4);
    transform-style: preserve-3d;
}

.product-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.product-variants h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(107, 70, 193, 0.2);
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.variant-option {
    padding: 0.5rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.variant-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.variant-option.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
}

.product-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-detail-buy {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.5);
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateX(0deg);
}

.btn-detail-buy::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-detail-buy:hover::before {
    width: 500px;
    height: 500px;
}

.btn-detail-buy:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(107, 70, 193, 0.7), 0 0 100px rgba(167, 139, 250, 0.4);
}

.btn-detail-buy:active {
    transform: perspective(1000px) rotateX(0deg) scale(0.98);
}

.btn-detail-wishlist {
    width: 100%;
    padding: 1.2rem;
    background: white;
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(107, 70, 193, 0.2);
    transform: perspective(1000px) rotateX(0deg);
}

.btn-detail-wishlist::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(107, 70, 193, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-detail-wishlist:hover::before {
    width: 500px;
    height: 500px;
}

.btn-detail-wishlist:hover {
    background: var(--primary-color);
    color: white;
    transform: perspective(1000px) rotateX(5deg) translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.6);
}

.btn-detail-wishlist:active {
    transform: perspective(1000px) rotateX(0deg) scale(0.98);
}
.category-filters-navbar .category-btn:first-child {
    position: sticky;
    left: 0;
    z-index: 5; /* que quede encima al deslizar */
    background-clip: padding-box; /* evita artefactos visuales en el borde */
    /* separador sutil a la derecha para distinguir del resto al hacer scroll */
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* Scrollbar global estilo verde hacker */
html {
    scrollbar-width: thin;
    scrollbar-color: #00ff66 rgba(0, 20, 5, 0.35);
}
body::-webkit-scrollbar {
    width: 10px;
}
body::-webkit-scrollbar-track {
    background: rgba(0, 20, 5, 0.35);
}
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff66, #00cc55);
    border-radius: 8px;
    border: 2px solid rgba(0, 20, 5, 0.6);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.35);
}
body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ff66, #00ff99);
    box-shadow: 0 0 14px rgba(0, 255, 120, 0.6);
}

/* Scrollbar de la barra de categorías (horizontal) verde hacker */
.category-filters-navbar {
    scrollbar-width: thin;
    scrollbar-color: #00ff66 rgba(0, 20, 5, 0.35);
}
.category-filters-navbar::-webkit-scrollbar {
    height: 10px;
}
.category-filters-navbar::-webkit-scrollbar-track {
    background: rgba(0, 20, 5, 0.35);
    border-radius: 8px;
}
.category-filters-navbar::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #00ff66, #00cc55);
    border-radius: 8px;
    border: 2px solid rgba(0, 20, 5, 0.6);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.35);
}
.category-filters-navbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #00ff66, #00ff99);
    box-shadow: 0 0 14px rgba(0, 255, 120, 0.6);
}