* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.swal2-container .swal2-center .swal2-backdrop-show{
    position: relative;
    z-index: 10001;
}
:root {
    /* Colores corporativos — tonos más vibrantes y modernos */
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-darker: #c2410c;
    --orange-light: #fff7ed;
    --orange-lighter: #fffbf5;

    --green: #16a34a;
    --green-dark: #15803d;
    --green-darker: #166534;
    --green-light: #f0fdf4;
    --green-lighter: #f7fef9;

    /* Grises profesionales */
    --gray-50: #fafaf9;
    --gray-100: #f5f5f4;
    --gray-200: #e7e5e4;
    --gray-300: #d6d3d1;
    --gray-400: #a8a29e;
    --gray-500: #78716c;
    --gray-600: #57534e;
    --gray-700: #44403c;
    --gray-800: #292524;
    --gray-900: #1c1917;

    /* Sombras — más suaves y modernas */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    --shadow-orange: 0 8px 24px -4px rgba(249, 115, 22, 0.25);
    --shadow-green: 0 8px 24px -4px rgba(22, 163, 74, 0.25);

    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Espaciados */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Bordes */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-2xl: 16px;
    --radius-full: 30px;
}

/* ========== ANIMACIONES GLOBALES ========== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse-orange {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.35);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
    }
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(22, 163, 74, 0);
    }
}

@keyframes shimmer-white {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ========== ESTILOS BASE ========== */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(249, 115, 22, 0.03) 0%, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(22, 163, 74, 0.03) 0%, transparent 45%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0v40M0 20h40' stroke='%23e7e5e4' stroke-width='.3' fill='none'/%3E%3C/svg%3E");
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

/* ========== TOP BAR CON AMBOS COLORES ========== */
.top-bar {
    height: 4px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: repeating-linear-gradient(90deg,
            var(--orange) 0px,
            var(--orange) 33.33%,
            var(--green) 33.33%,
            var(--green) 66.66%,
            var(--orange) 66.66%,
            var(--orange) 100%);
    background-size: 300% 100%;
    animation: shimmer-white 4s infinite linear;
}

/* ========== HEADER PRINCIPAL ========== */
.main-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: none;
    transition: all var(--transition-normal);
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--orange), var(--green), var(--orange));
    opacity: 0.4;
}

.main-header.scrolled {
    /* Mantener el mismo padding para que points-card no se reacomode al paginar/buscar */
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.96);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.logo-container::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, transparent, var(--gray-300), transparent);
}

.logo-container img {
    height: 52px;
    object-fit: contain;
    transition: all var(--transition-normal);
    filter: drop-shadow(var(--shadow-sm));
}

.logo-container:hover img {
    transform: scale(1.05) rotate(1deg);
    filter: drop-shadow(var(--shadow-orange));
}

/* ========== BUSCADOR ========== */
.search-wrapper {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3.5rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1), var(--shadow-md);
    padding-left: 4rem;
}

.search-input:focus+.search-icon {
    color: var(--orange);
    transform: translateY(-50%) scale(1.1);
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    display: none;
    transition: all var(--transition-fast);
    z-index: 2;
    border-radius: var(--radius-full);
}

.search-clear:hover {
    color: var(--orange);
    background: var(--orange-light);
    transform: translateY(-50%) scale(1.1);
}

.search-input:not(:placeholder-shown)~.search-clear {
    display: block;
}

/* ========== MENÚ USUARIO ========== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--orange-light);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    color: var(--orange);
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: default;
    border: 1px solid rgba(249, 115, 22, 0.12);
}

.user-welcome i {
    font-size: 1.2rem;
    animation: pulse-orange 2s infinite;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: var(--radius-full);
}

.logout-btn:hover {
    color: var(--orange);
    transform: scale(1.1) rotate(5deg);
    background: var(--orange-light);
}

.auth-btn {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: white;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
    background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange-darker) 100%);
}

.auth-btn:hover::before {
    left: 100%;
}

/* ========== HERO BANNER CON CARRUSEL ========== */
.hero-banner {
    height: 350px;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Estilos base para las imágenes de fondo */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Por defecto (Desktop): mostrar desktop, ocultar mobile */
.slide-bg-desktop {
    display: block;
}

.slide-bg-mobile {
    display: none;
}

@media (max-width: 800px) {
    .slide-bg-desktop {
        display: none !important;
    }
    
    .slide-bg-mobile {
        display: block !important;
        background-size: 100% auto !important;  /* ← Ancho completo, alto automático */
        background-repeat: no-repeat !important;
        background-position: center top !important;
    }

}

/* Gradiente opcional sobre las imágenes */
.slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.banner-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    animation: slideInLeft 0.8s ease-out;
}

.banner-subtitle {
    font-size: 1.2rem;
    opacity: 0.92;
    max-width: 600px;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* Botones carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    transition: all var(--transition-normal);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--orange);
    transform: translateY(-50%) scale(1.08);
    border-color: transparent;
    box-shadow: var(--shadow-orange);
}

.prev-btn {
    left: 2rem;
}

.next-btn {
    right: 2rem;
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.dot.active {
    background: var(--orange);
    width: 30px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-orange);
}

.dot:hover {
    background: var(--orange);
    transform: scale(1.15);
}

/* Ajustes responsivos para el carrusel */
@media (max-width: 800px) {
    .hero-banner {
        height: 300px;
    }
    
    .slide-content {
        padding: 0 2rem;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .prev-btn {
        left: 1rem;
    }
    
    .next-btn {
        right: 1rem;
    }
    
    .carousel-dots {
        bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 220px;
    }
    
    .banner-title {
        font-size: 1.5rem;
    }
    
    .banner-subtitle {
        font-size: 0.8rem;
    }
    
    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
}

/* ========== SECCIONES ========== */
.section {
    padding: 1rem 1rem;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--gray-800);
    position: relative;
    padding-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--green));
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.section-title:hover::before {
    width: 110px;
}

.view-all {
    color: var(--orange);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.95rem;
}

.view-all i {
    transition: transform var(--transition-fast);
}

.view-all:hover {
    background: var(--orange-light);
    gap: 0.75rem;
    color: var(--orange-dark);
}

