/* =========================================================
   VARIABLES GLOBALES PETGROW (Tu paleta de colores)
========================================================= */
:root {
    --pg-primary: #4d14b8;  /* Morado Principal (Usar para INTERACCIÓN) */
    --pg-primary-suave: #d1bfeb; /*corporativo suave para fondos o hover*/
    --pg-accent: #fbc02d;   /* Amarillo Acento (Usar para venta/destacados) */
    --pg-accent_contraste: #FF7A00;   /* Amarillo Acento (Usar para venta/destacados) */

    --pg-dark: #1a1a1a;     /* Texto principal, fondos oscuros */
    --pg-white: #ffffff;    /* Fondos de tarjetas, texto sobre oscuro */
    --pg-light: #f1f1f1;    /* Fondo general de la página, sutil #f4f7f6*/ 
    --pg-text-muted: #6c757d; /* Texto secundario, descripciones */


    /* https://kigen.design/color*/
    --purple-heart-50: #f1effe;
    --purple-heart-100: #ddd7fd;
    --purple-heart-200: #beb1fb;
    --purple-heart-300: #a48ffa;
    --purple-heart-400: #8d6ef8;
    --purple-heart-500: #7849f5;
    --purple-heart-600: #641deb;
    --purple-heart-700: #4d14b8;
    --purple-heart-800: #3a0d90;
    --purple-heart-900: #22055b;
    --purple-heart-950: #15023e;
    
    /* Fuentes */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* =========================================================
   ESTILOS BASE (Generales para todo el sitio)
========================================================= */
body {
    background-color: var(--pg-light) !important;
    color: var(--pg-dark);
    font-family: var(--font-body);
    font-size: 16px;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, .Poppins {
    font-family: var(--font-heading);
}

/* Enlaces generales */
a {
    color: var(--pg-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--pg-dark);
}


/* =========================================================
   CLASES UTILITARIAS GLOBALES (Úsalas en cualquier HTML)
========================================================= */

/* Colores de Texto */
.text-pg-primary { color: var(--pg-primary) !important; }
/* NUEVA CLASE UTILITARIA PARA DESATURAR DATOS */
.text-pg-dark { color: var(--pg-dark) !important; } 

/* Tipografía */
.fw-medium { font-weight: 500 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }

/* Efecto Hover para Iconos del Navbar */
.nav-icon-hover {
    transition: all 0.3s ease;
}
.nav-icon-hover:hover {
    color: var(--pg-accent) !important;
    transform: scale(1.1);
}


/* =========================================================
   DIVISOR PERSONALIZADO (Separador elegante)
========================================================= */
.hr-divider-pg {
    border: 0;
    border-top: 1px solid #d2d2d2 !important;
    opacity: 0.5 !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important; /* Equivalente a mb-4 de Bootstrap */
    display: block;
    width: 100%;
}

/* =========================================================
   BOTONES GLOBALES (Con Micro-interacciones Premium)
========================================================= */
.btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    border-width: 2px !important;
    
    /* Geometría Premium Estandarizada */
    border-radius: 12px !important;
    min-height: 48px !important;
    letter-spacing: 0.5px;
    font-weight: 700; /* fw-bold */
    
    /* Alineación perfecta de texto e íconos */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* equivalente a gap-2 */
}

/* 1. Botón Primario (Oscuro Elegante) */
.btn-dark-petgrow {
    background-color: var(--pg-dark) !important;
    color: var(--pg-white) !important;
    border-color: var(--pg-dark) !important;
}

.btn-dark-petgrow:hover {
    background-color: #333333 !important; /* Gris carbón mate */
    border-color: #333333 !important;
    color: var(--pg-white) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15) !important; /* Sombra negra muy suave */
}

/* 2. Botón Acento (Amarillo Venta) */
.btn-accent-petgrow {
    background-color: var(--pg-accent) !important;
    color: var(--pg-primary) !important; /* Letra morada sobre fondo amarillo */
    border-color: var(--pg-accent) !important;
    font-weight: 800 !important; /* Grosor máximo para la acción principal */
}

.btn-accent-petgrow:hover {
    background-color: var(--pg-primary) !important; /* Pasa a tu morado corporativo */
    color: var(--pg-white) !important; /* Letra blanca para contraste perfecto */
    border-color: var(--pg-primary) !important;
    transform: translateY(-3px) !important; /* Se levanta invitando al clic */
    box-shadow: 0 10px 20px rgba(77, 20, 184, 0.25) !important; /* Sombra morada brillante */
}

.btn-primary-petgrow {
    background-color: var(--pg-primary) !important;
    color: var(--pg-white) !important;
    border-color: var(--pg-primary) !important;
}

.btn-primary-petgrow:hover {
    background-color: var(--purple-heart-700) !important; /* Gris carbón mate */
    border-color: var(--purple-heart-700) !important;
    color: var(--pg-white) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 8px var(--purple-heart-400) !important; /* Sombra negra muy suave */
}



/* 3. El Efecto Táctil (Al hacer CLIC en cualquier botón) */
.btn:active {
    transform: translateY(1px) !important; /* El botón se hunde físicamente */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important; /* La sombra se encoge al presionarlo */
}

/* 4. Animación universal para flechas dentro de botones */
.btn i.bi-arrow-right {
    transition: transform 0.3s ease;
}

.btn:hover i.bi-arrow-right {
    transform: translateX(4px); /* La flecha empuja a la derecha al hacer hover */
}

/* 5. Botón Suave (Terciario: Para "Editar", "Ver todos", "Gestionar") */
.btn-soft-pg {
    background-color: var(--pg-light) !important; /* Fondo gris muy sutil */
    color: var(--pg-dark) !important;
    border: 1px solid transparent !important;
    font-weight: 600 !important;
    padding: 0.4rem 1rem !important; /* Un poco más compacto */
}

.btn-soft-pg:hover {
    background-color: var(--pg-white) !important;
    color: var(--pg-primary) !important; /* Se vuelve morado al interactuar */
    border-color: var(--pg-primary) !important; /* Aparece un borde morado fino */
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(77, 20, 184, 0.1) !important;
}

/* =========================================================
   ESTADOS VACÍOS (Empty States)
========================================================= */
.border-dashed {
    border: 1px dashed #e0e0e0;
    transition: all 0.3s ease;
}

.border-dashed:hover {
    border-color: #cccccc; /* Se oscurece un poco el borde al pasar el mouse */
}


/* =========================================================
   ENLACES GLOBALES CON INTERACCIÓN (NUEVO)
========================================================= */
.link-pg-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.link-pg-nav i {
    transition: transform 0.3s ease;
}
.link-pg-nav:hover {
    color: var(--pg-dark);
}
.link-pg-nav:hover i {
    transform: translateX(4px); /* La flecha se desliza */
}



/* =========================================================
   ESTILOS ESPECÍFICOS DE LA APP ACCOUNTS (Panel de Usuario)
========================================================= */

/* === A. SIDEBAR (Estandarizado y suavizado) === */
.profile-sidebar {
    background-color: var(--pg-white);
    border-radius: 12px;
}

.profile-sidebar .nav-link-pg {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--pg-text-muted); /* Gris suave por defecto */
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-sidebar .nav-link-pg i {
    font-size: 1.2rem;
    color: #ccc; /* Iconos grises por defecto */
}

/* Hover suave */
.profile-sidebar .nav-link-pg:hover {
    background-color: var(--pg-light);
    color: var(--pg-primary);
}
.profile-sidebar .nav-link-pg:hover i {
    color: var(--pg-primary);
}

/* Estado Activo (Aquí aplicamos la intensidad corporativa) */
.profile-sidebar .nav-link-pg.active {
    background-color: var(--pg-primary);
    color: var(--pg-white) !important;
}
.profile-sidebar .nav-link-pg.active i {
    color: var(--pg-white) !important;
}