.view-all:hover i {
    transform: translateX(5px);
}

.categories-carousel-wrapper {
    position: relative;
    margin-top: 0.5rem;
    padding: 0 2.5rem;
}

.categories-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem 1rem;
    scrollbar-width: none;
    text-align: center;
    justify-content: space-between;
}

.categories-carousel::-webkit-scrollbar {
    display: none;
}

.cat-card {
    flex: 0 0 170px;
    min-width: 170px;
    scroll-snap-align: start;
    border-radius: var(--radius-xl);
    padding: 1.25rem 1rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.cat-card::before {
    content: '';
    position: absolute;
    top: -25px;
    right: -25px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.cat-card::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.cat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.2);
}

.cat-card.cat-card-active {
    box-shadow: 0 0 0 3px white, 0 12px 28px -4px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.cat-card-img {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.cat-card-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card-icon-fallback i {
    font-size: 1.5rem;
    color: white;
}

.cat-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
    text-align: center;
}

.cat-card-text span {
    font-weight: 900;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-text small {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
}

.cat-scroll-btn:hover {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
    box-shadow: var(--shadow-orange);
}

.cat-scroll-left {
    left: -6px;
}

.cat-scroll-right {
    right: -6px;
}

/* ========== GRID DE PRODUCTOS ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* TARJETA DE PRODUCTO */
.product-card {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.product-card:nth-child(1) {
    animation-delay: 0.04s;
}

.product-card:nth-child(2) {
    animation-delay: 0.08s;
}

.product-card:nth-child(3) {
    animation-delay: 0.12s;
}

.product-card:nth-child(4) {
    animation-delay: 0.16s;
}

.product-card:nth-child(5) {
    animation-delay: 0.2s;
}

.product-card:nth-child(6) {
    animation-delay: 0.24s;
}

.product-card:nth-child(7) {
    animation-delay: 0.28s;
}

.product-card:nth-child(8) {
    animation-delay: 0.32s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(249, 115, 22, 0.3);
}

.product-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: white !important;
    padding: 0.35rem 0 !important;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transform: rotate(-45deg) !important;
    position: absolute !important;
    left: -38px !important;
    top: 18px !important;
    margin: 0 !important;
    z-index: 10 !important;
    box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.2);
    width: 150px !important;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}
.product-badge::before {
    display: none;
}
.product-badge::after {
    display: none;
}
@keyframes badge-wiggle {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(-2deg); }
}

/* CINTA DISPONIBLE adaptada a tarjetas móviles */
@media (max-width: 768px) {
    .product-badge {
        width: 130px !important;
        left: -32px !important;
        padding: 0.32rem 0 !important;
        font-size: 0.62rem;
        top: 15px !important;
    }

    /* Contenedor del badge (clase AJAX) — alineado a la derecha, sin pisar la imagen */
    .product-badge-flex-container {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding: 0.625rem 0.75rem !important;
        gap: 0 !important;
        min-height: 42px;
    }

    /* Div SIN clase que envuelve el badge en index.php (carga inicial) */
    .product-card > div:first-child:not(.product-image-container):not(.product-info):not(.product-footer) {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding: 0.625rem 0.75rem !important;
        gap: 0 !important;
        min-height: 42px;
    }

    /* El span DISPONIBLE dentro del flex no ocupa espacio (está en absolute) */
    .product-badge-flex-container .product-badge,
    .product-card > div:first-child .product-badge {
        flex: 0 0 0 !important;
    }

    /* Botón de puntos bien posicionado a la derecha */
    .points-badge-btn {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.7rem !important;
    }
}

@media (max-width: 480px) {
    .product-badge {
        width: 115px !important;
        left: -30px !important;
        padding: 0.3rem 0 !important;
        font-size: 0.56rem;
        letter-spacing: 0.2px;
        top: 13px !important;
    }

    .product-badge-flex-container,
    .product-card > div:first-child:not(.product-image-container):not(.product-info):not(.product-footer) {
        padding: 0.5rem 0.6rem !important;
        min-height: 38px;
    }

    .points-badge-btn {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}

@media (max-width: 380px) {
    .product-badge {
        width: 100px !important;
        left: -26px !important;
        font-size: 0.52rem;
        padding: 0.28rem 0 !important;
        top: 12px !important;
    }

    .points-badge-btn {
        font-size: 0.6rem !important;
        padding: 0.28rem 0.55rem !important;
    }
}

.product-image-container {
    background: linear-gradient(180deg, var(--gray-50) 0%, #ffffff 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    position: relative;
    overflow: hidden;
}

.product-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.04) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .product-image-container::before {
    opacity: 1;
}

.product-image {
    max-width: 110%;
    /*max-height: 220px;*/
    object-fit: contain;
    transition: all var(--transition-slow);
    filter: drop-shadow(var(--shadow-sm));
}

.product-card:hover .product-image {
    transform: scale(1.06) rotate(1deg);
    filter: drop-shadow(var(--shadow-md));
}

.product-info {
    padding: 1.25rem 1.5rem 1.5rem;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inventory-status {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inventory-status.alto {
    background: var(--green-light);
    color: var(--green-dark);
    border-left: 3px solid var(--green);
}

.inventory-status.medio {
    background: var(--orange-light);
    color: var(--orange-dark);
    border-left: 3px solid var(--orange);
}

.inventory-status.bajo {
    background: #fee2e2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
}

.product-code {
    font-size: 0.7rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.product-stock {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-value {
    font-weight: 800;
    color: var(--orange);
    font-size: 1rem;
}

.product-observations {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.view-details {
    background: var(--orange-light);
    color: var(--orange-dark);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1.5px solid rgba(249, 115, 22, 0.3);
    transition: all var(--transition-normal);
    cursor: pointer;
    flex: 1;
    justify-content: center;
}

.view-details i {
    transition: transform var(--transition-fast);
}

.product-card:hover .view-details {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
    box-shadow: var(--shadow-orange);
}

.product-card:hover .view-details i {
    transform: translateX(5px);
}

.redeem-btn {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: white;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    flex: 1;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.redeem-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.redeem-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-darker) 100%);
}

.redeem-btn:hover::before {
    left: 100%;
}

/* ========== PAGINACIÓN ========== */
.pagination-container {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--gray-600);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.pagination {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    min-width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--gray-700);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.page-btn:hover:not(:disabled) {
    background: var(--green);
    border-color: var(--green);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-color: var(--orange);
    color: white;
    box-shadow: var(--shadow-orange);
    transform: scale(1.05);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ========== NO RESULTS ========== */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    grid-column: 1 / -1;
    border: 1px solid var(--gray-200);
    animation: scaleIn 0.5s ease-out;
}

.no-results i {
    font-size: 4rem;
    color: var(--orange);
    margin-bottom: 1rem;
    animation: float 3s ease infinite;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.no-results p {
    color: var(--gray-500);
}

/* ========== FOOTER AGROCAMPO ========== */
.footer {
    color: var(--gray-800);
    background: white;
    padding: 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            #aed60b 0%, #aed60b 20%,
            #ed7102 20%, #ed7102 40%,
            #e42328 40%, #e42328 60%,
            #008c00 60%, #008c00 80%,
            #aed60b 80%, #aed60b 100%);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2rem;
    padding: 3rem 2rem 2rem;
}

.footer-logo-img {
    height: 48px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 0.625rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: #008c00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: #ed7102;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(237, 113, 2, 0.3);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 800;
    color: #008c00;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #ed7102, #f97316);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a i {
    width: 14px;
    color: #ed7102;
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: #ed7102;
    transform: translateX(3px);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact li i {
    width: 16px;
    color: #008c00;
    font-size: 0.85rem;
}

.footer-contact a {
    color: var(--gray-600);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: #008c00;
}

.footer-bottom {
    text-align: center;
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(0, 140, 0, 0.1);
    background: var(--gray-50);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--orange-light);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin-slow 0.8s linear infinite;
}

/* ========== MODAL DE AUTENTICACIÓN ========== */
#authModal {
    display: none !important;
}

#authModal.show {
    display: block !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.auth-modal {
    background: white;
    border-radius: 20px;
    min-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: bounceIn 0.5s ease-out;
    box-shadow: var(--shadow-2xl);
}

.modal-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--orange);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--orange);
    transform: rotate(90deg);
    background: var(--orange-light);
}

.modal-tabs {
    display: flex;
    border-bottom: 1.5px solid var(--gray-200);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-weight: 700;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.tab-btn.active {
    color: var(--orange);
    border-bottom: 2px solid var(--orange);
    margin-bottom: -1.5px;
}

.modal-body {
    padding: 1.5rem;
}

.auth-form {
    display: block;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkbox-group input {
    width: auto;
    margin-top: 0.2rem;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.terms-link {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.terms-link:hover {
    color: var(--green);
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
    background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange-darker) 100%);
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.3s ease;
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.success-message {
    background: var(--green-light);
    color: var(--green-dark);
    padding: 0.75rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.3s ease;
    border: 1px solid rgba(22, 163, 74, 0.1);
}

/* ========== MODAL DE PRODUCTO ========== */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.product-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.4s ease-out;
    box-shadow: var(--shadow-2xl);
}

.product-modal-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.product-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-800);
}

.product-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-close:hover {
    color: var(--orange);
    transform: rotate(90deg);
    background: var(--orange-light);
}

.product-modal-body {
    padding: 1.5rem;
}

.product-modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

/* ========== SCROLLBAR PERSONALIZADA ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--orange);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ========== UTILIDADES ========== */
.text-orange {
    color: var(--orange);
}

.text-green {
    color: var(--green);
}

.bg-orange-light {
    background: var(--orange-light);
}

.bg-green-light {
    background: var(--green-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1280px) {
    .section {
        padding: 3rem 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .main-header {
        padding: 0.875rem 1.5rem;
    }

    .banner-title {
        font-size: 2.8rem;
    }

    .hero-banner {
        height: 450px;
    }

    .section-title {
        font-size: 2rem;
    }

    ._old-cat-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    ._old-cat-img {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
    }

    .logo-container {
        flex: 0 0 auto;
    }

    .logo-container::after {
        display: none;
    }

    .logo-container img {
        height: 44px;
    }

    .search-wrapper {
        order: 3;
        margin: 0;
        max-width: 100%;
        flex: 0 0 100%;
    }

    /* MENÚ USUARIO MÓVIL — points-card siempre protagonista */
    .user-menu {
        flex: 1;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    /* SECTION HEADER MÓVIL — título compacto, no wrap, alineados */
    .section-header {
        flex-wrap: nowrap;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .section-title {
        font-size: 1.3rem;
        padding-bottom: 0.5rem;
        letter-spacing: -0.02em;
        flex: 1;
        min-width: 0;
    }

    .section-title::before {
        width: 50px;
        height: 2px;
    }

    .view-all {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .hero-banner {
        height: 380px;
    }

    .banner-title {
        font-size: 2rem;
    }

    .banner-subtitle {
        font-size: 1rem;
    }

    .slide-content {
        padding: 0 2rem;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .prev-btn {
        left: 1rem;
    }

    .next-btn {
        right: 1rem;
    }

    .carousel-dots {
        bottom: 1.5rem;
        gap: 0.75rem;
    }

    ._old-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    ._old-cat-card {
        padding: 1rem;
    }

    ._old-cat-img {
        width: 80px;
        height: 80px;
    }

    /* CATEGORÍAS CAROUSEL — compactas y bien proporcionadas en tablet */
    .categories-carousel-wrapper {
        padding: 0 0.25rem;
        margin-top: 0;
    }

    .categories-carousel {
        gap: 0.75rem;
        justify-content: flex-start;
        padding: 0.25rem 0.25rem 0.75rem;
    }

    .cat-card {
        padding: 0.9rem 0.75rem;
        min-width: 130px;
        gap: 0.6rem;
    }

    .cat-card-img {
        width: 56px;
        height: 56px;
    }

    .cat-card-text span {
        font-size: 0.85rem;
        white-space: normal;
    }

    .cat-card-text small {
        font-size: 0.68rem;
    }

    .cat-scroll-btn {
        display: none;
    }

    /* PRODUCTOS — 2 columnas en tablet con imágenes grandes */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-image-container {
        height: 240px;
        padding: 1.25rem;
    }

    .product-image {
        max-height: 100%;
        max-width: 100%;
    }

    .page-btn {
        min-width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }

    .pagination-info {
        font-size: 0.85rem;
    }

    .user-welcome span {
        display: none;
    }

    .user-welcome {
        padding: 0.5rem;
    }

    .auth-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .hero-banner {
        height: 220px;
    }

    .banner-title {
        font-size: 1.75rem;
    }

    .banner-subtitle {
        font-size: 0.9rem;
    }

    .slide-content {
        padding: 0 1.5rem;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    ._old-cat-grid {
        gap: 0.75rem;
    }

    ._old-cat-img {
        width: 70px;
        height: 70px;
    }

    ._old-cat-name {
        font-size: 0.85rem;
    }

    /* CATEGORÍAS — un poco más compactas pero aún visibles */
    .cat-card {
        min-width: 135px;
        padding: 1rem 0.875rem;
    }

    .cat-card-img {
        width: 64px;
        height: 64px;
    }

    .cat-card-text span {
        font-size: 0.88rem;
    }

    /* PRODUCTOS — mantener 2 columnas con imágenes grandes hasta muy pequeño */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .product-image-container {
        height: 200px;
        padding: 1rem;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 0.95rem;
    }

    .product-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .view-details,
    .redeem-btn {
        width: 100%;
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .pagination {
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .logo-container img {
        height: 38px;
    }

    .hero-banner {
        height: 220px;
    }

    .banner-title {
        font-size: 1.5rem;
    }

    .banner-subtitle {
        font-size: 0.8rem;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    ._old-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    ._old-cat-card {
        padding: 0.75rem;
    }

    ._old-cat-img {
        width: 60px;
        height: 60px;
    }

    /* CATEGORÍAS EN CELULAR — tamaño cómodo para tocar */
    .cat-card {
        min-width: 125px;
        padding: 0.9rem 0.75rem;
    }

    .cat-card-img {
        width: 58px;
        height: 58px;
    }

    .cat-card-text span {
        font-size: 0.82rem;
    }

    .cat-card-text small {
        font-size: 0.65rem;
    }

    /* PRODUCTOS — mantener 2 columnas con imágenes legibles */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-image-container {
        height: 170px;
        padding: 0.75rem;
    }

    .product-image {
        max-height: 100%;
        max-width: 100%;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-code {
        font-size: 0.7rem;
    }

    .view-details,
    .redeem-btn {
        font-size: 0.75rem;
        padding: 0.55rem 0.5rem;
    }

    .auth-modal {
        border-radius: var(--radius-xl);
        width: 90%;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    ._old-cat-grid {
        grid-template-columns: 1fr;
    }

    ._old-cat-card {
        max-width: 200px;
        margin: 0 auto;
    }

    /* CATEGORÍAS muy compactas pero aún legibles */
    .cat-card {
        min-width: 115px;
        padding: 0.8rem 0.65rem;
    }

    .cat-card-img {
        width: 54px;
        height: 54px;
    }

    .cat-card-text span {
        font-size: 0.78rem;
    }

    /* PRODUCTOS a 1 columna solo en pantallas muy chiquitas para que la imagen se vea bien */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .product-image-container {
        height: 240px;
    }

    .view-details,
    .redeem-btn {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .pagination-info {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
}

/* ========== ANIMACIONES DE ENTRADA ========== */
[data-animate="fadeInUp"] {
    animation: fadeInUp 0.6s ease-out forwards;
}

[data-animate="fadeInLeft"] {
    animation: slideInLeft 0.6s ease-out forwards;
}

[data-animate="fadeInRight"] {
    animation: slideInRight 0.6s ease-out forwards;
}

[data-animate="scaleIn"] {
    animation: scaleIn 0.5s ease-out forwards;
}

/* ========== EFECTOS HOVER ADICIONALES ========== */
.product-card,
._old-cat-card,
.page-btn,
.auth-btn,
.redeem-btn,
.view-details {
    will-change: transform;
}

/* ========== SOPORTE PARA REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== TARJETA DE PUNTOS ========== */
.points-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.points-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.points-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}

.points-card:hover::before {
    left: 100%;
}

.points-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.points-icon i {
    color: white;
    animation: pulse-orange 2s infinite;
}

/* Tier badge colors */
.points-icon.tier-bronze {
    background: rgba(205, 127, 50, 0.3);
}

.points-icon.tier-silver {
    background: rgba(192, 192, 192, 0.3);
}

.points-icon.tier-gold {
    background: rgba(255, 215, 0, 0.3);
}

.points-icon.tier-platinum {
    background: rgba(229, 228, 226, 0.35);
}

.points-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.points-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.points-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

/* ========== MODAL DE PUNTOS ========== */
.points-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
}

.points-modal.show {
    display: block;
}

.points-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.points-modal-container {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.4s ease-out;
    box-shadow: var(--shadow-2xl);
}

.points-modal-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.points-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--orange);
}

.points-modal-header h3 i {
    margin-right: 0.5rem;
}

.points-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.points-modal-close:hover {
    color: var(--orange);
    transform: rotate(90deg);
    background: var(--orange-light);
}

/* Balance de puntos */
.points-balance {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--orange-light) 0%, #fff5ea 100%);
    border-bottom: 1px solid var(--gray-200);
}

.balance-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(249, 115, 22, 0.08);
}

.balance-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-icon i {
    font-size: 2rem;
    color: white;
}

/* Balance tier colors */
.balance-icon.tier-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
}

.balance-icon.tier-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a9a9a9 100%);
}

.balance-icon.tier-gold {
    background: linear-gradient(135deg, #ffd700 0%, #daa520 100%);
}

.balance-icon.tier-platinum {
    background: linear-gradient(135deg, #e5e4e2 0%, #b8b8b8 100%);
}

.balance-info {
    flex: 1;
}

.balance-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
    display: inline-block;
    margin-right: 0.5rem;
}

.balance-unit {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.balance-tier {
    margin-top: 0.5rem;
}

.tier-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.tier-name.tier-bronze { color: #cd7f32; }
.tier-name.tier-silver { color: #808080; }
.tier-name.tier-gold { color: #daa520; }
.tier-name.tier-platinum { color: #8e8e8e; }
.tier-name.tier-default { color: var(--orange); }

.points-equivalence {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.points-equivalence i {
    color: var(--green);
    margin-right: 0.5rem;
}

.points-equivalence strong {
    color: var(--green);
    font-size: 1.1rem;
}

/* Tabs del modal */
.points-tabs {
    display: flex;
    border-bottom: 1.5px solid var(--gray-200);
    background: white;
    padding: 0 1rem;
}

.points-tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.points-tab-btn i {
    font-size: 1rem;
}

.points-tab-btn.active {
    color: var(--orange);
    border-bottom: 2px solid var(--orange);
    margin-bottom: -1.5px;
}

.points-tab-btn:hover:not(.active) {
    color: var(--orange);
}

/* Contenido de tabs */
.points-modal-body {
    padding: 1.5rem;
    max-height: 48vh;
    overflow-y: auto;
}

.points-tab-content {
    display: none;
}

.points-tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Lista de transacciones */
.transactions-list {
    max-height: 408px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition-fast);
    border-radius: 12px;
}

.transaction-item:hover {
    background: var(--gray-50);
}

.transaction-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    flex-shrink: 0;
}

.transaction-item.earn .transaction-icon {
    background: var(--green-light);
    color: var(--green);
}

.transaction-item.redeem .transaction-icon {
    background: var(--orange-light);
    color: var(--orange);
}

.transaction-item.adjust .transaction-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.transaction-icon i {
    font-size: 1.1rem;
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.transaction-type strong {
    color: var(--gray-800);
}

.transaction-order {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-left: 0.5rem;
}

.transaction-date {
    font-size: 0.7rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.transaction-amount {
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.transaction-amount.positive {
    color: var(--green);
}

.transaction-amount.negative {
    color: var(--orange);
}

/* Empty state */
.empty-history {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-history i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-history p {
    color: var(--gray-500);
}

/* Scrollbar personalizada para la lista */
.transactions-list::-webkit-scrollbar {
    width: 5px;
}

.transactions-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: var(--radius-full);
}

.transactions-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.transactions-list::-webkit-scrollbar-thumb:hover {
    background: var(--orange);
}

/* Responsive */
@media (max-width: 768px) {
    /* POINTS-CARD MÁS GRANDE Y PROTAGONISTA EN MÓVIL */
    .points-card {
        padding: 0.55rem 1.1rem;
        gap: 0.7rem;
        min-height: 52px;
        box-shadow: var(--shadow-md);
    }

    .points-icon {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
    }

    .points-icon i {
        font-size: 1.1rem;
    }

    .points-value {
        font-size: 1.1rem;
        font-weight: 800;
    }

    .points-label {
        font-size: 0.68rem;
        font-weight: 600;
    }

    .balance-value {
        font-size: 1.8rem;
    }

    .balance-icon {
        width: 55px;
        height: 55px;
    }

    .balance-icon i {
        font-size: 1.5rem;
    }

    .points-tab-btn {
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .transaction-item {
        padding: 0.75rem;
    }

    .transaction-icon {
        width: 38px;
        height: 38px;
    }
}

/* POINTS-CARD en celulares medianos — sigue siendo visible y tocable */
@media (max-width: 480px) {
    .points-card {
        padding: 0.5rem 0.9rem;
        gap: 0.6rem;
        min-height: 48px;
    }

    .points-icon {
        width: 34px;
        height: 34px;
    }

    .points-icon i {
        font-size: 1rem;
    }

    .points-value {
        font-size: 1rem;
    }

    .points-label {
        font-size: 0.65rem;
    }
}

/* POINTS-CARD en celulares muy pequeños — compacta pero legible */
@media (max-width: 380px) {
    .points-card {
        padding: 0.45rem 0.75rem;
        gap: 0.5rem;
        min-height: 44px;
    }

    .points-icon {
        width: 30px;
        height: 30px;
    }

    .points-icon i {
        font-size: 0.9rem;
    }

    .points-value {
        font-size: 0.9rem;
    }

    .points-label {
        font-size: 0.6rem;
    }
}


/*******************************************/
:root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary-color: #689F38;
    --accent-color: #FFC107;
    --accent-hover: #FFB300;
    --background-light: #F5F5F5;
    --background-white: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #9E9E9E;
    --border-color: #E0E0E0;
    --error-color: #D32F2F;
    --success-color: #388E3C;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    --gradient-accent: linear-gradient(135deg, #FFC107 0%, #FFB300 100%);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-2%, -2%) rotate(1deg);
    }

    66% {
        transform: translate(2%, 2%) rotate(-1deg);
    }
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 400px;
    min-height: 650px;
    background: var(--background-white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.97);
    animation: containerAppear 0.8s ease-out;
}

@keyframes containerAppear {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(15px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-panel {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--background-white);
    position: relative;
    min-height: 650px;
}

.login-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.login-header {
    margin-bottom: 40px;
    text-align: center;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.img-form {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.img-form img {
    max-width: 120px;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 4px 8px rgba(46, 125, 50, 0.15));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.forms-container {
    position: relative;
    width: 100%;
    min-height: 300px;
}

/*
.login-form,
.reset-password-form {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
}

.login-form {
    opacity: 1;
    transform: translateX(0) scale(1);
    visibility: visible;
    z-index: 2;
}

.reset-password-form {
    opacity: 0;
    transform: translateX(50px) scale(0.95);
    visibility: hidden;
    z-index: 1;
}

.show-reset .login-form {
    opacity: 0;
    transform: translateX(-50px) scale(0.95);
    visibility: hidden;
    z-index: 1;
}

.show-reset .reset-password-form {
    opacity: 1;
    transform: translateX(0) scale(1);
    visibility: visible;
    z-index: 2;
}
*/
/* Estilos base para los paneles de autenticación */
.auth-panel {
    display: none;
    width: 100%;
}

.auth-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Asegurar que los paneles tengan visibilidad */
#loginPanel,
#registerPanel,
#resetPanel {
    transition: all 0.3s ease;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    transition: var(--transition);
    background-color: var(--background-light);
    color: var(--text-primary);
}

.form-control:hover {
    border-color: var(--primary-light);
    background-color: #FFFFFF;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--background-white);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.08);
    transform: translateY(-1px);
}

.form-control.error {
    border-color: var(--error-color);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin: 12px 0;
    gap: 8px;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-container label {
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-password {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--orange-darker);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgb(204 88 0 / 8%);
    border: 1px solid transparent;
}

.forgot-password:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    border-color: var(--orange-darker);
}

.forgot-password i {
    margin-right: 6px;
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.35);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    color: var(--orange-dark);
    border: 1.5px solid var(--orange-dark);
    margin-top: 16px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.btn-secondary:active {
    transform: translateY(1px);
}

.form-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 16px;
    background: var(--background-light);
    border-radius: 14px;
    transition: var(--transition);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.form-footer a:hover {
    color: var(--primary-dark);
}

.form-footer a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

#loading-data-wait {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .login-container {
        max-width: 400px;
        min-height: 600px;
    }

    .login-panel {
        padding: 20px 30px;
        min-height: 600px;
    }

    .login-header h2 {
        font-size: 28px;
    }

    .login-header p {
        font-size: 15px;
    }

    .forms-container {
        min-height: 360px;
    }

    .form-control {
        padding: 14px 16px;
    }

    .btn {
        padding: 14px 24px;
    }

    .form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
        min-height: auto;
        border-radius: 24px;
    }

    .login-panel {
        padding: 20px 20px;
        min-height: auto;
    }

    .img-form img {
        max-width: 100px;
    }

    .login-header h2 {
        font-size: 26px;
    }

    .login-header p {
        font-size: 14px;
    }

    .forms-container {
        min-height: 340px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-control {
        padding: 14px;
        font-size: 14px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 12px;
    }

    .form-footer {
        font-size: 12px;
        padding: 14px;
    }

    .checkbox-container {
        flex-wrap: wrap;
    }

    .forgot-password {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 400px) {
    .login-panel {
        padding: 20px 15px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .forms-container {
        min-height: 320px;
    }

    .form-control {
        padding: 12px 14px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 12px;
    }

    .form-footer {
        padding: 12px;
    }
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Estilos para modal de redención */
.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.redeem-modal .btn-cancel:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.redeem-modal .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.35);
}

.redeem-modal .btn-confirm:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

/* Estilos para modal de PQRS */
#pqrsCloseBtn:hover,
#pqrsSupportBtn:hover {
    transform: translateY(-2px);
}

#pqrsCloseBtn:hover {
    background: #e2e8f0;
}

#pqrsSupportBtn:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.35);
}

/* Animación para el modal */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.email-confirm-content {
    line-height: 1.5;
}

/* ========== CATEGORÍAS RESPONSIVE ========== */
@media (max-width: 1280px) {
    .cat-card {
        flex: 0 0 165px;
        min-width: 165px;
    }

    .cat-card-img {
        width: 82px;
        height: 82px;
    }
}

@media (max-width: 1024px) {
    .cat-card {
        flex: 0 0 160px;
        min-width: 160px;
        padding: 1.1rem 0.9rem;
    }

    .cat-card-img {
        width: 76px;
        height: 76px;
    }

    .cat-card-text span {
        font-size: 0.88rem;
    }
}

@media (max-width: 768px) {
    .cat-card {
        flex: 0 0 155px;
        min-width: 155px;
        padding: 1.1rem 1rem;
        min-height: 140px;
    }

    .cat-card-img {
        width: 74px;
        height: 74px;
    }

    .cat-card-text span {
        font-size: 0.9rem;
    }

    .cat-card-text small {
        font-size: 0.7rem;
    }

    .cat-scroll-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .cat-card {
        flex: 0 0 140px;
        min-width: 140px;
        padding: 1rem 0.85rem;
        min-height: 130px;
        gap: 0.7rem;
    }

    .cat-card-img {
        width: 66px;
        height: 66px;
        border-radius: 12px;
    }

    .cat-card-text span {
        font-size: 0.85rem;
    }

    .cat-card-text small {
        font-size: 0.66rem;
    }
}

@media (max-width: 380px) {
    .cat-card {
        flex: 0 0 128px;
        min-width: 128px;
        padding: 0.85rem 0.7rem;
        min-height: 120px;
        gap: 0.55rem;
    }

    .cat-card-img {
        width: 58px;
        height: 58px;
    }

    .cat-card-text span {
        font-size: 0.78rem;
    }
}

/* ========== FOOTER RESPONSIVE ========== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1.25rem 1.5rem;
    }
}

/* ========== MOBILE PRODUCT CARDS FIX ========== */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .product-card {
        border-radius: 14px;
    }

    .product-image-container {
        height: 160px;
        padding: 1rem;
    }

    .product-image {
        max-height: 184px;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-name {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.375rem;
    }

    .product-header {
        margin-bottom: 0.25rem;
    }

    .product-code {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }

    .product-stock {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .stock-value {
        font-size: 0.85rem;
    }

    .product-observations {
        display: none;
    }

    .product-footer {
        flex-direction: column;
        gap: 0.375rem;
    }

    .view-details,
    .redeem-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
        width: 100%;
    }

    .product-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    .product-badge i {
    font-size: 0.9rem;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}
}

@media (max-width: 380px) {
    .products-grid {
        grid-template-columns: 1fr !important;
    }

    .product-image-container {
        height: 200px;
    }
}

/* Estilos adicionales para el modal de recuperación */
.reset-password-form .btn-secondary {
    margin-top: 12px;
}

.reset-password-form .field-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.reset-password-form .input-group {
    position: relative;
}

.reset-password-form .input-group i:first-child {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.reset-password-form .input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.reset-password-form .input-group input:focus {
    border-color: var(--orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
}

.reset-password-form .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.reset-password-form .toggle-password:hover {
    color: var(--orange);
}

.password-requirements {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 14px;
    margin: 15px 0;
    border: 1px solid var(--gray-200);
}

.password-requirements p {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.requirements-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.75rem;
}

.requirements-list li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    transition: all 0.2s;
}

.requirements-list li i {
    width: 16px;
    font-size: 0.7rem;
}

.requirements-list li.valid {
    color: var(--green);
}

.requirements-list li.invalid {
    color: var(--orange);
}

.security-info {
    background: var(--orange-light);
    padding: 10px 12px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--orange-dark);
    border: 1px solid rgba(249, 115, 22, 0.1);
}

.security-info i {
    font-size: 1rem;
}

.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header-fixed {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

/* Estilos para el formulario de registro */
.register-form {
    width: 100%;
}

.register-form .form-group {
    margin-bottom: 1rem;
}

.register-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.register-form .form-control:focus {
    border-color: var(--orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
}

.register-form .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 1rem 0;
}

.register-form .checkbox-group input {
    margin-top: 3px;
}

.register-form .checkbox-group label {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.register-form .checkbox-group a {
    color: var(--orange);
    text-decoration: none;
}

.register-form .checkbox-group a:hover {
    text-decoration: underline;
}

.register-switch {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.register-switch a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.register-switch a:hover {
    text-decoration: underline;
}

/* Estilos para modal de términos */
.terms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1010;
}

.terms-modal.show {
    display: block;
}

.terms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.terms-modal-container {
    background: white;
    border-radius: 20px;
    max-width: 750px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.4s ease-out;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

.terms-modal-header {
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.terms-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--orange);
    margin: 0;
}

.terms-modal-header h3 i {
    margin-right: 0.5rem;
}

.terms-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.terms-modal-close:hover {
    color: var(--orange);
    transform: rotate(90deg);
    background: var(--orange-light);
}

.terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #fafafa;
}

.terms-content {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.terms-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    margin: 1rem 0 0.5rem;
}

.terms-content p {
    margin-bottom: 0.75rem;
}

.terms-content ol,
.terms-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.terms-content li {
    margin-bottom: 0.25rem;
}

.terms-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: white;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

.terms-footer .btn-accept {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0.5;
    pointer-events: none;
}

.terms-footer .btn-accept.enabled {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.terms-footer .btn-accept.enabled:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-green);
}

.terms-footer .btn-reject {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.terms-footer .btn-reject:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: var(--orange-light);
}

.terms-scroll-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--gray-400);
    padding: 0.5rem;
    border-top: 1px solid var(--gray-200);
    background: white;
}

.terms-scroll-hint i {
    margin-right: 0.25rem;
}

.toast-reject {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 1rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    z-index: 10020;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.toast-reject.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-reject i {
    font-size: 1.2rem;
}

/* Tabs de autenticación */
.auth-tabs {
    display: flex;
    border-bottom: 1.5px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.auth-tab.active {
    color: var(--orange);
    border-bottom: 2px solid var(--orange);
    margin-bottom: -1.5px;
}

.auth-tab:hover:not(.active) {
    color: var(--orange);
}

.auth-panel {
    display: none;
}


/* Botón de olvidó contraseña */
.forgot-password-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Botón de volver al login desde recuperación */
.back-to-login-btn {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
    padding: 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    margin-top: 12px;
}

.back-to-login-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: var(--orange-light);
}

/* Estilos para el panel activo */
.auth-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Asegurar que los paneles tengan visibilidad */
#loginPanel,
#registerPanel,
#resetPanel {
    transition: all 0.3s ease;
}
/* Modal de todas las categorías */
.categories-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050;
}

.categories-modal.show {
    display: block !important;
}

.categories-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.categories-modal-container {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.4s ease-out;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

.categories-modal-header {
    padding: 12px 2.5rem;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.categories-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.categories-modal-header h3 i {
    margin-right: 0.5rem;
}

.categories-modal-close {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categories-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.categories-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8fafc;
}

.categories-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-card-modal {
    background: white;
    border-radius: 20px;
    padding: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid var(--gray-200);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.category-card-modal:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(249, 115, 22, 0.4);
}

.category-card-modal:hover .category-image-modal img {
    transform: scale(1.08);
}

.category-card-modal:hover .category-arrow-modal {
    transform: translateX(6px);
    background: var(--orange);
    color: white;
}

/* CONTENEDOR DE IMAGEN DE CATEGORÍA */
.category-image-modal {
    position: relative;
    width: 100%;
    height: 130px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
}

.category-image-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.category-image-overlay {
    display: none;
}

/* ÍCONO FLOTANTE — OCULTO por petición */
.category-icon-modal {
    display: none;
}

/* INFO DE LA CATEGORÍA */
.category-info-modal {
    flex: 1;
    padding: 1rem 1.25rem 1.1rem;
    background: white;
}

.category-name-modal {
    font-weight: 800;
    color: var(--gray-800);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.category-count-modal {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-count-modal i {
    font-size: 0.7rem;
    color: var(--orange);
}

/* FLECHA DE ACCIÓN */
.category-arrow-modal {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    font-size: 0.85rem;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

/* LOADING Y VACÍO */
.loading-categories {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.loading-categories i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--orange);
}

.empty-categories {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.empty-categories i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

/* RESPONSIVE DEL MODAL DE CATEGORÍAS */
@media (max-width: 768px) {
    .categories-grid-modal {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .category-image-modal {
        height: 110px;
    }

    .category-info-modal {
        padding: 0.9rem 1rem 1rem;
    }

    .category-name-modal {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .categories-grid-modal {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .category-image-modal {
        height: 120px;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.points-badge-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffb800 !important;
    border: 3.5px solid rgba(255, 184, 0, 0.35) !important;
    padding: 0.4rem 0.8rem;
    border-radius: 60px;
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    cursor: default;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(255, 184, 0, 0);
    transition: all 0.3s ease;
    z-index: 10;
    animation: none;
    flex: none;
    line-height: 1;
}

.points-badge-btn i {
    color: #FFB800 !important;
    font-size: 0.95rem;
    filter: drop-shadow(0 1px 2px rgba(255, 184, 0, 0.5));
    animation: star-shine 2.5s ease-in-out infinite;
}

@keyframes star-shine {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 1px 2px rgba(255, 184, 0, 0.5));
    }
    50% { 
        transform: scale(1.15) rotate(15deg);
        filter: drop-shadow(0 2px 6px rgba(255, 184, 0, 0.8));
    }
}

.points-badge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.18),
                0 0 0 3px rgba(255, 184, 0, 0.15);
}
/* Ajustar footer para 3 botones */
@media (min-width: 641px) {
    .product-footer {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 0.5rem;
    }
    
    .product-footer .view-details {
        grid-column: 1;
    }
    
    .product-footer .points-badge-btn {
        grid-column: 2;
    }
    
    .product-footer .redeem-btn {
        grid-column: 3;
    }
}

@media (max-width: 640px) {
    .product-footer {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-footer .view-details,
    .product-footer .points-badge-btn,
    .product-footer .redeem-btn {
        width: 100%;
    }
}

/* Botón de redención en modal */
.modal-redeem-btn {
    transition: all 0.3s ease !important;
}

.modal-redeem-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
}

.modal-redeem-btn:active {
    transform: translateY(0);
}


/* Estilos para el botón de limpiar búsqueda */
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    color: var(--orange);
    background: var(--orange-light);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding-right: 40px !important;
}

/* Loading spinner */
.loading-spinner-container {
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


/* ========== AGROCLUB SECTION - DISEÑO PREMIUM ========== */
.agroclub-section {
    padding: 1rem 1.5rem;
    /* Usamos un fondo oscuro pero con los tonos de la marca para dar elegancia */
    position: relative;
    overflow: hidden;
    isolation: isolate;
}



/* Contenedor principal - Estilo Glassmorphism Premium */
.agroclub-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.agroclub-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Línea superior animada con los colores corporativos */
.agroclub-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
 
    background-size: 200% 100%;
    animation: shimmer-white 4s infinite linear;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    z-index: 3;
}

/* ========== CONTENIDO IZQUIERDO ========== */
.agroclub-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.agroclub-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

.agroclub-logo img {
    max-height: 75px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-sm));
    animation: float 6s ease-in-out infinite;
}

.agroclub-description {
    font-size: 1.15rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0;
    max-width: 480px;
    font-weight: 500;
}

/* ========== TARJETA QR Y DECORACIONES ========== */
.agroclub-qr-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Orbes de luz desenfocados (reemplazando los círculos estáticos) */
.agroclub-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(40px); /* Esto crea el efecto de luz brillante */
    opacity: 0.6;
}

.agroclub-deco-1 {
    width: 150px;
    height: 150px;
    background: var(--orange);
    top: -30px;
    right: -20px;
    animation: orbit1 10s linear infinite;
}

.agroclub-deco-2 {
    width: 130px;
    height: 130px;
    background: var(--green);
    bottom: -20px;
    left: -20px;
    animation: orbit2 12s linear infinite reverse;
}

/* Tarjeta del QR */
.agroclub-qr-card {
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    max-width: 150px;
    width: 100%;
    position: relative;
    z-index: 2;
    border: 2px solid var(--gray-100);
    transition: all var(--transition-bounce);
    overflow: hidden; /* Necesario para la línea de escáner */
}

.agroclub-qr-card:hover {
    transform: scale(1.08) translateY(-10px);
    border-color: var(--orange-light);
    box-shadow: var(--shadow-orange);
}

/* Animación de línea de Escáner sobre el QR */
.agroclub-qr-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--orange);
    box-shadow: 0 0 15px 3px rgba(249, 115, 22, 0.5);
    animation: scanline 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    opacity: 0.8;
}

.agroclub-qr-image {
    margin: 0;
    position: relative;
    background: white;
    border-radius: 12px;
}

.agroclub-qr-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ========== NUEVAS ANIMACIONES ========== */
@keyframes scanline {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

@keyframes orbit1 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.2); }
    66% { transform: translate(-10px, 10px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes orbit2 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, 20px) scale(1.2); }
    66% { transform: translate(10px, -10px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .agroclub-container {
        padding: 2.5rem;
        gap: 2rem;
    }
    .agroclub-logo img {
        max-height: 65px;
    }
}

@media (max-width: 768px) {
    .agroclub-section {
        padding: 3rem 1.5rem;
    }
    .agroclub-container {
        grid-template-columns: 1fr;
        padding: 2rem;
        text-align: center;
    }
    .agroclub-logo {
        justify-content: center;
    }
    .agroclub-description {
        margin: 0 auto;
        font-size: 1rem;
    }
    .agroclub-qr-wrapper {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .agroclub-section {
        padding: 2rem 1rem;
    }
    .agroclub-container {
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }
    .agroclub-logo img {
        max-height: 50px;
    }
    .agroclub-qr-card {
        max-width: 180px;
        padding: 1.25rem;
    }
}



/* Estilos para modal de términos completo */
.terms-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.terms-section:last-child {
    border-bottom: none;
}

.terms-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.terms-section-header i {
    font-size: 24px;
    color: #f97316;
}

.terms-section-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.terms-scroll-container {
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.terms-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.terms-scroll-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.terms-scroll-container::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 10px;
}

.terms-scroll-hint {
    font-size: 11px;
    color: #f97316;
    text-align: center;
    padding: 8px;
    background: #fff7ed;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: opacity 0.3s;
}

.checkbox-wrapper {
    margin: 10px 0 5px 0;
}

.checkbox-container {
    display: flow;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #eee;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #f97316;
    border-color: #f97316;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:disabled ~ .checkmark {
    background-color: #e2e8f0;
    cursor: not-allowed;
}
/* Password toggle button */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px !important;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password-btn:hover {
    color: #f97316;
}

.toggle-password-btn:focus {
    outline: none;
}






/* Estilos para categoría activa */
.cat-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cat-card.active-category {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
    border: 2px solid #f97316;
}

.cat-card.active-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.cat-card.active-category .cat-card-text span {
    color: #f97316;
    font-weight: 700;
}

/* Animación para el resaltado */
@keyframes categoryHighlight {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

.cat-card.active-category {
    animation: categoryHighlight 0.5s ease;
}