/* Botón de Logout */
.logout-link { color: #dc3545 !important; }
.logout-link i { color: #dc3545 !important; }
.logout-link:hover { background-color: #fff0f0 !important; }

/* === B. DASHBOARD (Tarjetas y Títulos) === */

/* Títulos de tarjeta estandarizados */
.card-title-pg {
    font-weight: 600; 
    color: var(--pg-dark);
    font-size: 1.15rem;
    margin: 0;
}
/* Iconos grises en títulos por defecto (Desaturación) */
.card-title-pg i {
    color: var(--pg-text-muted); 
    margin-right: 10px;
}

/* === C. CONFIGURACIÓN DE CUENTA (Settings) === */
.pg-icon-box {
    width: 45px;
    height: 45px;
    background-color: var(--pg-light);
    color: var(--pg-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.pg-danger-zone {
    background-color: #fff5f5; /* Un rojo ultra transparente */
    border: 1px dashed #ffcaca;
    border-radius: 16px;
    transition: border-color 0.3s ease;
}

.pg-danger-zone:hover {
    border-color: #ff9e9e;
}



/* =========================================================
   FOOTER (Pie de página)
========================================================= */
.petgrow-footer {
    background-color: var(--pg-primary); 
    color: var(--pg-white); /* Forzamos que todo el texto base sea blanco puro */
}

/* Título y Color de Acento */
.footer-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--pg-white);
}

.text-accent {
    color: var(--pg-accent) !important;
}

/* Títulos de las columnas */
.footer-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem; /* Más pequeño y elegante */
    letter-spacing: 1px; /* Separamos un poco las letras */
    color: var(--pg-white);
}

/* Textos generales y listas (Más pequeños para no saturar) */
.footer-text, 
.footer-contact span,
.footer-legal {
    font-size: 0.85rem; 
    color: #e9e9f5; /* Un blanco ligeramente lila para que descanse la vista */
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Enlaces de Tienda y Soporte */
.footer-links a {
    display: inline-block;
    font-size: 0.85rem;
    color: #e9e9f5; /*#e2d9f3 Un blanco ligeramente lila para que descanse la vista */
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--pg-accent);
    transform: translateX(5px);
}

/* Redes Sociales */
.footer-social {
    color: #e9e9f5;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social:hover,
.footer-legal:hover {
    color: var(--pg-accent);
}

/* =========================================================
   =========================================================

            NAVBAR (Barra de navegación)

========================================================= 
========================================================= */


/* =========================================================
   ESTILOS GENERALES DEL NAVBAR
   Controla el contenedor principal y transiciones base
========================================================= */
.petgrow-navbar {
    background-color: var(--pg-primary); /* Color morado definido en variables */
    transition: all 0.3s ease;
}

/* Colores de fondo utilitarios para las filas del Navbar */
.bg-primary-pg { 
    background-color: var(--pg-primary); 
}
.bg-dark-nav { 
    background-color: #4d14b8; /* Fondo negro para la barra de categorías */
}

/* =========================================================
   LOGOTIPOS (Desktop y Mobile)
   Define la identidad visual en diferentes tamaños de pantalla
========================================================= */
/* Estilo para el logo en computadoras */
.petgrow-logo-desktop {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--pg-white) !important;
    text-decoration: none;
}

/* Estilo para el logo en celulares */
.petgrow-logo-mobile {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--pg-white) !important;
    text-decoration: none;
}

/* =========================================================
   ELEMENTOS DE INTERACCIÓN (Botones e Iconos)
========================================================= */
/* Botón "Hamburguesa" para el menú móvil */
.navbar-toggler-custom {
    color: var(--pg-white);
    font-size: 2.2rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.navbar-toggler-custom:hover {
    color: var(--pg-accent); /* Cambia al color de acento (amarillo) */
}

/* Efecto visual para iconos de usuario y carrito */
.nav-icon-hover {
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-icon-hover:hover {
    color: var(--pg-accent) !important;
    transform: scale(1.1); /* Efecto de ligero aumento de tamaño */
}

/* Burbuja de notificación del carrito (Círculo rojo) */
.badge-cart {
    position: absolute;
    top: -8px;      /* Lo subimos un poco */
    right: -10px;   /* Lo anclamos a la derecha, fuera del transform */
    background-color: #e13d4b; /* Rojo PetGrow */
    color: white;
    font-size: 0.7rem; /* Letra más delicada */
    font-weight: 800;
    
    /* Hacemos que sea un círculo perfecto */
    min-width: 20px; 
    height: 20px;
    padding: 0 5px;
    border-radius: 50px;
    
    /* Centrado interno del número */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* EL TRUCO PRO: Un borde del mismo color que tu navbar para que resalte */
    border: 2px solid var(--pg-primary); 
}

/* =========================================================
   BUSCADOR VERSIÓN ESCRITORIO
   Diseño de barra blanca con botón negro integrado
========================================================= */
.search-container-desktop {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 2px;
    overflow: hidden;
}

.search-input-desktop {
    flex-grow: 1;
    border: none;
    padding: 8px 15px;
    font-size: 0.9rem;
    outline: none;
}

.search-btn-desktop {
    background-color: #1a1a1a; /* Botón oscuro */
    color: white;
    border: none;
    padding: 8px 25px;
    border-radius: 6px;
    transition: background 0.3s;
}

.search-btn-desktop:hover {
    background-color: var(--pg-primary); /* Cambia a morado al pasar el mouse */
}

/* =========================================================
   BUSCADOR VERSIÓN MÓVIL
   Diseño simplificado con lupa posicionada sobre el input
========================================================= */
.search-container-mobile { 
    position: relative; 
}

.search-input-mobile {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
}

.search-icon-mobile {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}




/* =========================================================
   MENU DESPLEGABLE USUARIO (DROPDOWN)
========================================================= */

/* Eliminar la flecha (caret) por defecto de Bootstrap */
.no-caret::after {
    display: none !important;
}

/* Contenedor del menú */
.dropdown-menu-petgrow {
    border-radius: 8px; /* Bordes ligeramente más cuadrados como tu imagen */
    min-width: 290px; /* Más ancho para que quepan bien los textos largos */
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* Elementos de la lista (Perfil, Pedidos, etc.) */
.dropdown-item-petgrow {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.5rem; /* Más aire a los lados, como en tu imagen 2 */
    color: #4a4a4a;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Color de los iconos por defecto (Gris como en tu imagen) */
.dropdown-item-petgrow i {
    font-size: 1.2rem;
    color: #777;
    transition: color 0.2s ease;
}

/* Efecto Hover: Le damos el toque PetGrow (Morado) al pasar el mouse */
.dropdown-item-petgrow:hover:not(.text-danger) {
    background-color: #f8f9fa; /* Gris casi invisible */
    color: var(--pg-primary); /* Texto cambia a tu morado */
}

.dropdown-item-petgrow:hover:not(.text-danger) i {
    color: var(--pg-primary); /* Icono cambia a tu morado */
}

/* Efecto para el botón de Registrarse (Hover invierte colores) */
/* Estado Normal (Fondo transparente, texto y borde oscuro) */
.btn-outline-dark {
    border: 0.5px solid var(--pg-dark) !important; /* Borde un poco más grueso para que destaque */
    color: var(--pg-dark) !important;
    background-color: transparent !important;
    transition: all 0.3s ease-in-out !important; /* Transición suave */
    border-radius: 12px; border-width: 1.5px;
}

/* Efecto Hover que ya tenías (Invierte los colores) */
.btn-outline-dark:hover {
    background-color: var(--pg-dark) !important;
    color: var(--pg-white) !important;
}


/* =========================================================
   BOTÓN INICIAR SESIÓN (Efecto Flotante Elegante)
========================================================= */

/* Estado Normal (Fondo negro) */
.btn-dark-petgrow {
    background-color: var(--pg-dark);
    color: var(--pg-white);
    border: 2px solid var(--pg-dark); /* Le ponemos el mismo borde que al otro botón para que midan igual */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Una transición ultra suave estilo Apple */
}

/* Efecto Hover (Se levanta y se tiñe sutilmente de morado) */
.btn-dark-petgrow:hover {
    background-color: var(--pg-primary); /* Pasa del negro a tu morado PetGrow */
    border-color: var(--pg-primary);
    color: var(--pg-white);
    transform: translateY(-2px); /* Se levanta 2 milímetros hacia arriba */
    box-shadow: 0 6px 15px rgba(77, 20, 184, 0.25); /* Una sombra morada muy difuminada en la base */
}

/* =========================================================
   BOTÓN DE OFERTAS (ESTILO GRIS PERLA / MINIMALISTA)
========================================================= */
.btn-sale-petgrow {
    background-color: #f8fafc !important; /* Gris perla muy limpio */
    color: var(--pg-dark) !important;     /* Texto oscuro elegante */
    border: 2px solid #e2e8f0 !important; /* Borde sutil para darle estructura */
    box-shadow: none !important;
}

/* El ícono de descuento destaca en tu morado corporativo */
.btn-sale-petgrow i {
    color: #e13d4b!important; 
}

/* Efecto al tocar/pasar el mouse */
.btn-sale-petgrow:hover,
.btn-sale-petgrow:active {
    background-color: #f1f5f9 !important; /* Gris un tono más oscuro al presionar */
    border-color: #cbd5e1 !important;
    color: var(--pg-dark) !important;
    transform: translateY(-2px) !important; /* Micro-interacción de levante */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important; /* Sombra súper delicada */
}

/* Micro-animación de latido (solo afecta a la etiqueta) */
.pg-icon-pulse {
    animation: pg-pulse-animation 1.5s infinite;
    display: inline-block;
}

@keyframes pg-pulse-animation {
    0% { transform: scale(1); }
    10% { transform: scale(1.2) rotate(-5deg); }
    20% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1); }
}

/* =========================================================
   BARRA DE CATEGORÍAS (Desktop - Segunda Fila)
========================================================= */
.category-nav .nav-link {
    color: var(--pg-white);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 20px 8px 0;
    transition: color 0.3s;
}

.category-nav .nav-link:hover {
    color: var(--pg-accent);
}


/* === EL ESTILO PARA EL ENLACE ACTIVO === */
.category-nav .nav-link.active {
    color: var(--pg-accent); /* Se queda pintado de dorado */
    font-weight: 700; /* Letra un poco más gruesa */
    position: relative; /* Necesario por si queremos agregarle una línea debajo */
}

/* Opcional: Una pequeña línea debajo del enlace activo (queda muy elegante) */
.category-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 60%; /* La línea ocupará solo un poco más de la mitad de la palabra */
    height: 2px;
    background-color: var(--pg-accent);
    border-radius: 2px;
}


/* =========================================================
   CINTILLO DE CONFIANZA (Trust Banner - Diseño Horizontal)
========================================================= */
.trust-banner {
    background-color: var(--pg-light); /* Fondo sobrio y luminoso #f4f7f6 */
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* === Estilo del Icono y Círculo === */
.trust-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    
    width: 55px; /* Tamaño del círculo */
    height: 55px;
    background-color: #ffffff; /* Círculo blanco puro para resalar sobre el gris claro */
    border-radius: 50%; /* Perfecto círculo */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04); /* Sombra ultra sutil */
    transition: all 0.3s ease;
}

.trust-icon-circle i {
    color: var(--pg-primary); /* Tu morado principal */
    font-size: 1.6rem; /* Ícono proporcionado al círculo */
}

/* === Efectos Hover (Sutiles y Profesionales) === */
.trust-item:hover .trust-icon-circle {
    transform: translateY(-3px); /* Pequeño levante */
    background-color: var(--pg-primary); /* El círculo se vuelve morado */
    box-shadow: 0 6px 15px rgba(77, 20, 184, 0.2); /* Sombra morada suave */
}

.trust-item:hover .trust-icon-circle i {
    color: var(--pg-white); /* El ícono dentro se vuelve blanco */
}

/* === Estilos de Texto === */
.trust-content {
    text-align: left;
    min-width: 175px; /* LA MAGIA: Obliga a que todas las cajas de texto midan lo mismo */
}

.trust-title {
    color: var(--pg-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.1rem;
    text-align: center; /* Alineado a la izquierda para el diseño horizontal */
}

.trust-text {
    color: #6c757d; /* Gris de lectura sobrio */
    font-size: 0.85rem;
    margin-bottom: 0;
    text-align: center;
}

/* === Bordes sutiles solo en escritorio === */
@media (min-width: 768px) {
    .border-md-sides {
        border-left: 1px solid rgba(0, 0, 0, 0.06);
        border-right: 1px solid rgba(0, 0, 0, 0.06);
    }
}


/* =========================================================
   GRILLA DE CATEGORÍAS (White Theme / Imagen Izquierda)
========================================================= */
/* =========================================================
   GRILLA DE CATEGORÍAS (Tarjetas Pastel)
========================================================= */

/* --- Estructura Base de la Tarjeta --- */
.card-category {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Texto a la izquierda */
    border-radius: 16px;
    padding: 2.5rem 2rem;
    height: 100%;
    min-height: 200px; /* Asegura una altura mínima para que la imagen no se vea aplastada */
    position: relative;
    overflow: hidden; /* Evita que la foto sobresalga de los bordes redondeados */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

/* --- Paleta de Colores Pastel Extraída de tu Imagen --- */
.bg-cat-perros { background-color: #e6f2ff; }     /* Celeste claro */
.bg-cat-gatos { background-color: #fff2e6; }      /* Naranja/Beige suave */
.bg-cat-snacks { background-color: #ffe6ea; }     /* Rosa suave */
.bg-cat-accesorios { background-color: #e6ffeb; } /* Verde claro */
.bg-cat-blog { background-color: #e6fffe; } /* Gris claro */ 

/* --- Contenido de Texto (Izquierda) --- */
.card-cat-content {
    position: relative;
    z-index: 2;
    max-width: 50%; /* Evita que el texto pise la imagen */
}

.card-cat-title {
    color: var(--pg-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}



.card-cat-subtitle {
    color: #7a7a7a;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.card-cat-link {
    color: var(--pg-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.card-category:hover .card-cat-link {
    color: var(--pg-primary); /* La flecha y el texto se vuelven morados al pasar el mouse */
}

/* --- Imagen (Apoyada a la Derecha) --- */
.card-cat-img {
    position: absolute;
    right: 0%; /* Sale un poquito por la derecha para efecto visual */
    bottom: 0;  /* Apoyada firmemente en el borde inferior */
    width: 50%; 
    height: 100%; /* Altura ajustada para no chocar arriba */
    z-index: 1;
    display: flex;
    align-items: flex-end; /* Asegura que la imagen baje al ras de la tarjeta */
    justify-content: flex-end;
}

.card-cat-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Perfecto para que PNGs no se deformen */
    transition: transform 0.4s ease;
}

.card-category:hover .card-cat-img img {
    transform: scale(1.05); /* Efecto de zoom suave al pasar el cursor */
}

/* --- Ajustes Responsivos (Celulares) --- */
@media (max-width: 767px) {
    .card-category {
        padding: 1.5rem;
        min-height: 180px;
    }
    .card-cat-title {
        font-size: 1.5rem;
    }
    .card-cat-img {
        width: 45%;
    }
    .pg-product-gallery {
        max-height: none !important; 
        height: auto;
        padding: 1.5rem 1rem !important;
    }

    /* 2. Reducimos la imagen principal un poco para que las miniaturas queden "Above the fold" (visibles sin hacer scroll) */
    .pg-main-img {
        max-height: 240px !important; 
        margin-bottom: 1rem !important;
    }

    /* 3. Ajustamos el tamaño de las miniaturas para el dedo del usuario */
    .pg-thumb {
        width: 60px;
        height: 60px;
        padding: 4px;
        border-radius: 10px;
    }
    
    /* 4. Aseguramos que el contenedor de miniaturas tenga espacio de arrastre */
    .pg-gallery-thumbnails {
        padding-bottom: 5px;
        gap: 10px;
    }
}


/* =========================================================
   SOPORTE PARA SWIPE EN CELULARES (GALERÍA)
========================================================= */
.pg-main-img {
    /* Evita que el usuario "arrastre" la foto por accidente al intentar deslizar */
    -webkit-user-drag: none;
    user-select: none;
    /* Le dice al celular que permita el scroll vertical, pero nosotros controlamos el horizontal */
    touch-action: pan-y; 
}



/* =========================================================
   SISTEMA DE ALERTAS (TOASTS)
========================================================= */


/* ############################################################################################################ 
                    ESTILOS PERSONALIZADOS ALERTAS
############################################################################################################ */

      :root {
            --success: #198754;
            --warning: #f39c12;
            --info: #0d6efd;
            --error: #dc3545;

            --success_bk: #f4fdf9;
            --warning_bk: #fff8eb;
            --info_bk: #eaf3ff;
            --error_bk: #ffeff0;
        }

        body {
            background-color: #f4f7f6;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
        }

        /* Contenedor de alertas */
        .toast-container {
            position: fixed;
            bottom: 30px;
            right: 20px; 
            z-index: 9999 !important; /* Aumentamos para estar sobre el header */
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* Estilo base de la alerta (Lado Derecho) */
        .toast {
            
            display: flex !important; /* Obligamos a que se muestre */
            min-width: 420px;
            padding: 12px 20px; /* Más aire interno */
            border-radius: 12px;
            align-items: center;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 
                        0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;  
            border: 1px solid rgba(0, 0, 0, 0.05); 
            animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            opacity: 1;
            visibility: visible;
            position: relative;
            overflow: hidden; /* Para que el borde lateral no se salga */ 
        }

        .toast.success { background-color: var(--success_bk) !important; }
        .toast.warning { background-color: var(--warning_bk) !important; }
        .toast.info    { background-color: var(--info_bk) !important; }
        .toast.error, .toast.danger { background-color: var(--error_bk) !important;}

        /* Iconos */
        .toast-icon {
            font-size: 1.6rem;
            margin-right: 10px;
            margin-left: 15px;
            display: flex;
            align-items: center;
        }

        .success .toast-icon { color: var(--success); }
        .warning .toast-icon { color: var(--warning); }
        .info .toast-icon { color: var(--info); }
        .error .toast-icon { color: var(--error); }

        .toast-body { flex-grow: 1; }

        .toast-title {
            font-size: 15px;
            font-weight: 600;
            color: #333;
            margin-bottom: 0.5px;
        }

        .toast-content {
            font-size: 13px;
            color: #777;
        }

        .toast-close {
            background: none;
            border: none;
            font-size: 20px;
            color: #797878;
            cursor: pointer;
            margin-left: 10px;
            transition: color 0.2s;
        }

        .toast-close:hover { color: #666; }

        /* Animaciones */
        @keyframes popIn {
            from { 
                opacity: 0; 
                transform: scale(0.8); 
            }
            to { 
                opacity: 1; 
                transform: scale(1); 
            }
        }

        .fade-out {
          opacity: 0 !important; /* Cambiado de 1px a 0 */
          transform: scale(0.9); /* Movimiento hacia la derecha */ 
          transition: opacity 0.4s ease, transform 0.4s ease;
          
        }


       /* =========================================================
           AJUSTES MÓVILES PARA ALERTAS (Móviles y Tablets verticales)
        ========================================================= */
        @media (max-width: 767px) {
            .toast-container {
                bottom: auto; 
                top: 20px; 
                left: 50%; 
                right: auto;
                transform: translateX(-50%); 
                width: 100%; 
                max-width: 90%; /* Respeta los márgenes físicos de la pantalla */
                align-items: center; 
                z-index: 99999 !important; 
            }

            .toast {
                min-width: 260px !important; 
                width: fit-content !important; 
                max-width: 100% !important; 
                
                /* CAMBIO: Aumentamos el "aire" (padding) de 10px 15px a 14px 20px */
                padding: 4px 30px !important; 
                
                border-radius: 20px; 
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important; 
                display: flex !important;
                align-items: center;
                gap: 12px; 
            }

            /* Protegemos el icono para que no se aplaste */
            .toast-icon {
                margin: 0 !important; 
                flex-shrink: 0 !important; 
            }

            /* Contenedor del texto */
            .toast-body {
                flex-grow: 1;
                min-width: 0; /* TRUCO VITAL: Permite que el texto baje de línea sin empujar la caja */
            }

            .toast-title {
                font-size: 13.5px; /* Un pelín más grande para legibilidad */
                white-space: normal; 
                line-height: 1.4; /* Separamos un milímetro las líneas de texto */
                margin: 0;
                
                /* LA MAGIA: Evita palabras solas en la última línea */
                text-wrap: pretty; 
            }

            .toast-content {
/* display: none; */ 
                display: block; /* Agrega esto para forzar que se vea el texto largo en celular */
                margin-top: 3px; 
            }
            
            /* Protegemos la X para que siempre esté visible */
            .toast-close {
                margin: 0 !important;
                flex-shrink: 0 !important; 
            }
        }


/* =========================================================
   ESTILOS GENÉRICOS PARA PERFILES Y FORMULARIOS (Mascotas/Usuarios)
========================================================= */


/* Efecto de iluminación de fondo para celdas de estadísticas */
.pg-hover-bg-white {
    transition: background-color 0.2s ease;
}
.pg-hover-bg-white:hover {
    background-color: var(--pg-white) !important;
}

/* Contenedores de Avatares Circulares (Mascotas o Usuarios) */
.pg-avatar-wrapper {
    width: 110px;
    height: 110px;
}
.pg-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Diseño de Switches (Botones de Si/No tipo iOS con color PetGrow) */
.pg-custom-switch .form-check-input {
    width: 2.5em;
    height: 1.2em;
    cursor: pointer;
}
.pg-custom-switch .form-check-input:checked {
    background-color: var(--pg-primary);
    border-color: var(--pg-primary);
}

/* Utilidad Responsiva: Botón ocupa 100% en celular, pero tamaño normal en PC */
@media (min-width: 768px) {
    .pg-w-md-auto { width: auto !important; }
}


/* =========================================================
   ESTILOS GENÉRICOS PARA DIRECCIONES (Tarjetas y Badges)
========================================================= */

/* Etiqueta de Dirección Predeterminada (Estilo corporativo suave) */
.pg-badge-default {
    background-color: var(--pg-text-muted);
    color: var(--pg-light);
    font-size: 0.65rem; /* Un poco más pequeña para no saturar */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
}

/* Icono principal de la tarjeta de dirección */
.pg-address-icon {
    width: 45px;
    height: 45px;
    background-color: var(--pg-light);
    
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* =========================================================
   AJUSTES MÓVILES (Responsividad para Panel de Usuario)
   Se activa solo en pantallas menores a 768px (Celulares)
========================================================= */
@media (max-width: 767px) {
    
    /* 1. Reducir la tipografía gigante */
    .welcome-banner h2 { font-size: 1.4rem !important; }
    .card-title-pg { font-size: 1.05rem !important; }
    
    /* 2. Reducir los 'paddings' inmensos de las tarjetas para ganar espacio */
    .profile-dashboard .card-body,
    .welcome-banner {
        padding: 1.2rem !important; 
    }

    /* 3. Reorganizar el Banner de Bienvenida */
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1.2rem;
    }
    
    /* 4. Estilizar el bloque de Mascotas/Pedidos para móvil */
    .welcome-banner .gap-4 {
        width: 100%;
        justify-content: space-around !important;
        background-color: var(--pg-light); /* Fondo gris suave para separarlo */
        padding: 12px;
        border-radius: 8px;
        margin-top: 5px;
    }

    /* 5. Ajustar Botones para "dedos gordos" (Touch Targets) */
    .btn {
        font-size: 0.9rem !important;
    }

    .btn-dark-petgrow {
        width: 100%; /* Ocupa casi todo el ancho para ser fácil de tocar */
        margin: 0 auto !important; /* Fuerza el centrado horizontal (reparte el 20% sobrante) */
        display: flex !important; /* Permite que el 'margin auto' funcione correctamente */

    }

    .pg-action-row-detail .btn-dark-petgrow {
        white-space: nowrap !important; /* MAGIA: Prohíbe terminantemente que el texto salte a 2 líneas */
        font-size: 0.85rem !important;  /* Achicamos la letra solo un poquito (era 0.9rem) */
        padding-left: 0.75rem !important; /* Reducimos el aire interno a los lados */
        padding-right: 0.75rem !important;
    }
    
    .btn-accent-petgrow {
        width: 80%; /* Ocupa casi todo el ancho para ser fácil de tocar */
        margin: 0 auto !important; /* Fuerza el centrado horizontal (reparte el 20% sobrante) */
        display: flex !important; /* Permite que el 'margin auto' funcione correctamente */
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
    }

    .btn-sale-petgrow {
        width: 80%; /* Ocupa casi todo el ancho para ser fácil de tocar */
        margin: 0 auto !important; /* Fuerza el centrado horizontal (reparte el 20% sobrante) */
        display: flex !important; /* Permite que el 'margin auto' funcione correctamente */
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
    }

    .btn-primary-petgrow {
        width: 80%; /* Ocupa casi todo el ancho para ser fácil de tocar */
        margin: 0 auto !important; /* Fuerza el centrado horizontal (reparte el 20% sobrante) */
        display: flex !important; /* Permite que el 'margin auto' funcione correctamente */
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
    }

    /* 6. Acomodar las cajas punteadas vacías */
    .border-dashed {
        padding: 1.5rem 1rem !important;
    }
    
    /* 7. Arreglar el flex de la cabecera de las tarjetas en pantallas muy pequeñas */
    .d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* =========================================================
       8. MENÚ HORIZONTAL DESLIZABLE (Solo Móvil)
    ========================================================= */
    .mobile-account-nav {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 0.5rem 0 1rem 0; /* Espacio para la sombra */
        margin-bottom: 1rem;
        
        /* Ocultar barra de desplazamiento pero permitir el toque */
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; /* Firefox */
    }

    .mobile-account-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }

    .mobile-nav-pill {
        white-space: nowrap; /* Evita que el texto se rompa en dos líneas */
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0.6rem 1.2rem;
        background-color: var(--pg-white);
        color: var(--pg-text-muted);
        border-radius: 50px; /* Forma de píldora redonda */
        font-weight: 500;
        font-size: 0.9rem;
        border: 1px solid #eaeaea;
        transition: all 0.3s ease;
    }

    /* Estado Activo en Móvil */
    .mobile-nav-pill.active {
        background-color: var(--pg-primary);
        color: var(--pg-white);
        border-color: var(--pg-primary);
        box-shadow: 0 4px 10px rgba(77, 20, 184, 0.2);
    }




}








/* ############################################################################################################ 
                    ESTILOS PERSONALIZADOS ALERTAS SweetAlert2 
############################################################################################################ */


/* Estilos para igualar la imagen */
.petgrow-popup {
    border-radius: 30px !important; /* Bordes muy redondeados */
    /* padding: 2rem !important; */
}

.petgrow-title {
    color: #1a1a1a !important;
    font-family: 'Segoe UI', sans-serif !important;
    font-weight: 700 !important;
    margin-top: 15px !important;
}

.petgrow-html {
    color: #666 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

/* Botones personalizados */
.btn-confirm-delete {
    background-color: #e13d4b !important;
    color: white !important;
    border-radius: 15px !important;
    padding: 12px 35px !important;
    font-weight: bold !important;
    margin: 10px !important;
    border: none !important;
    cursor: pointer;
    /* Transición suave para todos los cambios */
    transition: all 0.2s ease-in-out !important;
}

/* Efecto al pasar el cursor */
.btn-confirm-delete:hover {
    background-color: #e42b3b !important; /* Un rojo un poco más oscuro */
    transform: scale(1.01); /* Se agranda un 5% */
box-shadow: 0 5px 15px rgba(225, 61, 75, 0.4) !important; /* Sombra roja sutil */
}

/* Efecto al presionar (clic) */
.btn-confirm-delete:active {
    transform: scale(0.95); /* Se encoge un poco al presionar */
}

/* --- BOTÓN NO, CANCELAR (GRIS) --- */
.btn-cancel-delete {
    background-color: #f1f3f5 !important;
    color: #495057 !important;
    border-radius: 15px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    margin: 10px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;
}

/* Efecto al pasar el cursor */
.btn-cancel-delete:hover {
    background-color: #e9ecef !important; /* Un gris un poco más oscuro */
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
}

/* Efecto al presionar */
.btn-cancel-delete:active {
    transform: scale(0.95);
}

/* El círculo suave detrás del icono */
.swal2-icon.swal2-warning {
    border-color: #fff5f5 !important;
    background-color: #fff5f5 !important;
    color: #e13d4b !important; /* Color del signo ! */
}



/* Forzar que el input de la alerta sea delgado y elegante */
.swal2-input.petgrow-control {
    height: auto !important; /* Permite que el padding defina el grosor */
    max-width: 80% !important;
    margin: 15px auto !important;
    padding: 8px 15px !important; /* Grosor reducido */
    border-radius: 8px !important;
    border: 1px solid #ced4da !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
    display: flex !important;
} 

/* Efecto Focus en la alerta */
.swal2-input.petgrow-control:focus {
    border-color: #000 !important;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05) !important;
}


/* =========================================================
============================================================
   APP STORE: TIENDA, CATÁLOGO Y PRODUCTOS
===========================================================
=========================================================== */



.filter-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--pg-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-link {
    color: var(--pg-text-muted);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-link:hover, .filter-link.active {
    color: var(--pg-primary);
    font-weight: 600;
    transform: translateX(3px); /* Pequeño deslizamiento al pasar el mouse */
}

.filter-count {
    background-color: var(--pg-light);
    color: var(--pg-text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 600;
}

/* --- 2. Tarjetas de Producto en Grilla --- */
.pg-product-card {
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    background: var(--pg-white);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative; /* Para controlar elementos internos */
}

/* --- Carrusel de Catálogo Premium --- */
.pg-product-carousel .carousel-inner img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Ocultar flechas por defecto */
.pg-carousel-btn {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    width: 15% !important; /* Más estrechas para no tapar la foto */
    
}

/* Aparecen al pasar el mouse por la tarjeta */
.pg-product-card:hover .pg-carousel-btn {
    opacity: 1 !important;
}

/* Filtro oscuro sutil en las flechas para que se vean en fotos blancas */
.pg-carousel-btn .carousel-control-prev-icon,
.pg-carousel-btn .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    background-size: 50%;
}

/* El efecto hover ahora se aplica a la tarjeta completa */
.pg-product-card:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,0.06);
    transform: translateY(-2px);
    border-color: var(--pg-light);
}


/* 2. El enlace de detalle (envolverá solo la imagen y el texto) */
.pg-product-link {
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Esto es clave: empuja el botón hacia abajo */
}
/* Caja de la Imagen (Gris ultra suave para destacar recortes PNG) */
.pg-product-img-box {
    position: relative;
    padding: 1.5rem;
    background-color: #fcfcfc;
    text-align: center;
    border-bottom: 1px solid #f9f9f9;
}

.pg-product-img-box img {
    width: 100%;
    height: 180px;
    object-fit: contain; /* Evita que las fotos se deformen */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pg-product-card:hover .pg-product-img-box img {
    transform: scale(1.08); /* Zoom elegante a la foto */
}

/* Etiquetas flotantes sobre la foto (Ofertas / Nuevo) */
.pg-badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--pg-accent);
    color: var(--pg-primary);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(251, 192, 45, 0.3);
}

/* Cuerpo de la tarjeta */
.pg-product-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Esto empuja el precio hacia abajo dentro de los textos */
}

.pg-product-brand {
    font-size: 0.75rem;
    color: var(--pg-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.pg-product-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--pg-dark);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    /* CSS Mágico para truncar a 2 líneas exactas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   SIDEBAR DE FILTROS (DISEÑO PREMIUM MINIMALISTA)
========================================================= */

.pg-sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}
.pg-sidebar-sticky::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* =========================================================
   TÍTULOS Y BOTONES
========================================================= */
.pg-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.pg-filter-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--pg-dark, #212529); /* Fallback de color por si acaso */
    margin: 0;
}

.pg-btn-reset {
    font-size: 0.75rem;
    color: var(--pg-text-muted, #6c757d);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.pg-btn-reset:hover {
    color: var(--pg-primary, #6f42c1);
    text-decoration-color: var(--pg-primary, #6f42c1);
}

/* =========================================================
   PILLS (PARA MASCOTAS)
========================================================= */
.pg-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pg-pill-radio {
    position: relative;
}

.pg-pill-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pg-pill-radio label {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pg-text-muted, #6c757d);
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    user-select: none;
}

.pg-pill-radio:hover label {
    background-color: #e9ecef;
    color: var(--pg-dark, #212529);
}

.pg-pill-radio input:checked ~ label {
    background-color: var(--pg-primary, #6f42c1);
    color: white;
    border-color: var(--pg-primary, #6f42c1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* =========================================================
   CHECKBOXES PERSONALIZADOS (PARA CATEGORÍAS)
========================================================= */
.pg-custom-checkbox {
    position: relative;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

/* 1. OCULTAMOS EL INPUT NATIVO (Crucial para arreglar tu error) */
.pg-custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 2. ESTILOS DEL TEXTO */
.pg-custom-checkbox label {
    position: relative;
    cursor: pointer;
    padding-left: 32px; /* Espacio para que entre el cuadradito */
    color: var(--pg-text-muted, #6c757d);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    user-select: none;
    line-height: 1.5;
}

/* 3. DIBUJAMOS EL CUADRADITO */
.pg-custom-checkbox label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 1.5px solid #ced4da;
    border-radius: 6px; 
    background-color: transparent;
    transition: all 0.2s ease;
}

/* 4. DIBUJAMOS LA PALOMITA (OCULTA POR DEFECTO) */
.pg-custom-checkbox input:checked ~ label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-60%) rotate(45deg);
}

/* 5. EFECTO HOVER */
.pg-custom-checkbox:hover label {
    color: var(--pg-dark, #212529);
    transform: translateX(4px);
}

.pg-custom-checkbox:hover label::before {
    border-color: var(--pg-primary, #6f42c1);
}

/* 6. ESTADO ACTIVO (CHECKED) */
.pg-custom-checkbox input:checked ~ label {
    color: var(--pg-primary, #6f42c1);
    font-weight: 700;
}

.pg-custom-checkbox input:checked ~ label::before {
    background-color: var(--pg-primary, #6f42c1);
    border-color: var(--pg-primary, #6f42c1);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 991px) {
    .pg-custom-checkbox label, 
    .pg-pill-radio label {
        padding-top: 5px;
        padding-bottom: 5px;
        margin-bottom: 0.5rem;
    }
}

/* =========================================================
   SISTEMA BOTÓN MUTANTE (Catálogo)
========================================================= */
/* Contenedor principal: Mantiene el espacio fijo para que la tarjeta no salte */
.pg-mutant-cart-container {
    position: relative;
    width: calc(100% - 2.4rem);
    margin: 0 1.2rem 1.2rem 1.2rem;
    height: 42px; 
}

/* 1. Estado Inicial (Botón "Comprar") */
.pg-btn-initial {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--pg-light);
    color: var(--pg-primary);
    font-weight: 700;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
}

.pg-product-card:hover .pg-btn-initial {
    background-color: var(--pg-primary);
    color: var(--pg-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(77, 20, 184, 0.2);
}

/* 2. Estado Activo (Selector Oculto por defecto) */
.pg-mutant-selector {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--pg-white);
    border: 1px solid var(--pg-text-muted); /* Borde morado para destacar que está activo */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    
    /* Estado invisible */
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

/* 3. LA MUTACIÓN (Activada por JavaScript) */
.pg-mutant-cart-container.is-active .pg-btn-initial {
    opacity: 0;
    transform: scale(1.1); /* Se expande y desvanece */
    pointer-events: none;
}

.pg-mutant-cart-container.is-active .pg-mutant-selector {
    opacity: 1;
    transform: scale(1) translateY(-2px); /* Aparece y se levanta sutilmente */
    pointer-events: auto;
    box-shadow: 0 6px 15px rgba(127, 86, 204, 0.15);
}

/* Controles internos del selector */
.pg-mutant-selector .pg-qty-btn {
    background: transparent;
    border: none;
    padding: 0 15px;
    height: 100%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.pg-mutant-selector .pg-qty-btn:hover {
    background-color: var(--pg-light);
}

.pg-mutant-selector .pg-qty-input {
    width: 30px;
    text-align: center;
    border: none;
    font-weight: 800;
    font-size: 1rem;
    color: var(--pg-dark);
    outline: none;
    pointer-events: none; /* Evita que el usuario escriba letras en el input */
}

/* =========================================================
   AJUSTE MÓVIL PREMIUM: BOTÓN MUTANTE
========================================================= */
@media (max-width: 767px) {
    /* 1. Ajustamos el ancho y lo hacemos un poco más alto para los dedos */
    .pg-mutant-cart-container {
        width: calc(100% - 2rem);
        margin: 0 1rem 1rem 1rem;
        height: 46px; /* 4px más alto que en PC */
    }

    /* 2. Área de toque expansiva para + y - */
    .pg-mutant-selector .pg-qty-btn {

        font-size: 1.4rem; /* Iconos más grandes y fáciles de ver */
        
        /* LA MAGIA ANTI-ZOOM: Le dice al celular "Solo acepta toques rápidos, no hagas zoom" */
        touch-action: manipulation; 
    }

    /* 3. Bloqueo del Zoom automático de iPhone */
    .pg-mutant-selector .pg-qty-input {
        font-size: 16px !important; /* iOS exige 16px mínimo para no hacer zoom automático */
        width: 35px; /* Un poco más ancho para números de dos dígitos */
    }
}

/* =========================================================
   NUEVO DISEÑO DE TARJETAS (ESTILO VARIANTE DIRECTA)
========================================================= */
/* --- Etiquetas de Variante (Sabor, Talla, Peso) integradas a la tarjeta --- */
.pg-item-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.8rem;
}

.pg-item-tag {
    background-color: var(--pg-light);
    color: var(--pg-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    border: 1px solid #eaeaea;
}

/* Modificamos la caja de precio para que alinee bien el precio normal y oferta */
.pg-price-box {
    margin-top: auto;
    display: flex;
    align-items: center; /* Cambiado a center para mejor alineación vertical */
    flex-wrap: wrap;
    gap: 6px;
}

.pg-price-current {
    font-size: 1.3rem;
    font-family: var(--font-body); /* Usamos Inter, no Poppins, para los números */
    font-weight: 800;
    color: var(--pg-dark); 
    margin: 0;
    
    /* LA MAGIA: Obliga a los números a alinear perfectamente y leerse mejor */
    font-variant-numeric: tabular-nums; 
    letter-spacing: -0.5px; /* Apreta un milímetro los números para dar efecto premium */
}

.pg-price-old {
    font-size: 1rem;
    color: #818181;
    text-decoration: line-through;
    font-weight: 500;
    margin: 0 0 0 0.5rem; /* Un pequeño margen a la izquierda para separar del precio actual */ 
    
    
    font-variant-numeric: tabular-nums; /* Aplica también al precio tachado*/
}

/* Color rojo o morado para cuando hay oferta (opcional) */
.text-oferta {
    color: #e13d4b !important;
}


/* Ajustes Móviles Grilla */
@media (max-width: 767px) {
    .pg-product-img-box img { height: 130px; } 
    .pg-product-title { font-size: 0.9rem; }
    .pg-price-current { font-size: 1.1rem; }
    .pg-product-body { padding: 1rem; }

    

}



/* =========================================================
   DETALLE DE PRODUCTO (Product Detail)
========================================================= */

/* Galería de imágenes (Estilo Tarjeta Limpia) */
.pg-product-gallery {
    background-color: var(--pg-white);
    border-radius: 16px;
    padding: 2rem 2rem;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); /* Sombra muy sutil */
    text-align: center;
    position: sticky;
    top: 100px;
}

.pg-main-img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
}

/* Columna de Información */
.pg-product-info-col {
    padding-left: 2rem;
    padding-top: 1rem;
}

.pg-detail-brand {
    font-size: 0.9rem;
    color: var(--pg-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.pg-detail-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pg-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Precios en Detalle */
.pg-detail-price-box {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

/* Precio en rojo si hay oferta (como en la imagen) */
.pg-detail-price-current {
    font-size: 1.8rem;
    font-family: var(--font-body);
    font-weight: 800;
    color: #e13d4b; 
    margin: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

/* Precio normal en negro */
.pg-detail-price-current.normal-price {
    color: var(--pg-dark); 
}

.pg-detail-price-old {
    font-size: 1rem;
    color: #a0a0a0;
    text-decoration: line-through;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin: 0;
}

/* Subtítulo / Categoría corta */
.pg-detail-subtitle {
    font-size: 0.95rem;
    color: var(--pg-text-muted);
    margin-bottom: 1.5rem;
}

/* Badge de Stock (Estilo Verde Limpio) */
.pg-stock-badge {
    background-color: #f0fdf4;
    border: 1px solid #16a34a;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    max-width: 400px; /* EL TRUCO: Evita que se estire en pantallas gigantes */
}


.pg-stock-status {
    color: #16a34a; /* Verde oscuro para lectura */
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pg-stock-count {
    color: var(--pg-text-muted);
    font-size: 0.85rem;
}



.pg-quantity-label {
    font-weight: 700;
    color: var(--pg-dark);
    font-size: 0.95rem;
}

.pg-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: var(--pg-white);
    overflow: hidden;
}

.pg-qty-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 1.2rem;
    color: var(--pg-dark);
    cursor: pointer;
    transition: background-color 0.2s;
    
    /* --- OPTIMIZACIONES PARA iOS --- */
    -webkit-appearance: none; /* Quita cualquier estilo nativo de botón de Apple */
    touch-action: manipulation; /* BLOQUEA el zoom por doble toque rápido */
    user-select: none; /* Evita que el botón se "sombreé" en azul al tocarlo mucho */
    -webkit-tap-highlight-color: transparent; /* Quita el destello gris de iOS al tocar */
}

.pg-qty-btn:hover {
    background-color: var(--pg-light);
}

/* Input del número */
.pg-qty-input {
    width: 30px; /* Un poco más ancho por si el cliente lleva +10 unidades */
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 16px !important; /* CRÍTICO EN iOS: Si es menor a 16px, Safari hace zoom automático aunque sea readonly */
    color: var(--pg-dark);
    outline: none;
    
    /* --- OPTIMIZACIONES PARA iOS --- */
    -webkit-appearance: none; 
    border-radius: 0; /* iOS a veces le pone bordes curvos a los inputs por defecto */
    user-select: none;
    pointer-events: none; /* Como es readonly, bloqueamos que el usuario pueda poner el cursor adentro */
}

/* Quitar flechas nativas en Chrome/Safari */
.pg-qty-input::-webkit-outer-spin-button,
.pg-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Selectores de Variantes */
.pg-variant-selector-label {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
    color: var(--pg-dark);
}

.pg-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.pg-variant-btn {
    display: none;
}

.pg-variant-label {
    background-color: #ffffff;
    border: 2px solid #e9ecef; /* Borde constante de 2px para evitar saltos */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Centrado Flexbox general */
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ESTADO ACTIVO COMPARTIDO */
.pg-variant-btn:checked + .pg-variant-label {
    border-color: var(--pg-primary);
    box-shadow: 0 4px 12px rgba(77, 20, 184, 0.1);
}
.pg-variant-btn:checked + .pg-variant-label strong,
.pg-variant-btn:checked + .pg-variant-label small {
    color: var(--pg-primary) !important; /* Tiñe todo el texto de morado */
}

/* ===================================================
   TAMAÑOS ESPECÍFICOS SEGÚN PRODUCTO
=================================================== */

/* 1. Alimentos (Rectángulo Adaptable) */
.pg-variant-food {
    min-width: 90px;
    padding: 10px 16px;
    height: auto; /* Crece si el texto es largo */
}

/* 2. Accesorios y Ropa (Cuadrados o simétricos para M, L, XL) */
.pg-variant-size {
    min-width: 55px; 
    min-height: 55px; /* Usamos min-height para que sea cuadrado perfecto si solo hay talla */
    padding: 8px 12px;
}

/* Tabs de información inferior */
.pg-product-tabs {
    border-bottom: 1px solid #eaeaea;
}

.pg-product-tabs .nav-link {
    color: var(--pg-text-muted);
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: -1px;
}

.pg-product-tabs .nav-link.active {
    color: var(--pg-primary);
    background: transparent;
    border-bottom: 3px solid var(--pg-primary);
}


/* Estilos para el Lightbox */
.pg-lightbox-modal .modal-content { background: none; }
.pg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3); /* Un fondo un poco más oscuro para que resalte mejor sobre fotos blancas */
    border: none;
    color: white;
    
    /* === LA MAGIA PARA EL CÍRCULO PERFECTO === */
    width: 50px;           /* Ancho fijo */
    height: 50px;          /* Alto idéntico al ancho */
    padding: 0;            /* Quitamos el padding que lo deformaba */
    display: flex;         /* Flexbox para centrado perfecto */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;     /* Tamaño de la flecha */
    
    border-radius: 50%;    /* Al ser un cuadrado perfecto, esto hace un círculo perfecto */
    transition: all 0.3s ease;
    z-index: 1060;
}
.pg-lightbox-nav:hover { 
    background: rgba(0, 0, 0, 0.6); 
    transform: translateY(-50%) scale(1.05); /* Pequeño efecto de zoom al pasar el mouse */
}
.pg-lightbox-nav.prev { left: 20px; }
.pg-lightbox-nav.next { right: 20px; }

#lightboxMainImage { 
    max-height: 85vh; 
    object-fit: contain; 
    
    /* El fondo blanco que agregamos antes */
    background-color: #ffffff; 
    padding: 1.5rem; 
    
    touch-action: pan-y; 
    -webkit-user-drag: none; 

    /* NUEVO: Mantiene el lienzo perfectamente centrado */
}

/* Ocultar flechas en móviles si prefieres que solo usen el dedo */
@media (max-width: 767px) {
    .pg-lightbox-nav { display: none; };
}

@media (min-width: 769px) {
    #lightboxMainImage {
        max-width: calc(100% - 160px);
    }
}


/* =========================================================
   NUEVAS CLASES: MEJORAS DE DETALLE DE PRODUCTO (MÓVIL)
========================================================= */

/* Etiqueta de marca en móvil (arriba de la foto) */
.pg-mobile-brand-tag {
    color: var(--pg-primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Ajuste de texto de descripción para mejor lectura */
.pg-description-text {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Fila de acción (Cantidad + Botón) compacta y alineada */
.pg-action-row-detail {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 400px;
}

.pg-quantity-control-detail {
    display: flex;
    align-items: center;
    background: var(--pg-white);
    border-radius: 12px;
    padding: 5px 15px;
    height: 48px; /* Coincide mágicamente con la altura del botón de compra */
}

.pg-qty-input-detail {
    width: 40px;
    border: none;
    text-align: center;
    font-weight: bold;
    background: transparent;
}


/* COMPORTAMIENTO MÓVIL ESTRICTO */
@media (max-width: 767px) {
    /* Reducimos un poco la galería en móvil para que el botón de compra quede visible (Above the fold) */
    .pg-product-gallery {
        max-height: 350px;
        margin-bottom: 0;
        padding: 2rem 1rem;
    }
    
    .pg-main-img {
        max-height: 300px;
    }

    /* Pestañas más compactas para no ocupar espacio inútil */
    .pg-product-tabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}


@media (max-width: 991px) {

    .pg-product-info-col { padding-left: 0; }
    .pg-detail-title { font-size: 1.8rem; }
}
/* =========================================================
   PÁGINA DE CARRITO (Diseño Tabla y Tarjetas)
========================================================= */

.pg-cart-container {
    padding-bottom: 4rem;
}

.pg-cart-header {
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--pg-dark);
    font-size: 0.95rem;
}

.pg-cart-items-card {
    background-color: var(--pg-white);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.pg-cart-item-row {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.pg-link-muted {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pg-link-muted:hover {
    color: var(--pg-dark);
}

.btn-outline-danger-pg {
    color: #e13d4b;
    border: 1px solid #ffcdd2;
    background: transparent;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-outline-danger-pg:hover {
    background: #fff5f5;
    border-color: #e13d4b;
}

.pg-summary-card {
    background-color: var(--pg-white);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

/* LA MAGIA DEL CENTRADO ESTÁ AQUÍ */
.pg-cart-qty-selector {
    transform: scale(0.85);
    transform-origin: center; /* Ahora se encoge hacia el centro, manteniendo la alineación */
    min-width: 125px;
    margin: 0 auto; /* Asegura el centrado absoluto en su contenedor */
}

.pg-summary-sticky {
    position: sticky;
    top: 150px;
    z-index: 50;
}

.pg-mobile-checkout-bar {
    display: none;
}
/* =========================================================
   AJUSTES MÓVILES UNIFICADOS (767px o menos)
========================================================= */
@media (max-width: 767px) {
    
    .pg-cart-container {
        padding-bottom: 50px !important; 
    }
    .pg-checkout-container {
        padding-bottom: 50px !important; /* Mantiene el espacio solo en el checkout */
    }
    
    .pg-cart-items-card, .pg-summary-card {
        padding: 1.2rem;
    }

    body.page-with-mobile-bar {
        padding-bottom: 130px !important; 
    }



    
.pg-cart-qty-selector {
        transform: scale(0.95); /* Lo achicamos un 5% para que se vea más delicado en celular */
        transform-origin: left center; /* Lo anclamos a la izquierda, debajo de la foto */
        min-width: 110px; /* Le damos un ancho mínimo razonable */
        width: max-content; /* Obligamos a la caja a "abrazar" los botones sin estirarse */
        margin: 0; /* Quitamos el centrado automático para que respete el borde izquierdo */
        height: 42px; /* Una altura cómoda para el dedo */
    }

    .pg-summary-sticky {
        position: relative; 
        top: 0;
        margin-top: 1rem;
    }

    .pg-mobile-checkout-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom)) 1.5rem;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.08);
        z-index: 1050; 
        border-top: 1px solid #eee;

        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }

    /* 1. Permitimos que los textos se vean */
    .pg-minimal-stepper .pg-s-text { 
        display: block !important; 
        font-size: 0.65rem; /* Texto más pequeño para que quepa bien */
        margin-top: 5px;
        text-align: center;
        white-space: nowrap;
    }

    /* 2. Cambiamos la dirección a columna para cada paso */
    .pg-s-item {
        flex-direction: column; /* Círculo arriba, texto abajo */
        gap: 2px;
        min-width: 60px;
    }

    /* 3. Ajustamos las líneas conectoras */
    .pg-minimal-stepper .pg-s-line { 
        max-width: 30px; 
        margin-bottom: 20px; /* Alineamos la línea con el centro de los círculos */
    }

    /* 4. Reducimos el espacio general para evitar scroll horizontal */
    .pg-minimal-stepper {
        gap: 0.5rem;
    }
    
    .pg-s-dot {
        width: 28px; /* Círculos un pelín más compactos */
        height: 28px;
        font-size: 0.75rem;
    }

}


/* Barra fija al fondo en celulares */
.pg-mobile-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 20px 20px 20px;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
    z-index: 1050;
    border-top: 1px solid #f1f5f9;
}

/* Evitar que la barra tape el final del formulario */



/* =========================================================
   REDISEÑO CHECKOUT SOBRIO (PROFESIONAL)
========================================================= */

/* A. EL STEPPER MINIMALISTA */
.pg-minimal-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pg-s-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pg-s-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pg-text-muted);
}

.pg-s-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pg-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pg-s-line {
    flex-grow: 1;
    max-width: 80px;
    height: 1px;
    background: #e2e8f0;
}

.pg-s-item.active .pg-s-dot {
    background: var(--pg-primary);
    border-color: var(--pg-primary);
    color: white;
}
.pg-s-item.active .pg-s-text {
    color: var(--pg-dark);
}

.pg-s-item.completed .pg-s-dot {
    background: #f1f5f9;
    color: #10b981;
    border-color: #10b981;
}

/* B. LAS SECCIONES (Sober) */
.pg-sober-section {
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 2rem;
}

.pg-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pg-dark);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.pg-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #202020;
    margin-bottom: 6px;
    display: block;
}
/* =========================================================
   INPUTS Y SELECTS UNIFICADOS (Premium)
========================================================= */
#checkout-form .form-control,
#checkout-form .form-select {
    background-color: #f8fafc !important; /* Fondo gris perlado muy sutil */
    border: 1px solid #e2e8f0 !important; /* Borde gris clarito */
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    color: #1e293b !important;
    box-shadow: none !important;
    transition: all 0.25s ease !important;
    height: auto !important; /* Asegura que ambos tengan exactamente la misma altura */
}

/* Efecto Focus (Cuando el usuario hace clic) para TODOS los campos */
#checkout-form .form-control:focus,
#checkout-form .form-select:focus {
    background-color: #ffffff !important; /* Se vuelve blanco puro */
    border-color: var(--pg-primary) !important; /* Borde morado corporativo */
    box-shadow: 0 0 0 4px rgba(77, 20, 184, 0.08) !important; /* Resplandor morado suave */
    outline: none !important;
}

/* Ajuste específico para que la flechita del select no quede pegada al borde */
#checkout-form .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-size: 16px 12px;
}

/* D. RESUMEN CARD (Adiós al Negro Chillón) */
.pg-summary-card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.pg-mini-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f8fafc;
}

.pg-mini-thumb {
    position: relative;
    width: 56px;
    height: 56px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
}
.pg-mini-thumb img { width: 100%; height: 100%; object-fit: contain; }

.pg-mini-qty {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--pg-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.pg-mini-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pg-dark);
}
.pg-mini-variant {
    font-size: 0.75rem;
    color: var(--pg-text-muted);
}
.pg-mini-price {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pg-dark);
}

/* E. ADAPTACIÓN MÓVIL */
@media (max-width: 991px) {
    .pg-minimal-stepper .pg-s-text { display: none; }
    .pg-minimal-stepper .pg-s-line { max-width: 40px; }
    .pg-sober-section { padding: 1.5rem; }
    .pg-summary-sober { margin-top: 2rem; }
}




/* --- ORDEN COMPLETADA (PREMIUM) --- */
.pg-success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pg-order-receipt-card {
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

.bg-success-soft {
    background-color: #f0fdf4 !important;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 991px) {
    .pg-order-receipt-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
}



/* =========================================================
   ORDEN COMPLETADA (PREMIUM REDESIGN)
========================================================= */

/* Stepper de Éxito (Paso 3) */
.pg-s-item.success-step .pg-s-dot {
    background: #10b981; /* Verde éxito */
    border-color: #10b981;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-success 2s infinite;
}

.pg-s-item.success-step .pg-s-text {
    color: #10b981;
    font-weight: 800;
}

.pg-s-line.completed-line {
    background: #10b981;
    opacity: 0.3;
}

/* Animación de latido para el check final */
@keyframes pulse-success {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tarjeta Ticket Recibo */
.pg-receipt-premium {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

/* Decoración superior de la tarjeta (Línea morada) */
.pg-receipt-premium::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--pg-primary); /* Tu morado corporativo */
}

/* Separador Punteado estilo "Ticket de compra" */
.pg-ticket-divider {
    border-top: 2px dashed #e2e8f0;
    margin: 2rem 0;
    position: relative;
}


/* Tabla de resumen ajustada */
.pg-table-receipt th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--pg-text-muted);
    border-bottom: 1px solid #eef2f7;
}

.pg-table-receipt td {
    border-bottom: 1px solid #f8fafc;
}

.pg-table-receipt tr:last-child td {
    border-bottom: none;
}

@media (max-width: 767px) {
    .pg-receipt-premium { padding: 1.5rem !important; }
    .pg-ticket-divider::before { left: -25px; }
    .pg-ticket-divider::after { right: -25px; }
}


/* =========================================================
   REDISEÑO PREMIUM: BADGES DE VARIANTE
========================================================= */
/* =========================================================
   BADGES DE CATÁLOGO (Minimalista y Premium)
========================================================= */

/* Prefijo sutil para las etiquetas (Ej: "Talla:", "Sabor:") */
/* El prefijo mudo */
.pg-badge-prefix {
    font-weight: 500; 
    opacity: 0.8;
    margin-right: 4px;
    text-transform: capitalize;
    color: var(--pg-dark);
    flex-shrink: 0; /* Evita que el prefijo se deforme si no hay espacio */
}


.pg-catalog-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.5rem 0 1rem 0;
}

.pg-c-badge {
    /* 1. CAMBIO CLAVE: Pasamos de inline-flex a inline-block */
    display: inline-block; 
    
    padding: 4px 10px;
    border-radius: 6px; 
    font-size: 0.7rem;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.2px;
    border: none;
    
    /* 2. REGLAS DE ELIPSIS: Ahora sí funcionarán perfectamente */
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 3. ALINEACIÓN: Reemplaza a align-items: baseline */
    vertical-align: middle; 
}


/* Etiqueta Principal (Talla / Peso) - Fondo suave, destaca primero */
.pg-c-badge-main {
    background-color: #f1f3f5; /* Gris ultra claro */
    color: var(--pg-dark);
    border: 1px solid #e9ecef;
}


/* Etiqueta Secundaria (Sabor / Color) - Transparente, más delicada */
.pg-c-badge-sub {
    /* Fondo usando tu morado principal (--pg-primary: #4d14b8) pero al 4% de opacidad */
    background-color: rgba(77, 20, 184, 0.04); 
    color: var(--pg-primary); /* Texto en tu morado corporativo */
    border: 1px solid rgba(77, 20, 184, 0.15); /* Borde morado muy delicado */
    font-weight: 600;
}


.pg-badge-dim {
    background-color: #f0f9ff; /* Un azul casi blanco */
    color: #0284c7; /* Azul océano elegante */
}

.pg-badge-taste {
    background-color: #fff4e6; /* Naranja/Durazno muy pálido */
    color: #d97706; /* Naranja caramelo oscuro */
}

/* 3. ESTÉTICA (Color del accesorio): Usa tu morado corporativo suave */
.pg-badge-style {
    background-color: rgba(77, 20, 184, 0.06); /* Morado PetGrow al 6% */
    color: var(--pg-primary);
}



/* =========================================================
   CONTENEDOR DE BADGES FLOTANTES (Ofertas y Beneficios)
========================================================= */
.pg-img-overlay-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    pointer-events: none;
}


/* Anulamos la posición absoluta individual de la oferta porque ahora el contenedor la posiciona */
.pg-img-overlay-badges .pg-badge-sale {
    position: relative;
    top: 0;
    left: 0;
    margin: 0; 
}
/* =========================================================
   2. BENEFICIOS (Flotando centrados abajo de la imagen)
========================================================= */
.pg-img-bottom-benefits {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center; /* Los centra elegantemente */
    flex-wrap: wrap;
    gap: 6px;
    z-index: 10;
    pointer-events: none;
}

/* Diseño "Cristal" ultra minimalista */
.pg-benefit-text {
    font-size: 0.6rem;
    font-weight: 800;
    color: #10b981; /* Verde esmeralda vibrante pero fino */
    background-color: rgba(255, 255, 255, 0.85); /* Blanco semi-transparente */
    backdrop-filter: blur(4px); /* Efecto vidrio esmerilado Apple */
    padding: 3px 8px;
    border-radius: 6px; /* Borde cuadrado suave, rompe con las burbujas */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* Sombra casi invisible para despegarlo de la foto */
}

.pg-benefit-text i {
    margin-right: 3px;
    font-size: 0.65rem;
}

/* Contenedor en la esquina superior derecha de la foto */
.pg-img-top-right-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column; /* Se apilan hacia abajo */
    gap: 8px;
    z-index: 10;
}

/* El círculo del ícono (Minimalista) */
.pg-icon-badge {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #1fa87a; /* Verde esmeralda */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: help; /* Cambia el cursor para indicar que hay info */
    transition: transform 0.2s;
}

.pg-icon-badge:hover {
    transform: scale(1.1);
}


/*===========================================
   MEJORA DE GALERÍA (Soporta múltiples fotos con Scroll)
========================================================= */
/* Contenedor de miniaturas */
.pg-gallery-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center; /* Centra las miniaturas */
    overflow-x: auto; /* Permite deslizar en celular si hay muchas fotos */
    padding: 10px 0 15px 0;
    scrollbar-width: none; /* Oculta la barra de scroll en Firefox */
}

.pg-gallery-thumbnails::-webkit-scrollbar {
    display: none; /* Oculta la barra de scroll en Chrome/Safari */
}

/* Estilo individual de cada miniatura */
.pg-thumb {
    width: 70px;
    height: 70px;
    object-fit: contain; /* Evita que la foto se deforme */
    border: 2px solid #eef2f7; /* Un borde gris ultra suave */
    border-radius: 12px; /* Bordes redondeados premium */
    cursor: pointer;
    padding: 6px;
    background: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Evita que se aplasten si hay muchas fotos */
}

/* Efecto al pasar el mouse por encima */
.pg-thumb:hover {
    transform: translateY(-3px); /* Se levanta un poquito */
    border-color: var(--pg-primary-suave, #d1bfeb);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Sombra sutil */
}

/* Efecto cuando la foto está seleccionada (activa) */
.pg-thumb.active {
    border-color: var(--pg-primary, #4d14b8); /* Borde con tu color principal */
    box-shadow: 0 4px 12px rgba(77, 20, 184, 0.15); /* Sombra morada elegante */
}





/* ================================================
   CARRUSEL MÓVIL — estilos completos
================================================ */

/* Wrapper de la imagen principal */
.pg-carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    touch-action: pan-y;          /* permite scroll vertical, JS controla horizontal */
    user-select: none;
    -webkit-user-select: none;
}

/* Imagen principal — sin arrastre accidental */
.pg-main-img {
    -webkit-user-drag: none;
    cursor: zoom-in; /* NUEVO: Muestra la lupa para invitar a hacer clic */
    transition: opacity 0.22s ease;
    display: block;
    width: 100%;
}

/* Clase que agrega JS durante el cambio de foto */
.pg-main-img.pg-fade {
    opacity: 0;
}

/* ── Puntos indicadores ───────────────────────── */
.pg-carousel-dots {
    display: none;              /* solo visible en móvil (ver @media abajo) */
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0 4px;
}

.pg-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1bfeb;
    transition: background 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.pg-carousel-dot.active {
    background: var(--pg-primary, #4d14b8);
    transform: scale(1.35);
}

/* ── Responsive: móvil (≤767px) ──────────────── */
@media (max-width: 767px) {

    /* Muestra los dots */
    .pg-carousel-dots {
        display: flex;
    }

    /* Oculta miniaturas en móvil — el swipe las reemplaza */
    .pg-gallery-thumbnails {
        display: none !important;
    }

    /* La imagen ocupa más espacio vertical en móvil */
    .pg-main-img {
        max-height: 300px;
        object-fit: contain;
    }
}


/* =========================================================
   DISEÑO PREMIUM: FORM-CHECK (CHECKBOXES Y SWITCHES)
========================================================= */

.pg-form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.75em;
    margin-bottom: 0.75rem;
    position: relative;
    user-select: none;
}


/* Ocultamos el input original que genera Django */
.pg-form-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Estado: Activo (Checked) */
.pg-form-check input[type="checkbox"]:checked ~ .pg-form-check-label {
    color: var(--pg-dark, #212529);
    font-weight: 600;
}

.pg-form-check input[type="checkbox"]:checked ~ .pg-form-check-label::before {
    background-color: var(--pg-primary, #6f42c1);
    border-color: var(--pg-primary, #6f42c1);
    box-shadow: 0 4px 10px rgba(var(--pg-primary-rgb, 111, 66, 193), 0.2);
}

.pg-form-check input[type="checkbox"]:checked ~ .pg-form-check-label::after {
    transform: translateY(-60%) rotate(45deg) scale(1);
}

/* Ocultamos el input original de forma segura */
.pg-form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* La caja base del checkbox */
.pg-form-check-label {
    cursor: pointer;
    color: var(--pg-text-muted, #6c757d);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
}

.pg-form-check-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1.5px solid #ced4da;
    border-radius: 6px; /* Estilo Apple/Moderno */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* El check (visto bueno) */
.pg-form-check-label::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-60%) rotate(45deg) scale(0); /* Invisible por defecto */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Estado: Al pasar el mouse */
.pg-form-check:hover .pg-form-check-label::before {
    border-color: var(--pg-primary, #6f42c1);
    background-color: rgba(var(--pg-primary-rgb, 111, 66, 193), 0.05);
}

/* Estado: Activo (Checked) */
.pg-form-check-input:checked ~ .pg-form-check-label {
    color: var(--pg-dark, #212529);
    font-weight: 600;
}

.pg-form-check-input:checked ~ .pg-form-check-label::before {
    background-color: var(--pg-primary, #6f42c1);
    border-color: var(--pg-primary, #6f42c1);
    box-shadow: 0 4px 10px rgba(var(--pg-primary-rgb, 111, 66, 193), 0.2);
}

.pg-form-check-input:checked ~ .pg-form-check-label::after {
    transform: translateY(-60%) rotate(45deg) scale(1); /* Aparece con animación pop */
}

/* DISEÑO OPCIONAL: ESTILO SWITCH (INTERRUPTOR) */
.pg-form-check.pg-switch {
    padding-left: 3.5em;
}

.pg-switch .pg-form-check-label::before {
    width: 44px;
    height: 24px;
    border-radius: 50px;
    background-color: #e9ecef;
    border: none;
}

.pg-switch .pg-form-check-label::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    border: none;
    transform: translateY(-50%) scale(1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pg-switch .pg-form-check-input:checked ~ .pg-form-check-label::after {
    transform: translateY(-50%) translateX(20px); /* Desplaza el círculo */
    border: none;
}

/* Estado ACTIVO del interruptor (Corregido) */
.pg-switch input[type="checkbox"]:checked ~ .pg-form-check-label::after,
.pg-switch .pg-form-check-input:checked ~ .pg-form-check-label::after {
    transform: translateY(-50%) translateX(20px) !important; /* Desplaza el círculo */
    border: none !important;
}

/* Y para asegurar que el fondo cambie correctamente al activarse */
.pg-switch input[type="checkbox"]:checked ~ .pg-form-check-label::before,
.pg-switch .pg-form-check-input:checked ~ .pg-form-check-label::before {
    background-color: var(--pg-primary, #6f42c1) !important;
    border-color: var(--pg-primary, #6f42c1) !important;
}

/* =========================================================
   DISEÑO PREMIUM: AUTENTICACIÓN (LOGIN/REGISTER)
========================================================= */

/* Animación de entrada de la tarjeta */
.pg-auth-card {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Overlay sobre la imagen de la izquierda */
.pg-auth-overlay {
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.05) 0%, rgba(26, 26, 26, 0.85) 100%);
}

/* === GRUPO DE INPUTS FUSIONADOS (DISEÑO CONTINUO) === */
/* Esta es la solución a tu imagen: un contenedor que dibuja el borde */
.pg-input-group {
    background-color: #f8fafc !important; /* Fondo gris muy suave */
    border: 1px solid #e2e8f0 !important; /* Borde suave */
    border-radius: 12px !important; /* Esquinas redondeadas Apple */
    overflow: hidden; /* Fundamental para el efecto continuo */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: none !important;
}

/* Al hacer clic adentro, TODO el contenedor reacciona */
.pg-input-group:focus-within {
    background-color: #ffffff !important;
    border-color: var(--pg-primary, #6f42c1) !important;
    box-shadow: 0 0 0 4px rgba(111, 66, 193, 0.08) !important; /* Halo morado */
}

/* Estado de Error */
.pg-input-group.is-invalid-group {
    border-color: #e13d4b !important;
    background-color: #fff5f5 !important;
}

/* Ajustes para el Icono */
.pg-input-group .input-group-text {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
}

/* El ícono se pinta de morado al escribir */
.pg-input-group:focus-within .input-group-text {
    color: var(--pg-primary, #6f42c1) !important;
}

/* Input propiamente tal: SIN BORDES Y TRANSPARENTE */
.pg-input-group .form-control {
    background: transparent !important;
    border: none !important; /* Quitamos bordes internos de bootstrap */
    padding: 10px 15px 10px 10px !important;
    color: var(--pg-dark, #212529) !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
}

/* Botón Ojo (Mostrar/Ocultar contraseña) */
.toggle-password {
    background: transparent !important;
    color: #94a3b8 !important;
    padding-right: 1.2rem !important;
}

.toggle-password:hover {
    color: var(--pg-primary, #6f42c1) !important;
}

/* =========================================================
   DISEÑO PREMIUM: FORM-CHECK (CHECKBOX RECORDARME)
========================================================= */
.pg-form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.75em;
    margin-bottom: 0.75rem;
    position: relative;
    user-select: none;
}

/* Ocultamos el input original */
.pg-form-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* La caja base del checkbox */
.pg-form-check-label {
    cursor: pointer;
    color: var(--pg-text-muted, #6c757d);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
}

.pg-form-check-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1.5px solid #ced4da;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* El check (visto bueno) */
.pg-form-check-label::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-60%) rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

/* Estado: Activo (Checked) */
.pg-form-check input[type="checkbox"]:checked ~ .pg-form-check-label::before {
    background-color: var(--pg-primary, #6f42c1);
    border-color: var(--pg-primary, #6f42c1);
}

.pg-form-check input[type="checkbox"]:checked ~ .pg-form-check-label::after {
    transform: translateY(-60%) rotate(45deg) scale(1);
}


/* =========================================================
   CORRECCIÓN DE AUTOFILL DEL NAVEGADOR (Fondo celeste/amarillo)
========================================================= */

/* Estado normal del input autocompletado */
.pg-input-group .form-control:-webkit-autofill,
.pg-input-group .form-control:-webkit-autofill:hover, 
.pg-input-group .form-control:-webkit-autofill:focus, 
.pg-input-group .form-control:-webkit-autofill:active {
    /* Usamos una sombra interna gigante del mismo gris suave de nuestro contenedor */
    -webkit-box-shadow: 0 0 0 100px #f8fafc inset !important;
    /* Forzamos el color del texto a tu gris oscuro corporativo */
    -webkit-text-fill-color: var(--pg-dark, #212529) !important;
    /* Color del cursor titilante */
    caret-color: var(--pg-dark, #212529) !important;
    border: none !important;
}

/* Estado Focus: Cuando el usuario hace clic, nuestro contenedor se vuelve blanco puro,
   así que debemos igualar el autofill a ese blanco. */
.pg-input-group:focus-within .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 100px #ffffff inset !important;
}

/* =========================================================
   DISEÑO PREMIUM: INPUT DE ARCHIVOS (SUBIR FOTOS)
========================================================= */

/* 1. Ajustamos el input general para ganar espacio */
.pg-input-group input[type="file"].form-control {
    padding: 7px 10px !important; /* Reducimos el padding superior/inferior para centrarlo bien */
    font-size: 0.85rem !important; /* Letra levemente más pequeña para que quepa todo el texto */
    color: var(--pg-text-muted, #6c757d) !important;
    line-height: 1.8; /* Alineación vertical perfecta */
    cursor: pointer;
}

/* 2. Estilizamos el botón nativo "Seleccionar archivo" */
.pg-input-group input[type="file"]::file-selector-button {
    padding: 6px 14px;
    margin-right: 12px;
    border: none;
    border-radius: 8px; /* Bordes redondeados Apple */
    background-color: var(--pg-light, #f1f1f1);
    color: var(--pg-dark, #1a1a1a);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3. Efecto Hover para el botón interno */
.pg-input-group input[type="file"]::file-selector-button:hover {
    background-color: var(--pg-primary, #4d14b8);
    color: var(--pg-white, #ffffff);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(77, 20, 184, 0.15);
}




/* =========================================================
   DISEÑO PARA
========================================================= */


.pg-receipt-premium::before {
    display: none !important;
}

/* Badges Superiores */
.pg-badge-warning { background-color: var(--warning_bk, #fff8eb); color: var(--warning, #f39c12); }

/* Badges Superiores */
.pg-badge-warning { background-color: var(--warning_bk, #fff8eb); color: var(--warning, #f39c12); }
.pg-badge-danger { background-color: var(--error_bk, #ffeff0); color: var(--error, #dc3545); }
.pg-badge-success { background-color: var(--success_bk, #f4fdf9); color: var(--success, #198754); }

/* ANIMACIÓN DE LATIDO PARA EL ESTADO ACTUAL (MORADO) */
@keyframes pulse-active {
    0% { box-shadow: 0 0 0 0 rgba(77, 20, 184, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(77, 20, 184, 0); }
    100% { box-shadow: 0 0 0 0 rgba(77, 20, 184, 0); }
}
.pg-active-pulse {
    animation: pulse-active 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

/* ANIMACIÓN DE LATIDO PARA ENTREGADO (VERDE) */
@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.pg-active-pulse-success {
    animation: pulse-success 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

/*=========================================================
   LÍNEA DE TIEMPO PREMIUM (TRACKER DE PEDIDOS)
========================================================= */

/* Contenedor general */
.pg-timeline {
    position: relative;
    padding-left: 0;
}

/* Cada paso de la historia */
.pg-timeline-item {
    display: flex;
    position: relative;
    margin-bottom: 1.5rem; /* Separación entre cada estado */
}

/* El contenedor del círculo */
.pg-timeline-icon {
    flex-shrink: 0; /* Evita que el texto aplaste el círculo */
    margin-right: 1.5rem; /* Espacio entre el círculo y el texto */
    position: relative;
    z-index: 2; /* Siempre por encima de la línea */
}

/* LA LÍNEA VERTICAL CONECTORA */
.pg-timeline-line {
    position: absolute;
    width: 2px;
    height: calc(100% + 1.5rem); /* Se estira todo el item + el margen de abajo */
    background-color: var(--pg-light, #f8fafc); /* Gris claro */
    left: 22px; /* Centro matemático del círculo de 46px */
    top: 46px; /* Empieza justo debajo del círculo */
    z-index: 1; /* Detrás del círculo */
}

/* El bloque de texto */
.pg-timeline-content {
    padding-bottom: 0.5rem;
    padding-top: 0.25rem;
}



/* =========================================================
   BANNER DE CUPÓN ACTIVO (DISEÑO PREMIUM)
========================================================= */
.pg-coupon-active-banner {
    background: #f0fdf4; /* Verde esmeralda ultra suave */
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 6px 15px;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.03); 
}

.pg-coupon-icon-circle {
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a; /* Verde éxito PetGrow */
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.pg-coupon-text-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre "Cupón activo:" y el código */
}

.pg-coupon-code-inline {
    font-size: 0.95rem;
    font-weight: 500; /* Negrita pro */
    color: var(--pg-dark);
    text-transform: uppercase; 
}

.pg-coupon-label {
    font-size: 0.85rem;
    color: #16a34a; /* El verde éxito que ya definimos */
    font-weight: 500;
}

.pg-coupon-code {
    font-size: 1rem;
    font-weight: 500;
    color: var(--pg-dark);
    letter-spacing: -0.2px;
}

.pg-coupon-remove-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ef4444; /* Rojo suave */
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.pg-coupon-remove-link:hover {
    background: #fee2e2;
    color: #dc2626;
}

@keyframes slideDownIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Ajuste móvil */
@media (max-width: 767px) {

    .pg-coupon-text-wrapper {
        flex-direction: row; /* Forzamos que siga en línea incluso en celular */
        font-size: 0.8rem;
    }
    
    .pg-coupon-label, .pg-coupon-code-inline {
        font-size: 0.85rem;
    }

    .pg-coupon-active-banner {
        padding: 10px 15px;
    }
    .pg-coupon-code {
        font-size: 1rem;
    }
    .pg-coupon-remove-link span {
        display: none; /* En móvil solo mostramos la X para ahorrar espacio */
    }
}







/* =========================================
   ESTADOS DE CARGA (BOTONES)
   ========================================= */
.btn-submit {
    position: relative;
    transition: all 0.3s ease;
}

/* Estado cuando el botón está cargando */
.btn-submit.is-loading {
    color: transparent !important; /* Oculta el texto original ("Pagar" o "Aplicar") */
    pointer-events: none; /* Evita que se le haga clic nuevamente */
    opacity: 0.7; /* Da un efecto visual de que está desactivado */
}

/* El spinner giratorio */
.btn-submit.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    border: 3px solid transparent;
    border-top-color: #ffffff; /* Color del spinner (blanco es ideal si tu botón es oscuro) */
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}


/* =========================================
   BUSCADOR PREDICTIVO (LIVE SEARCH)
========================================= */

/* NUEVO: Forzamos a la caja de resultados a calzar perfecto con la barra */
#search-results-dropdown {
    width: 100% !important;
    left: 0;
    right: 0;
    padding: 0; /* Quitamos el padding feo de Bootstrap */
    border-radius: 8px; /* Mismos bordes redondos que la barra superior */
    border: 1px solid #eee; /* Un borde súper sutil para que no se pierda en fondos blancos */
}

/* Cada ítem de producto en los resultados */
.live-search-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--pg-dark);
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

/* Efecto al pasar el mouse por encima del producto */
.live-search-item:hover {
    background-color: var(--pg-light);
}

/* Imagen en miniatura del buscador */
.live-search-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 15px;
    border: 1px solid #eee;
    background-color: var(--pg-white);
}

/* Contenedor del texto (Nombre y Precio) */
.live-search-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

/* Nombre del producto (se corta con "..." si es muy largo) */
.live-search-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--pg-dark);
}

/* Precio del producto */
.live-search-price {
    font-size: 0.85rem;
    color: var(--pg-accent_contraste); /* Usa tu color morado principal o cámbialo a naranja si prefieres */
    font-weight: 700;
    margin-top: 2px;
}

/* Botón de "Ver todos los resultados" */
.live-search-see-all {
    display: flex;
    justify-content: center;
    padding: 12px;
    text-decoration: none;
    background-color: #f8f9fa;
    color: var(--pg-primary); /* Azul de enlace Bootstrap */
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.live-search-see-all:hover {
    background-color: #e9ecef;
}

/* Mensaje cuando no hay resultados */
.live-search-empty {
    padding: 15px;
    text-align: center;
    color: var(--pg-text-muted);
    font-size: 0.9rem;
}



/* =========================================
   Franja de promociones
========================================= */


/* Opción A: Contraste Elegante (Recomendado) */
.promo-bar-bg {
    background-color: var(--pg-accent); /* El amarillo de tu logo */
    color: var(--pg-text);           /* Texto gris oscuro para contraste */
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1060; /* Debe ser mayor que el z-index de tu navbar */
}

.sticky-top {
    z-index: 1030; /* Asegura que el bloque promo + navbar siempre esté al frente */
}